Ejemplo n.º 1
0
 /**
  * update object
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     if ($p === false) {
         $p = $this->data;
     }
     $this->data = $p;
     $this->setParamsFromData($p);
     return parent::update($p);
 }
Ejemplo n.º 2
0
 /**
  * update file
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     \CB\Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     \CB\Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     $this->logAction('file_update', array('file' => array('id' => $p['id'], 'name' => $p['name'])));
     return $rez;
 }
Ejemplo n.º 3
0
 /**
  * update object
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     if ($p === false) {
         $p = $this->data;
     }
     $this->data = $p;
     if (empty($p['template_id'])) {
         $p['template_id'] = \CB\Config::get('default_shortcut_template');
     }
     return parent::update($p);
 }
Ejemplo n.º 4
0
 /**
  * update comment
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     //we'll set comments add as comment action for parent
     Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     $this->logAction('comment_update', array('new' => Objects::getCachedObject($p['pid']), 'comment' => $p['data']['_title']));
     return $rez;
 }
Ejemplo n.º 5
0
 /**
  * update file
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     // log the action
     $logParams = array('type' => 'file_update', 'new' => Objects::getCachedObject($p['pid']), 'file' => array('id' => $p['id'], 'name' => $p['name']));
     Log::add($logParams);
     return $rez;
 }