<?php

	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
	include_once( PLOG_CLASS_PATH."plugins/textparser/class/view/adminplugintextparsersettingsview.class.php" );
	
	/**
	 * shows a form with the current configuration
	 */
	class AdminPluginTextParserSettingsAction extends AdminAction
	{
		
		function AdminPluginTextParserSettingsAction( $actionInfo, $request )
		{
			$this->AdminAction( $actionInfo, $request );
		}
		
		function perform()
		{
			// load some configuration settings
			$blogSettings = $this->_blogInfo->getSettings();
			$pluginEnabled = $blogSettings->getValue( "plugin_textparser_enabled" );
			$filter = $blogSettings->getValue( "plugin_textparser_filter" );
			if( $filter == "" ) $filter = PLUGIN_TEXTPARSER_FILTER_WIKI;
			
			// create a view and export the settings to the template
			$this->_view = new AdminPluginTextParserSettingsView( $this->_blogInfo );
			$this->_view->setValue( "pluginEnabled", $pluginEnabled );
			$this->_view->setValue( "filter", $filter );
			
			$this->setCommonData();
			
			return true;
		}
	}
?>