summaryrefslogtreecommitdiff
path: root/plugins/phpbb3
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/phpbb3')
-rw-r--r--plugins/phpbb3/BridgePhpBB3.php (renamed from plugins/phpbb3/JabberAuthPhpBB3.php)6
-rw-r--r--plugins/phpbb3/phpbb3.module5
-rw-r--r--plugins/phpbb3/phpbb3_bootstrap.php7
3 files changed, 11 insertions, 7 deletions
diff --git a/plugins/phpbb3/JabberAuthPhpBB3.php b/plugins/phpbb3/BridgePhpBB3.php
index e60cbae..bc7d8c8 100644
--- a/plugins/phpbb3/JabberAuthPhpBB3.php
+++ b/plugins/phpbb3/BridgePhpBB3.php
@@ -1,12 +1,10 @@
<?php
-class JabberAuthPhpBB extends JabberAuth {
+class BridgePhpBB3 extends EjabberdAuthBridge {
var $auth;
var $db;
- function __construct($auth, $db, $logpath) {
- $this->logpath = $logpath;
- parent::init();
+ function __construct($auth, $db) {
$this->auth = $auth;
$this->db = $db;
}
diff --git a/plugins/phpbb3/phpbb3.module b/plugins/phpbb3/phpbb3.module
index 4c58762..7502094 100644
--- a/plugins/phpbb3/phpbb3.module
+++ b/plugins/phpbb3/phpbb3.module
@@ -1,10 +1,11 @@
<?php
function phpbb3_init($config) {
+ global $phpbb_root_path;
$phpbb_root_path = $config['root_path'];
// Bootstrap the phpBB system.
require_once __DIR__ . '/phpbb3_bootstrap.php';
// Load the plugin.
- require_once __DIR__ . '/JabberAuthPhpBB3.php';
- return new JabberAuthPhpBB3($config['auth'], $config['db']);
+ require_once __DIR__ . '/BridgePhpBB3.php';
+ return new BridgePhpBB3($auth, $db);
}
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