Move more from base init to separate functions
This commit is contained in:
parent
3a4521a012
commit
a7438189f3
64
lib/base.php
64
lib/base.php
|
@ -229,6 +229,39 @@ class OC{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function initTemplateEngine() {
|
||||||
|
// if the formfactor is not yet autodetected do the autodetection now. For possible forfactors check the detectFormfactor documentation
|
||||||
|
if(!isset($_SESSION['formfactor'])){
|
||||||
|
$_SESSION['formfactor']=OC::detectFormfactor();
|
||||||
|
}
|
||||||
|
// allow manual override via GET parameter
|
||||||
|
if(isset($_GET['formfactor'])){
|
||||||
|
$_SESSION['formfactor']=$_GET['formfactor'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the stuff we need always
|
||||||
|
OC_Util::addScript( "jquery-1.6.4.min" );
|
||||||
|
OC_Util::addScript( "jquery-ui-1.8.16.custom.min" );
|
||||||
|
OC_Util::addScript( "jquery-showpassword" );
|
||||||
|
OC_Util::addScript( "jquery.infieldlabel.min" );
|
||||||
|
OC_Util::addScript( "jquery-tipsy" );
|
||||||
|
OC_Util::addScript( "oc-dialogs" );
|
||||||
|
OC_Util::addScript( "js" );
|
||||||
|
OC_Util::addScript( "eventsource" );
|
||||||
|
OC_Util::addScript( "config" );
|
||||||
|
//OC_Util::addScript( "multiselect" );
|
||||||
|
OC_Util::addScript('search','result');
|
||||||
|
OC_Util::addStyle( "styles" );
|
||||||
|
OC_Util::addStyle( "multiselect" );
|
||||||
|
OC_Util::addStyle( "jquery-ui-1.8.16.custom" );
|
||||||
|
OC_Util::addStyle( "jquery-tipsy" );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function initSession() {
|
||||||
|
ini_set('session.cookie_httponly','1;');
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
public static function init(){
|
public static function init(){
|
||||||
// register autoloader
|
// register autoloader
|
||||||
spl_autoload_register(array('OC','autoload'));
|
spl_autoload_register(array('OC','autoload'));
|
||||||
|
@ -272,35 +305,8 @@ class OC{
|
||||||
self::checkSSL();
|
self::checkSSL();
|
||||||
self::checkUpgrade();
|
self::checkUpgrade();
|
||||||
|
|
||||||
ini_set('session.cookie_httponly','1;');
|
self::initSession();
|
||||||
session_start();
|
self::initTemplateEngine();
|
||||||
|
|
||||||
// if the formfactor is not yet autodetected do the autodetection now. For possible forfactors check the detectFormfactor documentation
|
|
||||||
if(!isset($_SESSION['formfactor'])){
|
|
||||||
$_SESSION['formfactor']=OC::detectFormfactor();
|
|
||||||
}
|
|
||||||
// allow manual override via GET parameter
|
|
||||||
if(isset($_GET['formfactor'])){
|
|
||||||
$_SESSION['formfactor']=$_GET['formfactor'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Add the stuff we need always
|
|
||||||
OC_Util::addScript( "jquery-1.6.4.min" );
|
|
||||||
OC_Util::addScript( "jquery-ui-1.8.16.custom.min" );
|
|
||||||
OC_Util::addScript( "jquery-showpassword" );
|
|
||||||
OC_Util::addScript( "jquery.infieldlabel.min" );
|
|
||||||
OC_Util::addScript( "jquery-tipsy" );
|
|
||||||
OC_Util::addScript( "oc-dialogs" );
|
|
||||||
OC_Util::addScript( "js" );
|
|
||||||
OC_Util::addScript( "eventsource" );
|
|
||||||
OC_Util::addScript( "config" );
|
|
||||||
//OC_Util::addScript( "multiselect" );
|
|
||||||
OC_Util::addScript('search','result');
|
|
||||||
OC_Util::addStyle( "styles" );
|
|
||||||
OC_Util::addStyle( "multiselect" );
|
|
||||||
OC_Util::addStyle( "jquery-ui-1.8.16.custom" );
|
|
||||||
OC_Util::addStyle( "jquery-tipsy" );
|
|
||||||
|
|
||||||
$errors=OC_Util::checkServer();
|
$errors=OC_Util::checkServer();
|
||||||
if(count($errors)>0) {
|
if(count($errors)>0) {
|
||||||
|
|
Loading…
Reference in New Issue