- optim dont include a php file if not required
- eng lang small change - remove link to unexisting admin css git-svn-id: http://piwigo.org/svn/trunk@2476 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
9824cbbc5f
commit
06df392005
5 changed files with 18 additions and 22 deletions
|
@ -189,14 +189,14 @@ if (is_a_guest())
|
|||
// template instance
|
||||
if
|
||||
(
|
||||
defined('IN_ADMIN') and IN_ADMIN
|
||||
defined('IN_ADMIN') and IN_ADMIN
|
||||
)
|
||||
{
|
||||
// Admin template
|
||||
//$template = new Template(PHPWG_ROOT_PATH.'template/'.$user['admin_template'], $user['admin_theme'] );
|
||||
list($user['admin_template'], $user['admin_theme']) =
|
||||
explode ('/', $conf['admin_layout']);
|
||||
$template = new Template(PHPWG_ROOT_PATH.'admin/template/'
|
||||
$template = new Template(PHPWG_ROOT_PATH.'admin/template/'
|
||||
. $user['admin_template'], $user['admin_theme'] );
|
||||
}
|
||||
else
|
||||
|
@ -263,7 +263,6 @@ if (count($header_msgs) > 0)
|
|||
|
||||
if (!empty($conf['filter_pages']) and get_filter_page_value('used'))
|
||||
{
|
||||
include(PHPWG_ROOT_PATH.'include/functions_filter.inc.php');
|
||||
include(PHPWG_ROOT_PATH.'include/filter.inc.php');
|
||||
}
|
||||
else
|
||||
|
|
|
@ -126,6 +126,7 @@ WHERE ';
|
|||
{
|
||||
$header_notes[] = l10n_dec('note_filter_day', 'note_filter_days', $filter['recent_period']);
|
||||
}
|
||||
include_once(PHPWG_ROOT_PATH.'include/functions_filter.inc.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -145,7 +145,7 @@ class Template {
|
|||
*/
|
||||
function set_filenames($filename_array)
|
||||
{
|
||||
global $conf;
|
||||
global $conf;
|
||||
if (!is_array($filename_array))
|
||||
{
|
||||
return false;
|
||||
|
@ -159,16 +159,16 @@ class Template {
|
|||
unset( $this->files[$handle] );
|
||||
else
|
||||
{
|
||||
if (!isset($this->files[$handle])) $this->files[$handle] = $filename;
|
||||
$this->files[$handle] = $filename;
|
||||
foreach ($tpl_extension as $file => $conditions)
|
||||
{
|
||||
$localtpl = './template-extension/' . $file;
|
||||
if ($handle == $conditions[0] and
|
||||
(stripos(implode('/',array_flip($_GET)),$conditions[1])>0
|
||||
if ($handle == $conditions[0] and
|
||||
(stripos(implode('/',array_flip($_GET)),$conditions[1])>0
|
||||
or $conditions[1] == 'N/A')
|
||||
and file_exists($localtpl))
|
||||
{ /* examples: Are best_rated, created-monthly-calendar, list, ... set? */
|
||||
$this->files[$handle] = '../.' . $localtpl;
|
||||
$this->files[$handle] = '../.' . $localtpl;
|
||||
/* assign their tpl-extension */
|
||||
}
|
||||
}
|
||||
|
@ -176,10 +176,7 @@ class Template {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
function on_extension($key, $tlpname)
|
||||
{
|
||||
return $tplname;
|
||||
}
|
||||
|
||||
/** see smarty assign http://www.smarty.net/manual/en/api.assign.php */
|
||||
function assign($tpl_var, $value = null)
|
||||
{
|
||||
|
@ -256,14 +253,14 @@ class Template {
|
|||
$save_compile_id = $this->smarty->compile_id;
|
||||
$this->smarty->compile_id .= '.'.$lang_info['code'];
|
||||
}
|
||||
|
||||
|
||||
$v = $this->smarty->fetch($this->files[$handle], null, null, false);
|
||||
|
||||
|
||||
if (isset ($save_compile_id) )
|
||||
{
|
||||
$this->smarty->compile_id = $save_compile_id;
|
||||
}
|
||||
|
||||
|
||||
if ($return)
|
||||
{
|
||||
return $v;
|
||||
|
@ -335,12 +332,12 @@ class Template {
|
|||
{
|
||||
return explode($delimiter, $text);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This smarty "html_head" block allows to add content just before
|
||||
* </head> element in the output after the head has been parsed. This is
|
||||
* handy in order to respect strict standards when <style> and <link>
|
||||
* html elements must appear in the <head> element
|
||||
* html elements must appear in the <head> element
|
||||
*/
|
||||
function block_html_head($params, $content, &$smarty, &$repeat)
|
||||
{
|
||||
|
@ -357,9 +354,9 @@ class Template {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Smarty prefilter to allow caching (whenever possible) language strings
|
||||
* Smarty prefilter to allow caching (whenever possible) language strings
|
||||
* from templates.
|
||||
*/
|
||||
function prefilter_language($source, &$smarty)
|
||||
|
@ -367,7 +364,7 @@ class Template {
|
|||
global $lang;
|
||||
$ldq = preg_quote($this->smarty->left_delimiter, '~');
|
||||
$rdq = preg_quote($this->smarty->right_delimiter, '~');
|
||||
|
||||
|
||||
$regex = "~$ldq *\'([^'$]+)\'\|@translate *$rdq~";
|
||||
$source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? $lang[\'$1\'] : \'$0\'', $source);
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ $lang['Close this window'] = 'Close this window';
|
|||
$lang['Complete RSS feed'] = 'Complete RSS feed (images, comments)';
|
||||
$lang['Confirm Password'] = 'Confirm Password';
|
||||
$lang['Connection settings'] = 'Connection settings';
|
||||
$lang['Connection'] = 'Connection';
|
||||
$lang['Connection'] = 'Login';
|
||||
$lang['Contact webmaster'] = 'Contact webmaster';
|
||||
$lang['Create a new account'] = 'Create a new account';
|
||||
$lang['Created on'] = 'Created on';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id$ */
|
||||
@import "admin/default-layout.css";
|
||||
BODY {
|
||||
margin: 5px;
|
||||
padding: 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue