Commit 819429bc authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Protect init.php. Whitespace change. Log an environment level error if

we're not installed, later this will be replaced by a redirect to the
installer.
parent f43f4e07
......@@ -19,11 +19,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
defined('INTERNAL') || die();
// @todo <nigel> Set up error handling. For now, use trigger_error. I will
// update all calls as necessary once error handling is finalised.
$CFG = new StdClass;
$CFG->docroot = dirname(__FILE__).'/';
$CFG->docroot = dirname(__FILE__) . '/';
// Figure out our include path
if (!empty($_SERVER['MAHARA_LIBDIR'])) {
......@@ -38,7 +40,10 @@ set_include_path('.' . PATH_SEPARATOR . $CFG->libroot);
require 'errors.php';
if (!is_readable($CFG->docroot . 'config.php')) {
trigger_error('Not installed! Please create config.php from config-dist.php');
// @todo Later, this will redirect to the installer script. For now, we
// just log and exit.
log_environ('Not installed! Please create config.php from config-dist.php');
exit;
}
require('config.php');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment