diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions.inc.php | 11 | ||||
-rw-r--r-- | include/functions_html.inc.php | 7 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index f6fc85871..9a791b21d 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) // | file : $Id$ @@ -1007,7 +1007,7 @@ function l10n($key) */ function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal) { - return sprintf(l10n(($decimal > 1 ? $plural_fmt_key : + return sprintf(l10n(($decimal > 1 ? $plural_fmt_key : $singular_fmt_key)), $decimal); } @@ -1094,17 +1094,18 @@ function get_available_upgrade_ids() * * @return void */ -function load_conf_from_db() +function load_conf_from_db($condition = '') { global $conf; $query = ' -SELECT param,value +SELECT param, value FROM '.CONFIG_TABLE.' + '.(!empty($condition) ? 'WHERE '.$condition : '').' ;'; $result = pwg_query($query); - if (mysql_num_rows($result) == 0) + if ((mysql_num_rows($result) == 0) and !empty($condition)) { die('No configuration data'); } diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index bb8861ba4..48c05ea06 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | 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) // | last update : $Date$ @@ -288,12 +288,11 @@ function get_cat_display_name($cat_informations, { $output.= '<a class=""'; $output.= ' href="' - .duplicate_index_url( + .make_index_url( array( 'category'=>$id, 'cat_name'=>$name - ), - array('start') + ) ) .'">'; $output.= $name.'</a>'; |