X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FAutoloadGenerator.php;h=319b5d4854c6cd0c96689c71397e81b4eb301a33;hb=7874fc4bec845ad92960b07e969c65f3c3fe74f2;hp=2ebc9ed9f010ba056952000bc41340e465271e46;hpb=0397fbe1ab3315f243261ac81228b98c60a84257;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 2ebc9ed9f0..319b5d4854 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -11,7 +11,7 @@ * $gen = new AutoloadGenerator( __DIR__ ); * $gen->readDir( __DIR__ . '/includes' ); * $gen->readFile( __DIR__ . '/foo.php' ) - * $gen->generateAutoload(); + * $gen->getAutoload(); */ class AutoloadGenerator { const FILETYPE_JSON = 'json'; @@ -160,6 +160,7 @@ class AutoloadGenerator { * * @param {string} $commandName Command name to include in comment * @param {string} $filename of PHP file to put autoload information in. + * @return string */ protected function generatePHPAutoload( $commandName, $filename ) { // No existing JSON file found; update/generate PHP file @@ -290,6 +291,10 @@ EOD; foreach ( glob( $this->basepath . '/*.php' ) as $file ) { $this->readFile( $file ); } + + // Legacy aliases + $this->forceClassPath( 'DatabaseBase', + $this->basepath . '/includes/libs/rdbms/database/Database.php' ); } }