public function afterDataSet() { parent::afterDataSet(); if (!$this->regex) { $this->hostname = substr(str_replace(".*", "*", stripslashes($this->hostname)), 1, -1); } }
public function beforeSave() { parent::beforeSave(); if ($this->isNew()) { $this->user_id = getUserID(); } }
public function afterDataSet() { parent::afterDataSet(); $default = getArrayVar(self::$_defaultOpts, $this->name); if ($this->value == null) { $this->value = $default; } }
public function beforeSave() { parent::beforeSave(); if ($this->isNew()) { $this->user_id = getUserID(); } $this->slug = trim($this->cloakerAPIPath(), '/'); }
public function beforeSave() { parent::beforeSave(); if ($this->isNew()) { $this->time = time(); BTApp::importModel("ClickCounterModel"); $cnt = ClickCounterModel::model()->getRow(); $cnt->inc(); $this->click_id = $cnt->click_count; } }
public function afterDataSet() { parent::afterDataSet(); $this->ip_from = long2ip($this->ip_from); $this->ip_to = long2ip($this->ip_to); }
/** * Enable filters */ public static function enableFilters() { self::$_filtersEnabled = true; }
public function afterSave() { parent::afterSave(); if (!$this->prefs) { $mod = new UserPrefModel(); $mod->user_id = $this->id(); $mod->save(false, true); } }