[Pkg-mediawiki-devel] Bug#425870:

Darius Rad DRad at agamatrix.com
Thu May 24 16:57:49 UTC 2007


Package: mediawiki-extensions
Version: 0.5

The automatic inclusion of extensions via symlinks in
/etc/mediawiki-extension/extensions-enabled directory does not work
properly.  The call to is_readable() will always fail, as only the
filename is specified and not the whole path.  Changes to
/etc/mediawiki-extensions/extensions.php in the following patch solves
the problem for me.

--- extensions.php.orig 2007-05-24 12:33:51.000000000 -0400
+++ extensions.php      2007-05-24 12:37:06.000000000 -0400
@@ -3,13 +3,15 @@
 // Set new include path:
 ini_set( "include_path" ,ini_get( 'include_path' ) . PATH_SEPARATOR .
'/usr/share/mediawiki-extensions/include' );
 
+$dir = "/etc/mediawiki-extensions/extensions-enabled";
+
 // Including all enabled extensions.
-if ( is_dir( "/etc/mediawiki-extensions/extensions-enabled" )
+if ( is_dir( $dir )
    &&
-     $dh = opendir( "/etc/mediawiki-extensions/extensions-enabled" ) )
{
+     $dh = opendir( $dir ) ) {
         while ( ( $file = readdir( $dh ) ) !== false ) {
-           if ( preg_match( "/.php$/",$file ) && is_readable($file) ) {
-                include_once(
"/etc/mediawiki-extensions/extensions-enabled/" . $file );
+           if ( preg_match( "/.php$/",$file ) && is_readable($dir .
DIRECTORY_SEPARATOR . $file) ) {
+                include_once( $dir . DIRECTORY_SEPARATOR . $file );
             }
         }
         closedir( $dh );





More information about the Pkg-mediawiki-devel mailing list