Your IP : 216.73.216.240
<?php
/**
* @version 2.0.0
* @package com_jhackguard
* @copyright Copyright (C) 2013. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Valeri Markov <val@jhackguard.com> - http://www.jhackguard.com/
*/
// No direct access.
defined('_JEXEC') or die;
jimport('joomla.application.component.controlleradmin');
/**
* Inputfilters list controller class.
*/
class JhackguardControllerInputfilters extends JControllerAdmin
{
/**
* Proxy for getModel.
* @since 1.6
*/
public function getModel($name = 'inputfilter', $prefix = 'JhackguardModel',$config=array())
{
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
return $model;
}
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");
}
}
/**
* Method to save the submitted ordering values for records via AJAX.
*
* @return void
*
* @since 3.0
*/
public function saveOrderAjax()
{
// Get the input
$input = JFactory::getApplication()->input;
$pks = $input->post->get('cid', array(), 'array');
$order = $input->post->get('order', array(), 'array');
// Sanitize the input
JArrayHelper::toInteger($pks);
JArrayHelper::toInteger($order);
// Get the model
$model = $this->getModel();
// Save the ordering
$return = $model->saveorder($pks, $order);
if ($return)
{
echo "1";
}
// Close the application
JFactory::getApplication()->close();
}
}