Location: PHPKode > projects > Anahita Social Engine > admin/controllers/configuration.php
<?php
/**
* @version		1.0.0
* @package		Anahita Social Engine
* @copyright	Copyright (C) 2007 - 2010 rmd Studio Inc. and Peerglobe Technology Inc. All rights reserved.
* @license		GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
* @link 		http://www.anahitapolis.com
*/

class ComSocialengineControllerConfiguration extends ComSocialengineControllerDefault 
{		
	public function execute($action = null)
	{	
		if(!$action)
			$action = 'read';
			
		return parent::execute($action);
	}
	
	public function _actionRead()
	{
		KFactory::get('admin::com.socialengine.view.configuration.html')->display();
	}
	
	public function _actionSave()
	{
		$model = KFactory::get('admin::com.socialengine.model.configurations');
		
		$args = KRequest::get('post.params', 'string');	
		
		$params = array();
		foreach($args as $key=>$value)
			$params[] = $key.'='.$value;
		
		$params = implode("\n", $params);
		
		$model->saveParams($params);
		
		$msg = JText::_('AN-SE-CONFIG-SAVE-SUCCESS');
		
		$this->setRedirect('view=configuration', $msg);
	}
}
Return current item: Anahita Social Engine