Try language dir in two places, as sometimes we are not called from "config".
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 26 Jun 2006 23:21:15 +0000 (23:21 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Mon, 26 Jun 2006 23:21:15 +0000 (23:21 +0000)
Fixes bug 5417.

config/index.php

index 9042d80..575b997 100644 (file)
@@ -1388,6 +1388,9 @@ function getLanguageList() {
        $codes = array();
 
        $d = opendir( "../languages" );
+       /* In case we are called from the root directory */
+       if (!$d)
+               $d = opendir( "languages");
        while( false !== ($f = readdir( $d ) ) ) {
                $m = array();
                if( preg_match( '/Language([A-Z][a-z_]+)\.php$/', $f, $m ) ) {