Changeset 1748 for trunk/include/functions.inc.php
- Timestamp:
- Jan 23, 2007, 11:03:06 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r1727 r1748 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 4 // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | 5 // | Copyright (C) 2003-200 6PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | branch : BSF (Best So Far) … … 1008 1008 function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal) 1009 1009 { 1010 return sprintf(l10n(($decimal > 1 ? $plural_fmt_key : 1010 return sprintf(l10n(($decimal > 1 ? $plural_fmt_key : 1011 1011 $singular_fmt_key)), $decimal); 1012 1012 } … … 1095 1095 * @return void 1096 1096 */ 1097 function load_conf_from_db( )1097 function load_conf_from_db($condition = '') 1098 1098 { 1099 1099 global $conf; 1100 1100 1101 1101 $query = ' 1102 SELECT param, value1102 SELECT param, value 1103 1103 FROM '.CONFIG_TABLE.' 1104 '.(!empty($condition) ? 'WHERE '.$condition : '').' 1104 1105 ;'; 1105 1106 $result = pwg_query($query); 1106 1107 1107 if ( mysql_num_rows($result) == 0)1108 if ((mysql_num_rows($result) == 0) and !empty($condition)) 1108 1109 { 1109 1110 die('No configuration data');
Note: See TracChangeset
for help on using the changeset viewer.