コード例 #1
0
 public function afterDataSet()
 {
     parent::afterDataSet();
     if (!$this->regex) {
         $this->hostname = substr(str_replace(".*", "*", stripslashes($this->hostname)), 1, -1);
     }
 }
コード例 #2
0
 public function beforeSave()
 {
     parent::beforeSave();
     if ($this->isNew()) {
         $this->user_id = getUserID();
     }
 }
コード例 #3
0
 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;
     }
 }
コード例 #6
0
 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);
     }
 }