Changeset 501


Ignore:
Timestamp:
02/22/06 00:24:28 (7 years ago)
Author:
anarcat
Message:

[project @ alternc: changeset 2005-01-18 23:24:31 by anarcat]
make this work properly

Original author: anarcat
Date: 2005-01-18 23:24:31

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bureau/class/variables.php

    r499 r501  
    22 
    33/* 
    4  * $Id: variables.php,v 1.5 2005/01/18 23:01:32 anarcat Exp $ 
     4 * $Id: variables.php,v 1.6 2005/01/18 23:24:31 anarcat Exp $ 
    55 ---------------------------------------------------------------------- 
    66 AlternC - Web Hosting System 
     
    4444  global $db; 
    4545  $result = $db->query('SELECT * FROM `variable`'); 
    46   while ($variable = $db->next_record($result)) { 
     46  while ($db->next_record($result)) { 
    4747    /* maybe the data is *not* serialized, in that case, take it verbatim */ 
     48    $variable = $db->Record; 
    4849    if (($variables[$variable['name']] = unserialize($variable['value'])) === FALSE) { 
    49       $variables[$variables['name']] = $variable['value']; 
     50      $variables[$variable['name']] = $variable['value']; 
    5051    } 
    5152  } 
     
    8384 *   A cache of the configuration. 
    8485 */ 
    85 function variable_get($name, $default) { 
     86function variable_get($name, $default = null) { 
    8687  global $conf; 
    8788 
     
    100101 */ 
    101102function variable_set($name, $value) { 
    102   global $conf; 
     103  global $conf, $db; 
    103104 
    104105  if (is_object($value) || is_array($value)) { 
Note: See TracChangeset for help on using the changeset viewer.