<?php
/**
 * @author     Thomas Meyer
 * @licence    http://creativecommons.org/licenses/by-nc-sa/2.5/
 * @package    yana
 * @subpackage plugins
 */

/**
 * @access     public
 * @package    yana
 * @subpackage plugins
 */
class plugin_rss_admin extends plugin
{
    /* private smlfile */ var $file;

    /* constructor */ function plugin_rss_admin($name) 
    {
        settype($name,"string");        
        global $YANA;
        $this->name = $name;
        $this->file = $YANA->registry->files['config'];
    }

    function _default($event, $ARGS) 
    {
        settype($event, "string");
        settype($ARGS, "array");
        return true;
    }

    function get_rss_to_html_config($ARGS)
    {
        settype($ARGS, "array");
        global $YANA;
        $YANA->setVar("ID",((!empty($ARGS['id'])) ? $ARGS['id'] : ""));
        return true;
    }

    function set_rss_to_html_config($ARGS)
    {
        settype($ARGS, "array");
        global $YANA;
        if ($ARGS['rss/file'] && !file_exists($ARGS['rss/file'])) {
            return false;
        } else {
            return $YANA->handle(((empty($ARGS['id'])) ? 'set_config_default' : 'set_config_profile'), $ARGS);
        }
    }

}

// © 2006, Thomas Meyer www.All-Community.de
// Copyright Hinweis nicht entfernen!
?>