Beispiel #1
0
 /**
  * Override parent allowSave method.
  *
  * @param   array   $data  An array of input data.
  * @param   string  $key   The name of the key for the primary key.
  *
  * @return  boolean
  *
  * @since   1.6
  */
 protected function allowSave($data, $key = 'id')
 {
     // use custom position if selected
     if (empty($data['position'])) {
         $data['position'] = $data['custom_position'];
     }
     unset($data['custom_position']);
     return parent::allowSave($data, $key);
 }
Beispiel #2
0
 /**
  * Method to check if you can save a new or existing record.
  *
  * Overrides JControllerForm::allowSave to check the core.admin permission.
  *
  * @param	array	An array of input data.
  * @param	string	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.6
  */
 protected function allowSave($data, $key = 'id')
 {
     return JFactory::getUser()->authorise('core.admin', $this->option) && parent::allowSave($data, $key);
 }
Beispiel #3
0
 /**
  * Method (override) to check if you can save a new or existing record.
  *
  * Adjusts for the primary key name and hands off to the parent class.
  *
  * @param   array   $data  An array of input data.
  * @param   string  $key   The name of the key for the primary key.
  *
  * @return  boolean
  *
  * @since   1.6
  */
 protected function allowSave($data, $key = 'message_id')
 {
     return parent::allowSave($data, $key);
 }
Beispiel #4
0
 /**
  * Method to check if you can save a new or existing record.
  *
  * Overrides JControllerForm::allowSave to check the core.admin permission.
  *
  * @param	array	An array of input data.
  * @param	string	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.6
  */
 protected function allowSave($data, $key = 'id')
 {
     return User::authorise('core.admin', $this->option) && parent::allowSave($data, $key);
 }