Your IP : 216.73.216.240
<?php
/**
* @package FFGate
* @author Yves Hoppe <yves@compojoom.com>
* @date 26.11.13
*
* @copyright Copyright (C) 2008 - 2013 compojoom.com - Yves Hoppe. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.controllerform');
/**
* Class FFGateControllerSite
*
* @since 1.0.0
*/
class FFGateControllerSite extends JControllerForm
{
/**
* The constructor
*/
public function __construct()
{
parent::__construct();
$this->registerTask('unpublish', 'publish');
}
/**
* Publishs a site
*
* @return void
*/
public function publish()
{
$cid = JFactory::getApplication()->input->get('cid', array(), '', 'array');
if ($this->task == 'publish')
{
$publish = 1;
}
else
{
$publish = 0;
}
$msg = "";
$table = JTable::getInstance('sites', 'FFGateTable');
$table->publish($cid, $publish);
$link = 'index.php?option=com_ffgate&view=sites';
$this->setRedirect($link, $msg);
}
}