本文整理汇总了PHP中JControllerAdmin::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP JControllerAdmin::delete方法的具体用法?PHP JControllerAdmin::delete怎么用?PHP JControllerAdmin::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JControllerAdmin
的用法示例。
在下文中一共展示了JControllerAdmin::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
parent::delete();
$this->input = $this->input->post->get('trieda_id', 0, 'int');
$this->setRedirect(JRoute::_('index.php?option=com_absolventi&view=ziacilist&trieda_id=' . $this->input, false));
$this->redirect;
}
示例2: delete
public function delete()
{
// Get items to remove from the request and reverse the order to delete child albums first
$cid = JFactory::getApplication()->input->get('cid', array(), 'array');
JFactory::getApplication()->input->set('cid', array_reverse($cid));
parent::delete();
}
示例3: delete
public function delete()
{
/*
* получаем имя файла из записи по ID
* удаляем файл
* выполняем родительский метод
*/
$cid = JFactory::getApplication()->input->get('cid', array(), 'array');
if (is_array($cid) && count($cid) > 0) {
$arFilesToDelete = array();
foreach ($cid as $id) {
$db = JFactory::getDBO();
$q = "SELECT `id`, `filename` FROM #__downfiles WHERE id = {$id}";
$res = $db->setQuery($q);
$data_row = $res->loadAssoc();
$arFilesToDelete[] = $data_row["filename"];
}
jimport('joomla.filesystem.file');
foreach ($arFilesToDelete as $fname) {
JFile::delete(JPATH_ROOT . '/' . $fname);
}
} else {
JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror');
}
parent::delete();
}
示例4: delete
function delete()
{
$cid = JRequest::getVar('cid', array(), '', 'array');
if (!igGeneralHelper::authorise('core.delete', (int) $cid[0])) {
return JError::raiseWarning(404, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
}
parent::delete();
}
示例5: delete
/**
* Removes an item.
*
* Overrides JControllerAdmin::delete to check the core.admin permission.
*
* @since 1.6
*/
function delete()
{
if (!User::authorise('core.admin', $this->option)) {
App::abort(500, Lang::txt('JERROR_ALERTNOAUTHOR'));
exit;
}
return parent::delete();
}
示例6: delete
/**
* Removes an item.
*
* Overrides JControllerAdmin::delete to check the core.admin permission.
*
* @since 1.6
*/
public function delete()
{
if (!JFactory::getUser()->authorise('core.admin', $this->option)) {
JError::raiseError(500, JText::_('JERROR_ALERTNOAUTHOR'));
jexit();
}
return parent::delete();
}
示例7: delete
/**
* Removes an item.
*
* Overrides JControllerAdmin::delete to check the core.admin permission.
*
* @since 1.6
*/
public function delete()
{
if (!JFactory::getUser()->authorise('core.admin', $this->option)) {
throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'));
jexit();
}
return parent::delete();
}
示例8: delete
/**
* Removes an item.
*
* @return void
*/
public function delete()
{
parent::delete();
$project = JRequest::getUInt('filter_project');
$topic = JRequest::getUInt('filter_topic');
$link = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&filter_project=' . $project . '&filter_topic=' . $topic;
$this->setRedirect(JRoute::_($link, false));
}
示例9: delete
public function delete()
{
parent::delete();
if (!$this->getError()) {
$app = JFactory::getApplication();
$link = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&filter_project=' . (int) $app->input->get('filter_project') . '&filter_album=' . (int) $app->input->get('filter_album') . '&id=' . (int) $app->input->get('id') . '&revision=' . (int) $app->input->get('revision');
$this->setRedirect(JRoute::_($link, false));
return true;
}
return false;
}
示例10: deletehard
public function deletehard()
{
$cid = JRequest::getString('cid', '');
$cid = explode(',', $cid);
if (count($cid)) {
JRequest::setVar('cid', $cid, 'post');
$token = JRequest::getVar(JSession::getFormToken());
JRequest::setVar(JSession::getFormToken(), $token, 'post');
parent::delete();
}
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));
}
示例11: delete
/**
* Change the standard behavior after deleting
*
* @since 1.0
*/
public function delete()
{
// Workaround for wrong foreign key. Removing all of entries from sub_list before removing list itself
$cids = (array) JRequest::getVar('cid', array());
if (!empty($cids)) {
$dbo = JFactory::getDbo();
$dbo->setQuery("DELETE FROM #__newsletter_sub_list WHERE list_id in ('" . implode("','", $cids) . "')");
$dbo->query();
}
parent::delete();
$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=subscribers', false));
}
示例12: delete
function delete()
{
$cid = JRequest::getVar('cid', array(), '', 'array');
JArrayHelper::toInteger($cid);
JRequest::setVar('cid', $cid, 'post');
JFactory::getApplication()->input->post->set('cid', $cid);
JRequest::setVar(JRequest::getCmd('formtoken'), 1, 'post');
JFactory::getApplication()->input->post->set(JRequest::getCmd('formtoken'), 1);
if (!igGeneralHelper::authorise('core.igalleryfront.delete', (int) $cid[0])) {
return JError::raiseWarning(404, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
}
parent::delete();
}
示例13: delete
/**
* Redirection after standard saving
*
* @return void
* @since 1.0
*/
public function delete()
{
$jform = JRequest::getVar('jform');
if ($jform['general_mailbox_default'] > 0) {
JRequest::setVar('cid', $jform['general_mailbox_default']);
parent::delete();
} else {
JFactory::getApplication()->enqueueMessage(JText::_('COM_NEWSLETTER_CANNOT_DELETE_JPROFILE'), 'error');
}
$rurl = JRequest::getString('returnurl');
if (!empty($rurl)) {
$this->setRedirect(base64_decode($rurl));
}
}
示例14: delete
public function delete()
{
$app = JFactory::getApplication();
$cid = $app->input->get('cid', array(), 'array');
if (!empty($cid)) {
$db = JFactory::getDbo();
$query = "SELECT COUNT(*) FROM #__judirectory_criterias_values WHERE criteria_id IN(" . implode(',', $cid) . ")";
$db->setQuery($query);
$result = $db->loadResult();
if ($result) {
JError::raiseNotice(500, "Please Rebuild rating !");
}
}
parent::delete();
}
示例15: delete
function delete()
{
if (!igGeneralHelper::authorise('core.admin')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
if (!igGeneralHelper::authorise('core.delete')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
$model = $this->getModel();
if (!$model->checkAssigned()) {
$this->setRedirect('index.php?option=com_igallery&view=profiles');
return;
}
parent::delete();
}