summaryrefslogtreecommitdiff
path: root/plugins/phpbb3/phpbb3_bootstrap.php
diff options
context:
space:
mode:
authorChristoph Burschka2012-11-01 00:01:08 +0100
committerChristoph Burschka2012-11-01 00:01:08 +0100
commit1a1ec38c95a25143bea1e3da38c65a60437d7883 (patch)
tree4784357112e6fce315bef1fc21848df7a1b50154 /plugins/phpbb3/phpbb3_bootstrap.php
parentHuge overhaul to deal with the global variables more cleanly. Avoid globals w... (diff)
downloadejabberd-auth-php-1a1ec38c95a25143bea1e3da38c65a60437d7883.tar.gz
Huge overhaul to deal with the global variables more cleanly. Avoid globals wherever possible, to avoid collisions with CMS systems.
Diffstat (limited to 'plugins/phpbb3/phpbb3_bootstrap.php')
-rw-r--r--plugins/phpbb3/phpbb3_bootstrap.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/phpbb3/phpbb3_bootstrap.php b/plugins/phpbb3/phpbb3_bootstrap.php
index 4ede950..55c973f 100644
--- a/plugins/phpbb3/phpbb3_bootstrap.php
+++ b/plugins/phpbb3/phpbb3_bootstrap.php
@@ -1,7 +1,12 @@
<?php
define('IN_PHPBB', TRUE);
+global $phpEx, $db, $cache, $user, $config;
$phpEx = 'php';
+if (!file_exists($phpbb_root_path . 'includes/startup.' . $phpEx)) {
+ file_put_contents('php://stderr', "phpBB not found at <{$phpbb_root_path}>.\n");
+ exit;
+}
require($phpbb_root_path . 'includes/startup.' . $phpEx);
if (file_exists($phpbb_root_path . 'config.' . $phpEx))
@@ -30,7 +35,7 @@ require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
// Instantiate some basic classes
$user = new noweb_user();
$auth = new auth();
-$db = new $sql_db();
+$db = new $sql_db();
$cache = new cache();
// Connect to DB