From 58365ecc64413d416dadaa82607e57a1f76eca7e Mon Sep 17 00:00:00 2001 From: paulr Date: Mon, 8 Aug 2011 16:47:26 +1000 Subject: [PATCH] delete the old config thingy --- libglcas/config_old.php | 92 ----------------------------------------------- 1 files changed, 0 insertions(+), 92 deletions(-) delete mode 100644 libglcas/config_old.php diff --git a/libglcas/config_old.php b/libglcas/config_old.php deleted file mode 100644 index 2009823..0000000 --- a/libglcas/config_old.php +++ /dev/null @@ -1,92 +0,0 @@ -configPath = ""; - $this->config = ""; - } - - function loadConfig($configpath) - { - error_log("loadConfig $configpath"); - $this->configPath = $configpath; - $flt = file_get_contents($configpath); - $this->config = unserialize(base64_decode($flt)); - - - } - - function getConfigVar($var) - { - if(isset($this->config["$var"])) { - return $this->config["$var"]; - } else return false; - } - - function setConfigVar($var, $value) - { - if(is_array($this->config)) { - foreach($this->config as $vkey => $val) { - if($vkey == "$var") { - error_log("reset config of $var to $value"); - $this->config[$var] = $value; - return true; - } - } - } else error_log("config isnt array"); - - // otherwise, set it - error_log("set config of $var to $value"); - $this->config[$var] = $value; - - } - - function delConfigVar($var) - { - if(is_array($this->config)) { - foreach($this->config as $vkey => $val) { - if($vkey == "$var") { - error_log("remove config of $var to $value"); - unset($this->config[$var]); - return true; - } - } - } else error_log("config isnt array"); - } - - function saveConfig() - { - file_put_contents($this->configPath, base64_encode(serialize($this->config))); - } - - function debug() - { - echo "
";
-		echo "path: ".$this->configPath."\n";
-		print_r($this->config);
-		echo "
"; - } - - private $configPath; - private $config; - -} - -function glcas_getWebConfigPath() -{ - global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL; - - // if you wish to add more places to find webconfig, add them here. - $configpath = false; - if(file_exists($WEB_ROOT_FS."/../var/glcas/webconfig")) return realpath($WEB_ROOT_FS."/../var/glcas/webconfig"); - if(file_exists("/var/lib/glcas/webconfig")) return realpath("/var/lib/glcas/webconfig"); - if(file_exists("/var/run/glcas/webconfig")) return realpath("/var/run/glcas/webconfig"); - - return $configpath; - //return false; -} - - -?> \ No newline at end of file -- 1.7.0.4