Orderup / Orderdown not functioning in custom component - Joomla! Forum - community, help and support
hi.. want seek advices on orderup / orderdown on joomla 2.5..
when click on either orderup/orderdown icon, runs these functions , page redirect works. problem ordering not saved.
orderup
orderdown
when click on either orderup/orderdown icon, runs these functions , page redirect works. problem ordering not saved.
orderup
function orderupcolor( $inc = -1 ) {
// move project record 1 row up
$mainframe = &jfactory::getapplication();
$cid = jrequest::getvar( 'cid', array(), 'post', 'array' );
$db =& jfactory::getdbo();
$row =& jtable::getinstance('dominantproductcolors', 'table');
$row->load( (int) $cid[0] );
$row->move( $inc );
//$mainframe->redirect( 'index.php?option=com_dominantproduct&task=colors' );
} // end orderup function
orderdown
function orderdowncolor( $inc = 1 ) {
// move project record 1 row down
$mainframe = &jfactory::getapplication();
$cid = jrequest::getvar( 'cid', array(), 'post', 'array' );
$db =& jfactory::getdbo();
$row =& jtable::getinstance('dominantproductcolors', 'table');
$row->load( (int) $cid[0] );
$row->move( $inc );
$mainframe->redirect( 'index.php?option=com_dominantproduct&task=colors' );
} // end orderup function
Comments
Post a Comment