<?php

    lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );

    class PluginTrash extends PluginBase
    {
        function PluginTrash( $source = "" )
        {
            $this->PluginBase($source);
            $this->id = "trash";
            $this->desc = "This plugin allows the post owner to remove deleted posts permanently";
            $this->author = "Ahmad Fathi Saleh (Al Bawaba Team)";
            $this->locale = "locale_en_UK";
            $this->version = "20080125";
            if( "admin" == $source ) {
                $this->adminInit();
            }
        }
        
        /**
         * init admin actions
         */
        function adminInit()
        {
            
            $this->registerAdminAction( "viewTrash", "AdminViewTrashAction" );
            $this->registerAdminAction( "emptyTrash", "AdminEmptyTrashAction" );

            $menu =& Menu::getMenu();
            if( $menu->entryExists( "/menu/Manage/managePosts" ) ) {
                $this->addMenuEntry( "/menu/Manage/managePosts", "trash",
                                     "admin.php?op=viewTrash", null, array(),
                                     array("view_posts", "add_post", "update_post"), false);
            }
        }
    }
?>