Ignore:
Timestamp:
Jan 23, 2007, 11:03:06 PM (17 years ago)
Author:
rub
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r1727 r1748  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    10081008function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
    10091009{
    1010   return sprintf(l10n(($decimal > 1 ? $plural_fmt_key : 
     1010  return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
    10111011                                      $singular_fmt_key)), $decimal);
    10121012}
     
    10951095 * @return void
    10961096 */
    1097 function load_conf_from_db()
     1097function load_conf_from_db($condition = '')
    10981098{
    10991099  global $conf;
    11001100
    11011101  $query = '
    1102 SELECT param,value
     1102SELECT param, value
    11031103 FROM '.CONFIG_TABLE.'
     1104 '.(!empty($condition) ? 'WHERE '.$condition : '').'
    11041105;';
    11051106  $result = pwg_query($query);
    11061107
    1107   if (mysql_num_rows($result) == 0)
     1108  if ((mysql_num_rows($result) == 0) and !empty($condition))
    11081109  {
    11091110    die('No configuration data');
Note: See TracChangeset for help on using the changeset viewer.