public function storeOrder( $order ) { global $_CB_framework, $_PLUGINS; $plugin = cbgjClass::getPlugin(); $user =& CBuser::getUserDataInstance( $_CB_framework->myId() ); $_PLUGINS->trigger( 'gjint_onBeforeUpdateAutoOrder', array( &$order, &$this, $user, $plugin ) ); $this->set( 'ordering', (int) $order ); if ( ! parent::store() ) { return false; } $_PLUGINS->trigger( 'gjint_onAfterUpdateAutoOrder', array( $this->get( 'ordering' ), $this, $user, $plugin ) ); $this->updateOrder(); return true; }
/** * If table key (id) is NULL : inserts a new row * otherwise updates existing row in the database table * * Can be overridden or overloaded by the child class * * @param boolean $updateNulls TRUE: null object variables are also updated, FALSE: not. * @return boolean TRUE if successful otherwise FALSE */ public function store($updateNulls = false) { $k = $this->_tbl_key; $storeId = $this->{$k}; $this->_historyCheckLoadedPrevious($storeId); $result = parent::store($updateNulls); if ($result) { $this->_historyLogChanges($storeId); } return $result; }
/** * stores notification params to database * * @param mixed $params * @param boolean $html * @return boolean */ public function storeParams( $params, $html = true ) { global $_CB_framework, $_PLUGINS; $plugin = cbgjClass::getPlugin(); $user =& CBuser::getUserDataInstance( $_CB_framework->myId() ); $params = cbgjClass::parseParams( $params, $html, $this->getParams( $html ) ); $_PLUGINS->trigger( 'gj_onBeforeUpdateNotificationParams', array( &$params, &$this, $this->getGroup(), $this->getCategory(), $user, $plugin ) ); $this->set( 'params', trim( $params->toIniString() ) ); if ( ! parent::store() ) { return false; } $_PLUGINS->trigger( 'gj_onAfterUpdateNotificationParams', array( $params, $this, $this->getGroup(), $this->getCategory(), $user, $plugin ) ); return true; }