Changeset 501
- Timestamp:
- 02/22/06 00:24:28 (7 years ago)
- File:
-
- 1 edited
-
bureau/class/variables.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bureau/class/variables.php
r499 r501 2 2 3 3 /* 4 * $Id: variables.php,v 1. 5 2005/01/18 23:01:32anarcat Exp $4 * $Id: variables.php,v 1.6 2005/01/18 23:24:31 anarcat Exp $ 5 5 ---------------------------------------------------------------------- 6 6 AlternC - Web Hosting System … … 44 44 global $db; 45 45 $result = $db->query('SELECT * FROM `variable`'); 46 while ($ variable = $db->next_record($result)) {46 while ($db->next_record($result)) { 47 47 /* maybe the data is *not* serialized, in that case, take it verbatim */ 48 $variable = $db->Record; 48 49 if (($variables[$variable['name']] = unserialize($variable['value'])) === FALSE) { 49 $variables[$variable s['name']] = $variable['value'];50 $variables[$variable['name']] = $variable['value']; 50 51 } 51 52 } … … 83 84 * A cache of the configuration. 84 85 */ 85 function variable_get($name, $default ) {86 function variable_get($name, $default = null) { 86 87 global $conf; 87 88 … … 100 101 */ 101 102 function variable_set($name, $value) { 102 global $conf ;103 global $conf, $db; 103 104 104 105 if (is_object($value) || is_array($value)) {
Note: See TracChangeset
for help on using the changeset viewer.
