Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (33 sloc) 1.243 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
<?php
/**
* Bootstrap for admin interface.
*
* This is the same as the public interface bootstrap, except it defines an
* ADMIN constant and sets an 'admin' parameter in the web request to ensure
* that Omeka loads the correct view scripts (and any other theme-specific
* behavior).
*
* @copyright Roy Rosenzweig Center for History and New Media, 2007-2011
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @package Omeka
* @access private
*/

// Flag this as the admin theme. Used by _define_web_root() function in paths.php.
define('ADMIN', true);

// Define the directory and web paths.
include dirname(dirname(__FILE__)) . '/paths.php';

// Define the admin theme directory path.
define('THEME_DIR', ADMIN_THEME_DIR);

$application = new Omeka_Application(APPLICATION_ENV);
// Configure the Theme bootstrap resource with the correct paths/URLs.
$application->getBootstrap()->setOptions(array(
    'resources' => array(
        'theme' => array(
            'basePath' => THEME_DIR,
            'webBasePath' => WEB_THEME
        )
    )
));

// This is used by the global is_admin_theme to detect that this is the admin.
Zend_Controller_Front::getInstance()->setParam('admin', true);

$application->initialize()->run();
Something went wrong with that request. Please try again.