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;
     }
 }
예제 #4
0
 public function beforeSave()
 {
     parent::beforeSave();
     if ($this->isNew()) {
         $this->user_id = getUserID();
     }
     $this->slug = trim($this->cloakerAPIPath(), '/');
 }
예제 #5
0
 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);
 }
예제 #7
0
 /**
  * Enable filters
  */
 public static function enableFilters()
 {
     self::$_filtersEnabled = true;
 }
예제 #8
0
 public function afterSave()
 {
     parent::afterSave();
     if (!$this->prefs) {
         $mod = new UserPrefModel();
         $mod->user_id = $this->id();
         $mod->save(false, true);
     }
 }