english/administrator/components/com_aicontactsafe/models/default.php
//function used to move a record up or down (based on the field ordering)
function used to move a record up or down (based on the field ordering)
function used to move a record up or down ( based on the field ordering )
function changeOrder($direction = 0) {
		JRequest::checkToken() or jexit( 'Invalid Token' );
		$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
		JArrayHelper::toInteger($cid);
		if (count($cid) > 0) {
			$cid = (int)$cid[0];
		} else {
			$cid = -1;
		}
		if ($cid > 0 && $direction != 0) {
			$row = &$this->getRowData($cid);
			if (!$row->move( $direction, '' )) {
				$this->setError($this->_db->getErrorMsg());
				return false;
			}
		}
		return true;
	}
function changeOrder ( $ direction = 0 ) { JRequest :: checkToken ( ) or jexit ( 'Invalid Token' ) ; $ cid = JRequest :: getVar ( 'cid' , array ( ) , 'post' , 'array' ) ; JArrayHelper :: toInteger ( $ cid ) ; if ( count ( $ cid ) > 0 ) { $ cid = ( int ) $ cid [ 0 ] ; } else { $ cid = - 1 ; } if ( $ cid > 0 && $ direction != 0 ) { $ row = & $ this -> getRowData ( $ cid ) ; if ( ! $ row -> move ( $ direction , '' ) ) { $ this -> setError ( $ this -> _db -> getErrorMsg ( ) ) ; return false ; } } return true ; }
function used to move a record up or down (based on the field ordering)
function used to move a record up or down ( based on the field ordering )
// Check for request forgeries // read the id of the record seleted for move // if there is a record selected and a direction specified continue the procedure // get an object with the values of the fields of the selected record // move the record to the new position