Changeset 1075 for trunk/include/common.inc.php
- Timestamp:
- Mar 10, 2006, 9:17:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r1070 r1075 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 5PhpWebGallery Team - http://phpwebgallery.net |5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | branch : BSF (Best So Far) … … 133 133 or die ( "Could not connect to database" ); 134 134 135 if ($conf['check_upgrade_feed']) 135 // 136 // Setup gallery wide options, if this fails then we output a CRITICAL_ERROR 137 // since basic gallery information is not available 138 // 139 $query = ' 140 SELECT param,value 141 FROM '.CONFIG_TABLE.' 142 ;'; 143 if (!($result = pwg_query($query))) 144 { 145 die("Could not query config information"); 146 } 147 148 while ( $row =mysql_fetch_array( $result ) ) 149 { 150 if ( isset( $row['value'] ) ) 151 { 152 $conf[$row['param']] = $row['value']; 153 } 154 else 155 { 156 $conf[$row['param']] = ''; 157 } 158 // If the field is true or false, the variable is transformed into a 159 // boolean value. 160 if ( $conf[$row['param']] == 'true' or $conf[$row['param']] == 'false' ) 161 { 162 $conf[$row['param']] = get_boolean( $conf[$row['param']] ); 163 } 164 } 165 166 include(PHPWG_ROOT_PATH.'include/user.inc.php'); 167 168 if (is_admin() and $conf['check_upgrade_feed']) 136 169 { 137 170 // retrieve already applied upgrades … … 158 191 } 159 192 160 //161 // Setup gallery wide options, if this fails then we output a CRITICAL_ERROR162 // since basic gallery information is not available163 //164 $query = '165 SELECT param,value166 FROM '.CONFIG_TABLE.'167 ;';168 if (!($result = pwg_query($query)))169 {170 die("Could not query config information");171 }172 173 while ( $row =mysql_fetch_array( $result ) )174 {175 if ( isset( $row['value'] ) )176 {177 $conf[$row['param']] = $row['value'];178 }179 else180 {181 $conf[$row['param']] = '';182 }183 // If the field is true or false, the variable is transformed into a184 // boolean value.185 if ( $conf[$row['param']] == 'true' or $conf[$row['param']] == 'false' )186 {187 $conf[$row['param']] = get_boolean( $conf[$row['param']] );188 }189 }190 191 include(PHPWG_ROOT_PATH.'include/user.inc.php');192 193 193 // language files 194 194 include_once(get_language_filepath('common.lang.php'));
Note: See TracChangeset
for help on using the changeset viewer.