diff --git a/README.md b/README.md index 315da016..2e6beb50 100644 --- a/README.md +++ b/README.md @@ -159,18 +159,16 @@ This means you can use and modify it for free in private or commercial projects. ## Follow on Facebook Follow the repo on [Facebook](https://www.facebook.com/pages/MINI-a-supersimple-PHP-application/1488883564703966). +And by the way, I'm also blogging at [Dev Metal](http://www.dev-metal.com). ## Support -If you want to support MINI, then rent your next server at -[A2Hosting](https://affiliates.a2hosting.com/idevaffiliate.php?id=4471&url=579) or donate a coffee via -[PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=P5YLUK4MW3LDG), -[GitTip](https://www.gittip.com/Panique/) or -[Flattr](https://flattr.com/submit/auto?user_id=panique&url=https%3A%2F%2Fgithub.com%2Fpanique%2Fmini). +If you want to support MINI, then rent your next server at [Host1Plus](https://affiliates.host1plus.com/ref/devmetal/36f4d828.html). +Thanks! :) ## TODO: documentation -coming soon +Yeah, maybe in the future when there's some time... ## Quick-Start diff --git a/application/config/config.php b/application/config/config.php index 3a3e9423..3c2f3214 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -10,8 +10,12 @@ * Configuration for: Error reporting * Useful to show every little problem during development, but only show hard errors in production */ -error_reporting(E_ALL); -ini_set("display_errors", 1); +define('ENVIRONMENT', 'development'); + +if (ENVIRONMENT == 'development' || ENVIRONMENT == 'dev') { + error_reporting(E_ALL); + ini_set("display_errors", 1); +} /** * Configuration for: URL diff --git a/application/core/controller.php b/application/core/controller.php index 69a41305..dd9558bf 100644 --- a/application/core/controller.php +++ b/application/core/controller.php @@ -43,7 +43,7 @@ private function openDatabaseConnection() */ public function loadModel() { - require APP . '/model/model.php'; + require APP . 'model/model.php'; // create new "model" (and pass the database connection) $this->model = new Model($this->db); } diff --git a/public/index.php b/public/index.php index 0dee1396..396cf771 100644 --- a/public/index.php +++ b/public/index.php @@ -25,15 +25,15 @@ } // load application config (error reporting etc.) -require APP . '/config/config.php'; +require APP . 'config/config.php'; // FOR DEVELOPMENT: this loads PDO-debug, a simple function that shows the SQL query (when using PDO). // If you want to load pdoDebug via Composer, then have a look here: https://github.com/panique/pdo-debug -require APP . '/libs/helper.php'; +require APP . 'libs/helper.php'; // load application class -require APP . '/core/application.php'; -require APP . '/core/controller.php'; +require APP . 'core/application.php'; +require APP . 'core/controller.php'; // start the application $app = new Application();