mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-22 08:23:49 +01:00
Fixed image.php initialization and remove unsed code
This commit is contained in:
parent
a56b1636ab
commit
89a46b0c75
3 changed files with 2 additions and 18 deletions
|
@ -21,7 +21,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
require_once 'core.php';
|
||||
if(LSsession :: startLSsession()) {
|
||||
if(LSsession :: initialize()) {
|
||||
if (isset($_GET['i'])) {
|
||||
$img_path=LStemplate :: getImagePath($_GET['i']);
|
||||
if (is_file($img_path)) {
|
||||
|
|
|
@ -133,7 +133,7 @@ class LSsession {
|
|||
*/
|
||||
private static function startLStemplate() {
|
||||
if ( self :: loadLSclass('LStemplate') ) {
|
||||
$res = LStemplate :: start(
|
||||
return LStemplate :: start(
|
||||
array(
|
||||
'smarty_path' => LSconfig :: get('Smarty'),
|
||||
'template_dir' => LS_TEMPLATES_DIR,
|
||||
|
@ -143,8 +143,6 @@ class LSsession {
|
|||
'debug_smarty' => (isset($_REQUEST['LStemplate_debug'])),
|
||||
)
|
||||
);
|
||||
self :: addJSconfigParam('LS_IMAGES_DIR',LStemplate :: getDefaultImageDirPath());
|
||||
return $res;
|
||||
}
|
||||
return False;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,6 @@ class LStemplate {
|
|||
}
|
||||
|
||||
self :: $_smarty -> assign('LS_CSS_DIR',LS_CSS_DIR);
|
||||
self :: $_smarty -> assign('LS_IMAGES_DIR',self :: getDefaultImageDirPath());
|
||||
|
||||
return True;
|
||||
}
|
||||
|
@ -148,19 +147,6 @@ class LStemplate {
|
|||
return $root_dir.'/'.$default_dir.'/'.$file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default path of images directory
|
||||
*
|
||||
* @retval string The path of the file
|
||||
**/
|
||||
public static function getDefaultImageDirPath() {
|
||||
if (is_dir(self :: $config['image_dir'].'/'.LS_THEME)) {
|
||||
return self :: $config['image_dir'].'/'.LS_THEME;
|
||||
}
|
||||
return self :: $config['image_dir'].'/default';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the path of the image file to use
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue