コード例 #1
0
ファイル: list.php プロジェクト: ppantilla/bbninja
 /**
  * Method to edit an existing record.
  *
  * @param   string  $key     The name of the primary key of the URL variable.
  * @param   string  $urlVar  The name of the URL variable if different from the primary key
  * (sometimes required to avoid router collisions).
  *
  * @return  boolean  True if access level check and checkout passes, false otherwise.
  */
 public function edit($key = null, $urlVar = null)
 {
     $model = $this->getModel('connections');
     if (count($model->activeConnections()) == 0) {
         throw new RuntimeException(JText::_('COM_FABRIK_ENUSRE_ONE_CONNECTION_PUBLISHED'));
     }
     parent::edit($key, $urlVar);
 }
コード例 #2
0
ファイル: list.php プロジェクト: Jobar87/fabrik
	public function edit()
	{
		$model = $this->getModel('connections');
		if (count($model->activeConnections()) == 0) {
			JError::raiseError(500, JText::_('COM_FABRIK_ENUSRE_ONE_CONNECTION_PUBLISHED'));
			return;
		}
		parent::edit();
	}
コード例 #3
0
ファイル: list.php プロジェクト: jfquestiaux/fabrik
 /**
  * Method to always save a list.
  *
  * @param   string $key    The name of the primary key of the URL variable.
  * @param   string $urlVar The name of the URL variable if different from the primary key (sometimes required to
  *                         avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  */
 public function doSave($key = null, $urlVar = null)
 {
     return parent::save($key, $urlVar);
 }
コード例 #4
0
ファイル: element.php プロジェクト: LGBGit/tierno
 /**
  * Method to save a record.
  *
  * @param   string  $key     The name of the primary key of the URL variable.
  * @param   string  $urlVar  The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  */
 public function save($key = null, $urlVar = null)
 {
     $ok = parent::save();
     $app = JFactory::getApplication();
     if (!is_null($app->getUserState('com_fabrik.redirect'))) {
         $this->setRedirect($app->getUserState('com_fabrik.redirect'));
         $app->setUserState('com_fabrik.redirect', null);
     }
     return $ok;
 }
コード例 #5
0
ファイル: form.partial.php プロジェクト: glauberm/cinevi
 /**
  * Method to always save a list.
  *
  * @param   string $key    The name of the primary key of the URL variable.
  * @param   string $urlVar The name of the URL variable if different from the primary key (sometimes required to
  *                         avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  */
 public function doSave($key = null, $urlVar = null)
 {
     try {
         parent::save($key, $urlVar);
     } catch (Exception $e) {
         print_r($e);
         $this->setMessage($e->getMessage(), 'error');
         $this->setRedirect('index.php?option=com_fabrik&view=forms');
     }
     return true;
 }