******************************************************************************/
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)) {
*/
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,
'debug_smarty' => (isset($_REQUEST['LStemplate_debug'])),
)
);
- self :: addJSconfigParam('LS_IMAGES_DIR',LStemplate :: getDefaultImageDirPath());
- return $res;
}
return False;
}
}
self :: $_smarty -> assign('LS_CSS_DIR',LS_CSS_DIR);
- self :: $_smarty -> assign('LS_IMAGES_DIR',self :: getDefaultImageDirPath());
return True;
}
}
/**
- * 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
*
* @param[in] string $image The image name (eg: mail)