<?php
/**
* Joomla! 1.5 component injooosm
*
* @version $Id: config.php 2009-11-22 14:03:00$
* @author Christian Knorr
* @package injooosm
* @subpackage backend
* @license GNU/GPL
* @filesource
*
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport( 'joomla.application.component.controller' );
require_once( JPATH_COMPONENT.DS.'helpers'.DS.'helper.php' );
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_petcare'.DS.'tables');
/**
* Controller Class Configuration
*/
class injooosmControllerConfig extends injooosmController {
/**
*
*/
function display()
{
parent::display();
}
/**
*
* @global object $mainframe
* @uses injooosmModelConfigat::saveConfig
* @return redirect
*/
function saveconfig() {
global $mainframe;
// check the token
JRequest::checkToken() or die( 'Invalid Token' );
$model = $this->getModel('config');
$model->saveConfig();
$link = JRoute::_( "index.php?option=com_injooosm&task=config&controller=config",false);
$this->setRedirect($link, JText::_('OSM_CONFIG_SAVED'));
}
/**
*
* @global object $mainframe
* @return boolean
*/
function installClean() {
global $mainframe;
$model = $this->getModel('config');
if(!$model->installCleanDB()) {
return false;
} else {
return true;
}
}
/**
*
* @global object $mainframe
* @return boolean
*/
function installUpdate() {
global $mainframe;
$model = $this->getModel('config');
if(!$model->updateDB()) {
return false;
} else {
return true;
}
}
}