Backend gallery ordering is not usable in this version. Still relying on 1.0.x code.
In the file:
administrator/components/com_rsgallery2/options/gallery.php
Lines 345-389 - function saveOrder
Replace entire function with this:
function saveOrder( &$cid ) {
global $mainframe;
$database =& JFactory::getDBO();
$total = count( $cid );
$order = JRequest::getVar( 'order', array(0), 'post', 'array' );
JArrayHelper::toInteger($order, array(0));
$row = new rsgGalleriesItem( $database );
$conditions = array();
// update ordering values
for ( $i=0; $i < $total; $i++ ) {
$row->load( (int) $cid[$i] );
$groupings[] = $row->parent;
if ($row->ordering != $order[$i]) {
$row->ordering = $order[$i];
if (!$row->store()) {
JError::raiseError(500, $db->getErrorMsg());
} // if
} // if
} // for
// reorder each group
$groupings = array_unique( $groupings );
foreach ( $groupings as $group ) {
$row->reorder('parent = '.$database->Quote($group));
} // foreach
// clean any existing cache files
$cache =& JFactory::getCache('com_rsgallery2');
$cache->clean( 'com_rsgallery2' );
$msg = JText::_( 'New ordering saved' );
$mainframe->redirect( 'index2.php?option=com_rsgallery2&rsgOption=galleries', $msg );
} // saveOrder