mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
Added local include directory
This commit is contained in:
parent
9b9324b120
commit
05ff27515b
17 changed files with 37 additions and 11 deletions
|
@ -34,6 +34,7 @@ define('LS_LIB_DIR', LS_INCLUDE_DIR .'libs/');
|
|||
define('LS_ADDONS_DIR', LS_INCLUDE_DIR .'addons/');
|
||||
define('LS_JS_DIR', LS_INCLUDE_DIR .'js/');
|
||||
define('LS_TMP_DIR', 'tmp/');
|
||||
define('LS_LOCAL_DIR', 'local/');
|
||||
|
||||
// Locale
|
||||
define('LS_TEXT_DOMAIN', 'ldapsaisie');
|
||||
|
|
1
public_html/css/local
Symbolic link
1
public_html/css/local
Symbolic link
|
@ -0,0 +1 @@
|
|||
../local/css/
|
1
public_html/images/local
Symbolic link
1
public_html/images/local
Symbolic link
|
@ -0,0 +1 @@
|
|||
../local/images/
|
|
@ -39,13 +39,17 @@ class LSconfig {
|
|||
* @retval boolean True si tout s'est bien passé, False sinon
|
||||
**/
|
||||
public static function start() {
|
||||
if (loadDir(LS_CONF_DIR, '^config\..*\.php$')) {
|
||||
if (is_array($GLOBALS['LSconfig'])) {
|
||||
self :: $data = $GLOBALS['LSconfig'];
|
||||
self :: $data['LSaddons'] = $GLOBALS['LSaddons'];
|
||||
return true;
|
||||
$files=array('config.inc.php','config.LSaddons.php');
|
||||
foreach($files as $file) {
|
||||
if (!LSsession::includeFile(LS_CONF_DIR.'/'.$file)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (is_array($GLOBALS['LSconfig'])) {
|
||||
self :: $data = $GLOBALS['LSconfig'];
|
||||
self :: $data['LSaddons'] = $GLOBALS['LSaddons'];
|
||||
return true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,10 @@ class LSsession {
|
|||
* @retval true si tout c'est bien passé, false sinon
|
||||
*/
|
||||
public static function includeFile($file) {
|
||||
if (!file_exists($file)) {
|
||||
if (file_exists(LS_LOCAL_DIR.'/'.$file)) {
|
||||
$file=LS_LOCAL_DIR.'/'.$file;
|
||||
}
|
||||
elseif (!file_exists($file)) {
|
||||
return;
|
||||
}
|
||||
if (defined('LSdebug') && constant('LSdebug')) {
|
||||
|
@ -385,11 +388,10 @@ class LSsession {
|
|||
bindtextdomain(LS_TEXT_DOMAIN, LS_I18N_DIR);
|
||||
textdomain(LS_TEXT_DOMAIN);
|
||||
|
||||
if (is_file(LS_I18N_DIR.'/'.$lang.'/lang.php')) {
|
||||
include(LS_I18N_DIR.'/'.$lang.'/lang.php');
|
||||
}
|
||||
foreach (listFiles(LS_I18N_DIR.'/'.$lang,'/^lang.+\.php$/') as $file) {
|
||||
include(LS_I18N_DIR."/$lang/$file");
|
||||
self :: includeFile(LS_I18N_DIR.'/'.$lang.'/lang.php');
|
||||
|
||||
foreach (listFiles(LS_LOCAL_DIR.'/'.LS_I18N_DIR.'/'.$lang,'/^lang.+\.php$/') as $file) {
|
||||
include(LS_LOCAL_DIR.'/'.LS_I18N_DIR."/$lang/$file");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
1
public_html/local/.gitignore
vendored
Normal file
1
public_html/local/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
1
public_html/local/conf/.gitignore
vendored
Normal file
1
public_html/local/conf/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
1
public_html/local/conf/LSobjects/.gitignore
vendored
Normal file
1
public_html/local/conf/LSobjects/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
2
public_html/local/css/.gitignore
vendored
Normal file
2
public_html/local/css/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
2
public_html/local/images/.gitignore
vendored
Normal file
2
public_html/local/images/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
1
public_html/local/includes/.gitignore
vendored
Normal file
1
public_html/local/includes/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
1
public_html/local/includes/addons/.gitignore
vendored
Normal file
1
public_html/local/includes/addons/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
1
public_html/local/includes/class/.gitignore
vendored
Normal file
1
public_html/local/includes/class/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.php
|
2
public_html/local/includes/libs/.gitignore
vendored
Normal file
2
public_html/local/includes/libs/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
2
public_html/local/lang/.gitignore
vendored
Normal file
2
public_html/local/lang/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
2
public_html/local/templates/.gitignore
vendored
Normal file
2
public_html/local/templates/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
1
public_html/templates/local
Symbolic link
1
public_html/templates/local
Symbolic link
|
@ -0,0 +1 @@
|
|||
../local/templates/
|
Loading…
Reference in a new issue