public function publish() { parent::publish(); if (!file_exists(JPATH_ADMINISTRATOR . '/components/com_jhackguard/data/.rules_need_update')) { file_put_contents(JPATH_ADMINISTRATOR . '/components/com_jhackguard/data/.rules_need_update', "1"); } }
public function publish() { parent::publish(); $extra_id = JFactory::getApplication()->input->get('extra_id', 0, 'int'); $extra_id_url = !empty($extra_id) ? '&extra_id=' . $extra_id : ''; $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $extra_id_url, false)); }
/** * Method to publish a list of items * * @return void */ public function publish() { parent::publish(); $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)); }
/** * Method to publish a list of records. * * Overrides JControllerAdmin::publish to check the core.admin permission. * * @since 1.6 */ public function publish() { if (!JFactory::getUser()->authorise('core.admin', $this->option)) { JError::raiseError(500, JText::_('JERROR_ALERTNOAUTHOR')); jexit(); } return parent::publish(); }
/** * Method to publish a list of records. * * Overrides JControllerAdmin::publish to check the core.admin permission. * * @since 1.6 */ public function publish() { if (!JFactory::getUser()->authorise('core.admin', $this->option)) { throw new Exception(JText::_('JERROR_ALERTNOAUTHOR')); jexit(); } return parent::publish(); }
/** * Method to publish a list of records. * * Overrides JControllerAdmin::publish to check the core.admin permission. * * @since 1.6 */ function publish() { if (!User::authorise('core.admin', $this->option)) { App::abort(500, Lang::txt('JERROR_ALERTNOAUTHOR')); exit; } return parent::publish(); }
public function publish() { parent::publish(); 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; }
function publish() { $cid = JRequest::getVar('cid', array(), '', 'array'); JArrayHelper::toInteger($cid); for ($i = 0; $i < count($cid); $i++) { if (!igGeneralHelper::authorise('core.edit.state', $cid[$i])) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } } parent::publish(); }
public function publish() { parent::publish(); $app = JFactory::getApplication(); $rootCat = JUDirectoryFrontHelperCategory::getRootCategory(); $cat_id = $app->input->getInt('cat_id', $rootCat->id); if ($app->input->getString('view', 'listcats') == 'treestructure') { $this->setRedirect("index.php?option=com_judirectory&view=treestructure"); } else { $this->setRedirect("index.php?option=com_judirectory&view=listcats&cat_id=" . $cat_id); } }
function publish() { $cid = JRequest::getVar('cid', array(), '', 'array'); JArrayHelper::toInteger($cid); JFactory::getApplication()->input->post->set('cid', $cid); JRequest::setVar('cid', $cid, 'post'); JFactory::getApplication()->input->post->set(JRequest::getCmd('formtoken'), 1); for ($i = 0; $i < count($cid); $i++) { if (!igGeneralHelper::authorise('core.igalleryfront.edit.state', $cid[$i])) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } } JRequest::setVar(JRequest::getCmd('formtoken'), 1, 'post'); parent::publish(); }
/** * function to publish a single file/multiple files * */ function publish() { parent::publish(); $this->setRedirect('index.php?option=com_eventgallery&view=files&folderid=' . JRequest::getVar('folderid') . $this->_anchor); }
public function publish() { $return = parent::publish(); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . '&context=' . $this->input->getCmd('context', 'com_content.article'), false)); return $return; }
/** * Method to publish a list of items * * @return void * */ public function publish() { global $jlistConfig; require_once JPATH_COMPONENT_SITE . '/helpers/jdownloadshelper.php'; // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // Get items to publish from the request. $cid = JFactory::getApplication()->input->get('cid', array(), 'array'); $data = array('publish' => 1, 'unpublish' => 0); $task = $this->getTask(); $state = JArrayHelper::getValue($data, $task, 0, 'int'); if (empty($cid)) { JLog::add(JText::_('JGLOBAL_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); $this->setRedirect(JRoute::_('index.php?option=com_jdownloads&view=downloads', false)); } else { if ($state == 1 && $jlistConfig['use.alphauserpoints']) { // load the model $model = $this->getModel(); foreach ($cid as $id) { // load the items data $item = $model->getItem($id); // add the AUP points JDHelper::setAUPPointsUploads($item->submitted_by, $item->file_title); } } parent::publish(); } }
public function publish() { $app = JFactory::getApplication(); $documentid = $app->input->post->get('documentid', array(), 'array'); $app->input->set('cid', $documentid); $_POST['cid'] = $documentid; parent::publish(); $rootCat = JUDownloadFrontHelperCategory::getRootCategory(); $cat_id = $app->input->getInt('cat_id', $rootCat->id); $this->setRedirect("index.php?option=com_judownload&view={$this->view_list}&cat_id={$cat_id}"); }
/** * set redirect after all functions. * */ public function publish() { parent::publish(); $this->setRedirectToSlides(); }
/** * Change the standard behavior after publishing * * @since 1.0 */ public function publish() { parent::publish(); $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=subscribers', false)); }
/** * Rebuild data on publish */ public function publish() { parent::publish(); CHPanelHelperData::buildDataObject(); }
/** * Method to (un)publish a template * * @access public * * @return boolean * * @since 1.1.0 */ public function publish() { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; // Check for request forgeries if (!JSession::checkToken()) { jexit(JText::_('JINVALID_TOKEN')); } // Get the selected template(s) $cid = $jinput->get('cid', array(0), 'post', 'array'); JArrayHelper::toInteger($cid); $db = JFactory::getDbo(); $query = $db->getQuery(true); // count selected standard templates $query->select($db->quoteName('standard')); $query->from($db->quoteName('#__bwpostman_templates')); $query->where($db->quoteName('id') . " IN (" . implode(",", $cid) . ")"); $query->where($db->quoteName('standard') . " = " . $db->quote(1)); $db->setQuery($query); $db->execute(); $count_std = $db->getNumRows(); // unpublish only, if no standard template is selected if ($count_std > 0 && $this->getTask() == 'unpublish') { $msg = $app->enqueueMessage(JText::_('COM_BWPOSTMAN_CANNOT_UNPUBLISH_STD_TPL'), 'error'); $link = JRoute::_('index.php?option=com_bwpostman&view=templates', false); $this->setRedirect($link, $msg); } else { parent::publish(); } }
public function publish() { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // Get items to publish from the request. $cid = JFactory::getApplication()->input->get('cid', array(), 'array'); $data = array('publish' => 1, 'unpublish' => 0, 'archive' => 2, 'trash' => -2, 'report' => -3); $task = $this->getTask(); $value = JArrayHelper::getValue($data, $task, 0, 'int'); $doParent = true; if ($task == 'trash' && !empty($cid)) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.id,a.ingredients_id, b.recipe_name FROM `#__akrecipes_recipe_ingredients` as a'); $query->join('LEFT', '#__akrecipes_recipe as b on a.recipe_id = b.id'); $query->where('a.ingredients_id IN ( ' . implode(", ", $cid) . ' )'); // Reset the query using our newly populated query object. $db->setQuery($query); // Load the results as a list of stdClass objects (see later for more options on retrieving data). $results = $db->loadObjectList(); error_log("Results -> " . print_r($results, true)); error_log("Results Count -> " . count($results)); if ($results && count($results) > 0) { $err_msg = "Cannot delete ingredient. It is used in - "; foreach ($results as $key => $row) { $err_msg = $err_msg . $row->recipe_name . ', '; } $this->setMessage($err_msg, 'warning'); $doParent = false; } } if ($doParent) { parent::publish(); } else { $extension = $this->input->get('extension'); $extensionURL = $extension ? '&extension=' . $extension : ''; $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $extensionURL, false)); } }
/** * Logic to publish categories * * @access public * @return void * @since 1.0 */ function publish() { if (FLEXI_J16GE) { parent::publish(); } else { self::changestate(1); } }
/** * Method to publish a list of newsletters. * * @return void * @since 1.0.1 */ function publish() { $jinput = JFactory::getApplication()->input; // Check for request forgeries if (!JSession::checkToken()) { jexit(JText::_('JINVALID_TOKEN')); } // Which tab are we in? $layout = $jinput->get('tab', 'sent'); // From which view do we come ? $view = $jinput->get('view', 'newsletters'); parent::publish(); if ($view == 'archive') { $this->setRedirect('index.php?option=com_bwpostman&view=archive&layout=newsletters'); } else { $this->setRedirect('index.php?option=com_bwpostman&view=newsletters&layout=' . $layout); } }
public function publish() { $app = JFactory::getApplication(); $data = array('publish' => 1, 'unpublish' => 0, 'archive' => 2, 'trash' => -2, 'report' => -3); $task = $this->getTask(); $new_status = JArrayHelper::getValue($data, $task, 0, 'int'); $cid = JRequest::getVar('cid', array(), '', 'array'); foreach ($cid as $id) { DJClassifiedsNotify::notifyUserPublication($id, $new_status); } $publish = parent::publish(); return $publish; }