Revision
115
Author
emsmith
Date
2007-01-11 17:25:44 -0800 (Thu, 11 Jan 2007)

Log Message

Array -> stdclass in ini parse

Modified Paths

Diff

Modified: trunk/lib/ini.class.php (114 => 115)


--- trunk/lib/ini.class.php	2007-01-11 22:40:27 UTC (rev 114)
+++ trunk/lib/ini.class.php	2007-01-12 01:25:44 UTC (rev 115)
@@ -45,14 +45,22 @@
 
 		$folders = CC_Os::instance();
 		$this->file = $folders->get_appdata() . strtolower(CC::$program) . '.config.ini';
+		$this->data = new stdclass();
 		if (file_exists($this->file))
 		{
-			$this->data = (object) parse_ini_file($this->file);
+			$source = parse_ini_file($this->file, TRUE);
+			foreach ($source as $key => $value)
+			{
+				if (is_array($value))
+				{
+					$this->data->$key = (object) $value;
+				}
+				else
+				{
+					$this->data->$key = $value;
+				}
+			}
 		}
-		else
-		{
-			$this->data = new stdclass();
-		}
 		return;
 	}