Seditio Source
Root |
./othercms/ips_4.3.4/applications/gallery/modules/admin/gallery/categories.php
<?php
/**
 * @brief        Categories
 * @author        <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
 * @copyright    (c) Invision Power Services, Inc.
 * @license        https://www.invisioncommunity.com/legal/standards/
 * @package        Invision Community
 * @subpackage    Gallery
 * @since        04 Mar 2014
 */

namespace IPS\gallery\modules\admin\gallery;

/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
   
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
    exit;
}

/**
 * Categories
 */
class _categories extends \IPS\Node\Controller
{
   
/**
     * Node Class
     */
   
protected $nodeClass = 'IPS\gallery\Category';
   
   
/**
     * Execute
     *
     * @return    void
     */
   
public function execute()
    {
        \
IPS\Dispatcher::i()->checkAcpPermission( 'categories_manage' );
       
parent::execute();
    }


    protected function
form()
    {
       
parent::form();

        if ( \
IPS\Request::i()->id )
        {
            \
IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('edit_category') . ': ' . \IPS\Output::i()->title;
        }
        else
        {
            \
IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('add_category');
        }
    }
}