public function beforeUpdate() { if (parent::beforeUpdate()) { return true; } return false; }
public function beforeSave() { if (parent::beforeSave()) { $this->_replace = true; return true; } return false; }
public function beforeUpdate() { if (parent::beforeUpdate()) { $this->updated = 'NOW():sql'; $this->user_id_updated = $this->model_uset_id; return true; } else { return false; } }
public function __construct() { if (!self::$_msql) { self::$_msql = SafeMySQL::getInstance(); } $this->setIsNewRecord(TRUE); $this->relations = $this->relations(); $this->modelName = strtolower(get_class($this)); $this->init(); }
public function beforeSave() { if (parent::beforeSave()) { if (!$this->checkDublicateKey()) { return false; } return TRUE; } else { return false; } }
public function beforeSave() { if (parent::beforeSave()) { $this->clearUrl('url', 'return_url'); if (!$this->smtp_id) { $this->smtp_id = null; } if (!$this->fulfillment_id) { $this->fulfillment_id = null; } return TRUE; } else { return false; } }
public function clearCache() { parent::clearCache(); AF::cache()->delete('all_gateways'); }
public function clearCache() { parent::clearCache(); AF::cache()->delete('all_users_by_user_id'); }
public function cloneModel($ids = null) { $this->profile_name = 'copy_' . $this->profile_name; return parent::cloneModel($ids); }
public function cloneModel($ids = null) { $this->shipping_name = 'copy_' . $this->shipping_name; return parent::cloneModel($ids); }
public function clearCache() { parent::clearCache(); //Clear all ip_md5() $array = AF::cache()->get('array_ip'); foreach ($array as $k => $v) { AF::cache()->delete($k); } AF::cache()->delete('array_ip'); }
public function afterDelete() { parent::afterDelete(); $sql = "DELETE FROM `events_products`\n WHERE `product_id` = ?i"; self::$_msql->query($sql, $this->product_id); $this->updateSites(); }
public function clearCache() { parent::clearCache(); $cacheID = 'distinct_event_types'; AF::cache()->delete($cacheID); }
public function clearCache() { parent::clearCache(); AF::cache()->delete('all_languages'); AF::cache()->delete('all_countries'); }
/** * Returns the static model of the specified AR class. * Please note that you should have this exact method in all your AFActiveRecord descendants! * @param string $className active record class name. * @return Affiliate the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }
public function clearCache() { parent::clearCache(); AF::cache()->delete('satets_by_state_name'); }
public function fillAddressFromArray($arr, $address_type = 'shipping') { if ($address_type == 'billing') { $bArr = array(); foreach ($arr as $key => $field) { if (stripos($key, 'billing_') !== false) { $bArr[str_replace('billing_', '', $key)] = $field; } } $arr = $bArr; } // check for "blank" state if ($arr['state_id'] == '0') { $arr['state_id'] = ''; } // lowercase country_id. uppercase values are affecting queries $arr['country_id'] = strtolower($arr['country_id']); parent::fillFromArray($arr); $this->address_type = $address_type; }
public function beforeUpdate() { if (parent::beforeUpdate()) { // This is the temporary decision because we didn't have a created field before if ($this->created == '0000-00-00 00:00:00') { $this->created = 'NOW():sql'; } return TRUE; } else { return false; } }
public function afterUpdate() { // Save the body_html and body_plain fields $this->saveBodyHtml(); $this->saveBodyPlain(); parent::afterUpdate(); }
public function beforeUpdate() { if (!parent::beforeUpdate()) { return false; } $this->convertByMethod(); return true; }
public function beforeSave() { if (parent::beforeSave()) { if ($this->IsNewRecord) { $this->created = 'NOW():sql'; } //date("Y-m-d h:m:i", time()); return true; } return false; }
public function delete() { $mFF = new FulfillmentField(); $mFF->deleteFulfillmentFields($this->fulfillment_id); return parent::delete(); }
public function afterDelete() { parent::afterDelete(); //SiteApi::executeUpdate(2); }