From 89a46b0c751e778244a4151a563790c173136ab4 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 19 Jun 2013 03:00:58 +0200 Subject: [PATCH] Fixed image.php initialization and remove unsed code --- public_html/image.php | 2 +- public_html/includes/class/class.LSsession.php | 4 +--- public_html/includes/class/class.LStemplate.php | 14 -------------- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/public_html/image.php b/public_html/image.php index eaf01da8..173bb523 100644 --- a/public_html/image.php +++ b/public_html/image.php @@ -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)) { diff --git a/public_html/includes/class/class.LSsession.php b/public_html/includes/class/class.LSsession.php index 4ad5c514..f798dc7f 100644 --- a/public_html/includes/class/class.LSsession.php +++ b/public_html/includes/class/class.LSsession.php @@ -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; } diff --git a/public_html/includes/class/class.LStemplate.php b/public_html/includes/class/class.LStemplate.php index 29354269..669cf937 100644 --- a/public_html/includes/class/class.LStemplate.php +++ b/public_html/includes/class/class.LStemplate.php @@ -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 *