diff options
author | rub <rub@piwigo.org> | 2007-01-23 22:03:06 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-01-23 22:03:06 +0000 |
commit | e0ef6f5e07e3217a42323568750282b9c3aadb34 (patch) | |
tree | aa53a888df29f95fdd733a1f9ef38ca0ceb62bfc /include | |
parent | 21e201f91b42568d820e91b268b7c5dba69e54fd (diff) |
Undo r1677 functions_html.inc.php, because links are wrong.
I wanted to add flat_cat on categories url, but I will keep same comportment of the calendar.
Some improvements when updating #_config table
git-svn-id: http://piwigo.org/svn/trunk@1748 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-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>'; |