resourceloader: Use upsert() instead of replace() for module_deps write
[lhc/web/wiklou.git] / includes / MediaWiki.php
index eaa1c99..cfe4965 100644 (file)
@@ -22,6 +22,8 @@
 
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\ChronologyProtector;
+use Wikimedia\Rdbms\LBFactory;
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
@@ -495,8 +497,15 @@ class MediaWiki {
                        $action->show();
                        return;
                }
-
-               if ( Hooks::run( 'UnknownAction', [ $request->getVal( 'action', 'view' ), $page ] ) ) {
+               // NOTE: deprecated hook. Add to $wgActions instead
+               if ( Hooks::run(
+                       'UnknownAction',
+                       [
+                               $request->getVal( 'action', 'view' ),
+                               $page
+                       ],
+                       '1.19'
+               ) ) {
                        $output->setStatusCode( 404 );
                        $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
                }