Exemplo n.º 1
0
 /**
  * Method to delete item(s).
  *
  * @access	public
  * @param	array	&$pks	Ids of the items to delete.
  *
  * @return	boolean	True on success.
  */
 public function delete(&$pks)
 {
     if (!count($pks)) {
         return true;
     }
     if (!parent::delete($pks)) {
         return false;
     }
     return true;
 }
Exemplo n.º 2
0
 /**
  * Method to delete item(s).
  *
  * @access	public
  * @param	array	&$pks	Ids of the items to delete.
  *
  * @return	boolean	True on success.
  */
 public function delete(&$pks)
 {
     if (!count($pks)) {
         return true;
     }
     //Integrity : delete the files associated to this deleted item
     if (!$this->deleteFiles($pks, array('manual' => 'delete', 'image' => 'delete'))) {
         JError::raiseWarning(1303, JText::_("DEMO120_ALERT_ERROR_ON_DELETE_FILES"));
         return false;
     }
     if (!parent::delete($pks)) {
         return false;
     }
     return true;
 }
Exemplo n.º 3
0
 /**
  * Method to delete item(s).
  *
  * @access	public
  * @param	array	&$pks	Ids of the items to delete.
  *
  * @return	boolean	True on success.
  */
 public function delete(&$pks)
 {
     if (!count($pks)) {
         return true;
     }
     if (!parent::delete($pks)) {
         return false;
     }
     //Integrity : Cascade delete in server on operating_system
     $model = CkJModel::getInstance('server', 'RtiprintModel');
     if (!$model->integrityDelete('operating_system', $pks)) {
         JError::raiseWarning(1301, JText::_("RTIPRINT_ALERT_ERROR_ON_CASCAD_DELETE"));
         return false;
     }
     return true;
 }