dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add 'WikiPageFactory' hook
[lhc/web/wiklou.git]
/
includes
/
page
/
WikiPage.php
diff --git
a/includes/page/WikiPage.php
b/includes/page/WikiPage.php
index
c791587
..
3dc41fb
100644
(file)
--- a/
includes/page/WikiPage.php
+++ b/
includes/page/WikiPage.php
@@
-121,6
+121,11
@@
class WikiPage implements Page, IDBAccessObject {
throw new MWException( "Invalid or virtual namespace $ns given." );
}
+ $page = null;
+ if ( !Hooks::run( 'WikiPageFactory', [ $title, &$page ] ) ) {
+ return $page;
+ }
+
switch ( $ns ) {
case NS_FILE:
$page = new WikiFilePage( $title );