Exemple #1
0
 protected function _preSave()
 {
     $issueDate = $this->get('issue_date');
     if (empty($issueDate)) {
         $this->set('issue_date', XenForo_Application::$time);
     }
     parent::_preSave();
 }
 protected function _preSave()
 {
     // if we are redirecting to a destination, make sure it is enabled
     if ($this->get('redirect_destination')) {
         // get the destination
         $redirectDestination = $this->_getDestinationModel()->getDestinationById($this->get('redirect_destination'));
     }
     parent::_preSave();
 }
Exemple #3
0
 protected function _preSave()
 {
     $templateForHooks = $this->getExtraData(self::EXTRA_DATA_TEMPLATE_FOR_HOOKS);
     if ($templateForHooks !== null) {
         // this extra data has been set somehow
         $this->set('template_for_hooks', $templateForHooks);
     }
     return parent::_preSave();
 }
 protected function _preSave()
 {
     $this->_bumpAddOnVersionId();
     $templateForHooks = $this->getExtraData(self::EXTRA_DATA_TEMPLATE_FOR_HOOKS);
     if ($templateForHooks !== null) {
         // this extra data has been set somehow
         $this->set('template_for_hooks', $templateForHooks);
     }
     if ($this->get('widget_id') and !empty($this->_newData['xf_widget'])) {
         WidgetFramework_Helper_LayoutEditor::keepWidgetChanges($this->get('widget_id'), $this, $this->_newData['xf_widget']);
     }
     parent::_preSave();
 }