V 3.5 RC 1

This commit is contained in:
Romain Neutron
2011-12-05 00:23:28 +01:00
parent 6f1ee368aa
commit 4c5b7eb658
5563 changed files with 466984 additions and 985416 deletions

View File

@@ -1,55 +1,19 @@
<?php
define('__DIR__', dirname(__FILE__));
define('__CUSTOMDIR__', dirname(dirname(__FILE__)).'/config' );
function phrasea_autoload($class_name)
{
if(file_exists(__CUSTOMDIR__ . '/classes/'.str_replace('_','/',$class_name).'.class.php' ))
{
require_once __CUSTOMDIR__ . '/classes/'.str_replace('_','/',$class_name).'.class.php';
}
elseif(file_exists(__DIR__ . '/classes/'.str_replace('_','/',$class_name).'.class.php'))
{
require_once __DIR__ . '/classes/'.str_replace('_','/',$class_name).'.class.php';
}
}
require_once __DIR__ . '/version.inc';
require_once __DIR__ . '/../config/_GV.php';
require_once __DIR__ . '/classes/Twig/Autoloader.php';
spl_autoload_register('phrasea_autoload');
Twig_Autoloader::register();
session::getInstance();
phrasea::start();
user::detectlanguage();
$session = session::getInstance();
if(!isset($session->locale) || !$session->isset_cookie('locale') || $session->get_cookie('locale') !== $session->locale)
{
$avLanguages = user::detectlanguage($session->isset_cookie('locale') ? $session->get_cookie('locale') : null);
}
if(defined('GV_timezone'))
date_default_timezone_set(GV_timezone);
if(isset($session->ses_id) && isset($session->usr_id))
{
phrasea_open_session($session->ses_id, $session->usr_id);
}
mb_internal_encoding("UTF-8");
define('USE_MINIFY_CSS', true);
define('USE_MINIFY_JS', true);
define('JETON_MAKE_SUBDEF', 0x01);
define('JETON_WRITE_META_DOC', 0x02);
define('JETON_WRITE_META_SUBDEF', 0x04);
define('JETON_WRITE_META', 0x06);
define('JETON_READ_META_DOC', 0x08);
define('JETON_READ_META_DOC_MAKE_SUBDEF', 0x10);
phrasea::use_i18n();
phrasea::load_events();
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
require_once dirname(__FILE__) . '/classes/bootstrap.class.php';
bootstrap::execute();