diff options
author | Maurice Svay <maurice@svay.com> | 2011-07-10 14:21:56 +0200 |
---|---|---|
committer | Maurice Svay <maurice@svay.com> | 2011-07-10 14:21:56 +0200 |
commit | 836e30ccd9b3408cdc12a79191ae3df311d56040 (patch) | |
tree | d96e523f8dde41fb1268297ae03527ffa7789932 /index.php | |
parent | c1b569d50fc2825cc42fc276bf26133b42a358ec (diff) | |
download | planet-836e30ccd9b3408cdc12a79191ae3df311d56040.tar planet-836e30ccd9b3408cdc12a79191ae3df311d56040.tar.gz planet-836e30ccd9b3408cdc12a79191ae3df311d56040.tar.bz2 planet-836e30ccd9b3408cdc12a79191ae3df311d56040.tar.xz planet-836e30ccd9b3408cdc12a79191ae3df311d56040.zip |
Refactor app instantiation
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -1,25 +1,12 @@ <?php -$debug = isset($_GET['debug']) ? $_GET['debug'] : 0;
-if ($debug) {
- error_reporting(E_ALL);
-} else {
- error_reporting(0);
-}
-
-include_once(dirname(__FILE__).'/app/classes/Planet.class.php');
-include_once(dirname(__FILE__).'/app/lib/Cache.php');
+include_once(dirname(__FILE__).'/app/app.php'); +include_once(dirname(__FILE__).'/app/lib/Cache.php'); -//Load configuration
-if (is_file(dirname(__FILE__).'/custom/config.yml')){
- $conf = Spyc::YAMLLoad(dirname(__FILE__).'/custom/config.yml');
- $PlanetConfig = new PlanetConfig($conf);
-} else {
+//Installed ? +if (!isset($Planet)) {
echo '<p>You might want to <a href="install.php">install moonmoon</a>.</p>'; exit;
}
-
-//Instantiate app
-$Planet = new Planet($PlanetConfig);
//Load from cache $items = Array();
|