Auth_phpBB: Add extension information & correctly use pa

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php|uber.leet Forum Index // General
View previous topic :: View next topic  
Author Message
ipse



Joined: 26 Jan 2008
Posts: 4

PostPosted: Sun Jan 27, 2008 6:23 am    Post subject: Auth_phpBB: Add extension information & correctly use pa Reply with quote
This patch addes extension information to Special:Version page and make include paths independent of actual location of extension. This is requirede if you want to put extension in an own subdirectory (as I always do) and also when LocalSettings.php is refered from different place (e.g. when you're doing `make` in "serialized" dir).

Code:

--- Auth_phpBB.php   2008-01-27 17:17:32.000000000 +0300
+++ Auth_phpBB.php   2008-01-27 17:16:28.000000000 +0300
@@ -37,6 +37,17 @@
      *
      */
 
+    $wgExtensionCredits['other'][] = array(
+        'name' => 'Auh_phpBB',
+        'author' => 'Nicholas Dunnaway',
+        'url' => 'http://www.mediawiki.org/wiki/Extension:PHPBB/Users_Integration',
+        'description' => 'Authenticate users against phpBB user table.',
+        'version' => '3.0.2 (2007-12-27)',
+    );
+
+    # Path to this extension directory
+    $extDir = dirname(__FILE__);
+
     error_reporting(E_ALL); // Debug
 
     // First check if class and interface has already been defined.
@@ -46,13 +57,13 @@
          * Auth Plug-in
          *
          */
-        require_once './includes/AuthPlugin.php';
+        require_once "$IP/includes/AuthPlugin.php";
 
         /**
          * Auth Plug-in Interface
          *
          */
-        require_once './extensions/iAuthPlugin.php';
+        require_once "$extDir/iAuthPlugin.php";
 
     }
 
@@ -71,7 +82,7 @@
          *      http://www.openwall.com/phpass/
          *
          */
-        require_once './extensions/PasswordHash.php';
+        require_once "$extDir/PasswordHash.php";
     }
 
     /**
Back to top
View user's profile Send private message
root
Site Admin


Joined: 24 Jun 2005
Posts: 471

PostPosted: Mon Jan 28, 2008 2:06 pm    Post subject: Reply with quote
Thats not a bad idea. Thanks.
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php|uber.leet Forum Index // General All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

alexisBlue v1.2 // Theme Created By: Andrew Charron and Web Hosting Bluebook
Powered by phpBB © 2001, 2002 phpBB Group