mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
very small improvements:
- mass_inserts does not requires keys to start at 0 - recent_cats categories are sorted by global_rank (consistency) - removed warning from page_header.php (when included from redirect) - added 2 template functions for plugins (get_var and concat_var) - removed unused code from profile.php - changed css width for tag selection (search page) from 55em to almost 100% git-svn-id: http://piwigo.org/svn/trunk@1719 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+30
-3
@@ -2,10 +2,10 @@
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | PhpWebGallery - a PHP based picture gallery |
|
||||
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | branch : BSF (Best So Far)
|
||||
// | file : $RCSfile$
|
||||
// | file : $Id$
|
||||
// | last update : $Date$
|
||||
// | last modifier : $Author$
|
||||
// | revision : $Revision$
|
||||
@@ -293,10 +293,37 @@ class Template {
|
||||
function assign_var($varname, $varval)
|
||||
{
|
||||
$this->_tpldata['.'][0][$varname] = $varval;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Root-level variable concatenation. Appends a string to an existing
|
||||
* variable assignment with the same name.
|
||||
*/
|
||||
function concat_var($varname, $varval)
|
||||
{
|
||||
if ( isset($this->_tpldata['.'][0][$varname]) )
|
||||
{
|
||||
$this->_tpldata['.'][0][$varname] .= $varval;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tpldata['.'][0][$varname] = $varval;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a root-level variable value
|
||||
*/
|
||||
function get_var($varname, $default=null)
|
||||
{
|
||||
if ( isset($this->_tpldata['.'][0][$varname]) )
|
||||
{
|
||||
return $this->_tpldata['.'][0][$varname];
|
||||
}
|
||||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a full path+filename for the given filename, which can either
|
||||
|
||||
Reference in New Issue
Block a user