55 if ( !class_exists(
'XMLReader' ) ) {
56 throw new Exception(
'Import requires PHP to have been compiled with libxml support' );
59 $this->reader =
new XMLReader();
61 wfDeprecated( __METHOD__ .
' without a Config instance',
'1.25' );
66 if ( !in_array(
'uploadsource', stream_get_wrappers() ) ) {
67 stream_wrapper_register(
'uploadsource',
'UploadSourceAdapter' );
73 $oldDisable = libxml_disable_entity_loader(
false );
74 if ( defined(
'LIBXML_PARSEHUGE' ) ) {
75 $status = $this->reader->open(
"uploadsource://$id", null, LIBXML_PARSEHUGE );
77 $status = $this->reader->open(
"uploadsource://$id" );
80 $error = libxml_get_last_error();
81 libxml_disable_entity_loader( $oldDisable );
82 throw new MWException(
'Encountered an internal error while initializing WikiImporter object: ' .
85 libxml_disable_entity_loader( $oldDisable );
105 $this->
debug(
"FAILURE: $err" );
106 wfDebug(
"WikiImporter XML error: $err\n" );
110 if ( $this->mDebug ) {
115 public function warn( $data ) {
123 if ( is_callable( $this->mNoticeCallback ) ) {
124 call_user_func( $this->mNoticeCallback, $msg,
$params );
143 $this->mNoUpdates = $noupdates;
153 return wfSetVar( $this->mNoticeCallback, $callback );
163 $this->mPageCallback = $callback;
178 $this->mPageOutCallback = $callback;
189 $this->mRevisionCallback = $callback;
200 $this->mUploadCallback = $callback;
211 $this->mLogItemCallback = $callback;
222 $this->mSiteInfoCallback = $callback;
232 $this->importTitleFactory =
$factory;
241 if ( is_null( $namespace ) ) {
249 $namespace = intval( $namespace );
264 if ( is_null( $rootpage ) ) {
267 } elseif ( $rootpage !==
'' ) {
268 $rootpage = rtrim( $rootpage,
'/' );
272 $status->fatal(
'import-rootpage-invalid' );
279 : $wgContLang->getNsText(
$title->getNamespace() );
280 $status->fatal(
'import-rootpage-nosubpage', $displayNSText );
295 $this->mImageBasePath =
$dir;
302 $this->mImportUploads = $import;
312 $title = $titleAndForeignTitle[0];
314 $this->countableCache[
'title_' .
$title->getPrefixedText()] =
$page->isCountable();
324 if ( !$revision->getContentHandler()->canBeUsedOn( $revision->getTitle() ) ) {
325 $this->
notice(
'import-error-bad-location',
326 $revision->getTitle()->getPrefixedText(),
328 $revision->getModel(),
329 $revision->getFormat() );
336 return $dbw->deadlockLoop( [ $revision,
'importOldRevision' ] );
338 $this->
notice(
'import-error-unserialize',
339 $revision->getTitle()->getPrefixedText(),
341 $revision->getModel(),
342 $revision->getFormat() );
355 return $dbw->deadlockLoop( [ $revision,
'importLogItem' ] );
365 return $dbw->deadlockLoop( [ $revision,
'importUpload' ] );
378 $sRevCount, $pageInfo ) {
387 $page->loadPageData(
'fromdbmaster' );
390 wfDebug( __METHOD__ .
': Skipping article count adjustment for ' .
$title .
391 ' because WikiPage::getContent() returned null' );
394 $countKey =
'title_' .
$title->getPrefixedText();
395 $countable =
$page->isCountable( $editInfo );
396 if ( array_key_exists( $countKey, $this->countableCache ) &&
397 $countable != $this->countableCache[$countKey] ) {
399 'articles' => ( (
int)$countable - (
int)$this->countableCache[$countKey] )
404 $args = func_get_args();
413 $this->
debug(
"Got revision:" );
414 if ( is_object( $revision->title ) ) {
415 $this->
debug(
"-- Title: " . $revision->title->getPrefixedText() );
417 $this->
debug(
"-- Title: <invalid>" );
419 $this->
debug(
"-- User: " . $revision->user_text );
420 $this->
debug(
"-- Timestamp: " . $revision->timestamp );
421 $this->
debug(
"-- Comment: " . $revision->comment );
422 $this->
debug(
"-- Text: " . $revision->text );
431 if ( isset( $this->mSiteInfoCallback ) ) {
432 return call_user_func_array( $this->mSiteInfoCallback,
433 [ $siteInfo, $this ] );
444 if ( isset( $this->mPageCallback ) ) {
445 call_user_func( $this->mPageCallback,
$title );
458 $sucCount, $pageInfo ) {
459 if ( isset( $this->mPageOutCallback ) ) {
460 $args = func_get_args();
461 call_user_func_array( $this->mPageOutCallback,
$args );
471 if ( isset( $this->mRevisionCallback ) ) {
472 return call_user_func_array( $this->mRevisionCallback,
473 [ $revision, $this ] );
485 if ( isset( $this->mLogItemCallback ) ) {
486 return call_user_func_array( $this->mLogItemCallback,
487 [ $revision, $this ] );
500 return $this->reader->getAttribute( $attr );
511 if ( $this->reader->isEmptyElement ) {
515 while ( $this->reader->read() ) {
516 switch ( $this->reader->nodeType ) {
517 case XMLReader::TEXT:
518 case XMLReader::CDATA:
519 case XMLReader::SIGNIFICANT_WHITESPACE:
520 $buffer .= $this->reader->value;
522 case XMLReader::END_ELEMENT:
527 $this->reader->close();
540 $oldDisable = libxml_disable_entity_loader(
true );
541 $this->reader->read();
543 if ( $this->reader->localName !=
'mediawiki' ) {
544 libxml_disable_entity_loader( $oldDisable );
545 throw new MWException(
"Expected <mediawiki> tag, got " .
546 $this->reader->localName );
548 $this->
debug(
"<mediawiki> tag is correct." );
550 $this->
debug(
"Starting primary dump processing loop." );
552 $keepReading = $this->reader->read();
556 while ( $keepReading ) {
557 $tag = $this->reader->localName;
558 $type = $this->reader->nodeType;
560 if ( !
Hooks::run(
'ImportHandleToplevelXMLTag', [ $this ] ) ) {
562 } elseif (
$tag ==
'mediawiki' &&
$type == XMLReader::END_ELEMENT ) {
564 } elseif (
$tag ==
'siteinfo' ) {
566 } elseif (
$tag ==
'page' ) {
568 } elseif (
$tag ==
'logitem' ) {
570 } elseif (
$tag !=
'#text' ) {
571 $this->
warn(
"Unhandled top-level XML tag $tag" );
577 $keepReading = $this->reader->next();
579 $this->
debug(
"Skip" );
581 $keepReading = $this->reader->read();
589 libxml_disable_entity_loader( $oldDisable );
590 $this->reader->close();
600 $this->
debug(
"Enter site info handler." );
604 $normalFields = [
'sitename',
'base',
'generator',
'case' ];
606 while ( $this->reader->read() ) {
607 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
608 $this->reader->localName ==
'siteinfo' ) {
612 $tag = $this->reader->localName;
614 if (
$tag ==
'namespace' ) {
617 } elseif ( in_array(
$tag, $normalFields ) ) {
627 $this->
debug(
"Enter log item handler." );
631 $normalFields = [
'id',
'comment',
'type',
'action',
'timestamp',
632 'logtitle',
'params' ];
634 while ( $this->reader->read() ) {
635 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
636 $this->reader->localName ==
'logitem' ) {
640 $tag = $this->reader->localName;
642 if ( !
Hooks::run(
'ImportHandleLogItemXMLTag', [
646 } elseif ( in_array(
$tag, $normalFields ) ) {
648 } elseif (
$tag ==
'contributor' ) {
650 } elseif (
$tag !=
'#text' ) {
651 $this->
warn(
"Unhandled log-item XML tag $tag" );
666 if ( isset( $logInfo[
'id'] ) ) {
667 $revision->setID( $logInfo[
'id'] );
669 $revision->setType( $logInfo[
'type'] );
670 $revision->setAction( $logInfo[
'action'] );
671 if ( isset( $logInfo[
'timestamp'] ) ) {
672 $revision->setTimestamp( $logInfo[
'timestamp'] );
674 if ( isset( $logInfo[
'params'] ) ) {
675 $revision->setParams( $logInfo[
'params'] );
677 if ( isset( $logInfo[
'logtitle'] ) ) {
683 $revision->setNoUpdates( $this->mNoUpdates );
685 if ( isset( $logInfo[
'comment'] ) ) {
686 $revision->setComment( $logInfo[
'comment'] );
689 if ( isset( $logInfo[
'contributor'][
'ip'] ) ) {
690 $revision->setUserIP( $logInfo[
'contributor'][
'ip'] );
693 if ( !isset( $logInfo[
'contributor'][
'username'] ) ) {
694 $revision->setUsername(
'Unknown user' );
696 $revision->setUsername( $logInfo[
'contributor'][
'username'] );
704 $this->
debug(
"Enter page handler." );
705 $pageInfo = [
'revisionCount' => 0,
'successfulRevisionCount' => 0 ];
708 $normalFields = [
'title',
'ns',
'id',
'redirect',
'restrictions' ];
713 while ( $skip ? $this->reader->next() : $this->reader->read() ) {
714 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
715 $this->reader->localName ==
'page' ) {
721 $tag = $this->reader->localName;
726 } elseif ( !
Hooks::run(
'ImportHandlePageXMLTag', [ $this,
729 } elseif ( in_array(
$tag, $normalFields ) ) {
737 if (
$tag ==
'redirect' ) {
742 } elseif (
$tag ==
'revision' ||
$tag ==
'upload' ) {
745 isset( $pageInfo[
'ns'] ) ? $pageInfo[
'ns'] : null );
748 if ( is_array(
$title ) ) {
750 list( $pageInfo[
'_title'], $foreignTitle ) =
$title;
758 if (
$tag ==
'revision' ) {
764 } elseif (
$tag !=
'#text' ) {
765 $this->
warn(
"Unhandled page XML tag $tag" );
775 if ( array_key_exists(
'_title', $pageInfo ) ) {
777 $pageInfo[
'revisionCount'],
778 $pageInfo[
'successfulRevisionCount'],
787 $this->
debug(
"Enter revision handler" );
790 $normalFields = [
'id',
'timestamp',
'comment',
'minor',
'model',
'format',
'text' ];
794 while ( $skip ? $this->reader->next() : $this->reader->read() ) {
795 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
796 $this->reader->localName ==
'revision' ) {
800 $tag = $this->reader->localName;
802 if ( !
Hooks::run(
'ImportHandleRevisionXMLTag', [
803 $this, $pageInfo, $revisionInfo
806 } elseif ( in_array(
$tag, $normalFields ) ) {
808 } elseif (
$tag ==
'contributor' ) {
810 } elseif (
$tag !=
'#text' ) {
811 $this->
warn(
"Unhandled revision XML tag $tag" );
816 $pageInfo[
'revisionCount']++;
818 $pageInfo[
'successfulRevisionCount']++;
834 if ( ( !isset( $revisionInfo[
'model'] ) ||
835 in_array( $revisionInfo[
'model'], [
843 (
int)( strlen( $revisionInfo[
'text'] ) / 1024 ) > $wgMaxArticleSize
846 ( isset( $revisionInfo[
'id'] ) ?
847 "the revision with ID $revisionInfo[id]" :
849 ) .
" exceeds the maximum allowable size ($wgMaxArticleSize KB)" );
854 if ( isset( $revisionInfo[
'id'] ) ) {
855 $revision->setID( $revisionInfo[
'id'] );
857 if ( isset( $revisionInfo[
'model'] ) ) {
858 $revision->setModel( $revisionInfo[
'model'] );
860 if ( isset( $revisionInfo[
'format'] ) ) {
861 $revision->setFormat( $revisionInfo[
'format'] );
863 $revision->setTitle( $pageInfo[
'_title'] );
865 if ( isset( $revisionInfo[
'text'] ) ) {
866 $handler = $revision->getContentHandler();
868 $revisionInfo[
'text'],
869 $revision->getFormat() );
871 $revision->setText( $text );
873 if ( isset( $revisionInfo[
'timestamp'] ) ) {
874 $revision->setTimestamp( $revisionInfo[
'timestamp'] );
879 if ( isset( $revisionInfo[
'comment'] ) ) {
880 $revision->setComment( $revisionInfo[
'comment'] );
883 if ( isset( $revisionInfo[
'minor'] ) ) {
884 $revision->setMinor(
true );
886 if ( isset( $revisionInfo[
'contributor'][
'ip'] ) ) {
887 $revision->setUserIP( $revisionInfo[
'contributor'][
'ip'] );
888 } elseif ( isset( $revisionInfo[
'contributor'][
'username'] ) ) {
889 $revision->setUsername( $revisionInfo[
'contributor'][
'username'] );
891 $revision->setUsername(
'Unknown user' );
893 $revision->setNoUpdates( $this->mNoUpdates );
903 $this->
debug(
"Enter upload handler" );
906 $normalFields = [
'timestamp',
'comment',
'filename',
'text',
907 'src',
'size',
'sha1base36',
'archivename',
'rel' ];
911 while ( $skip ? $this->reader->next() : $this->reader->read() ) {
912 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
913 $this->reader->localName ==
'upload' ) {
917 $tag = $this->reader->localName;
919 if ( !
Hooks::run(
'ImportHandleUploadXMLTag', [
923 } elseif ( in_array(
$tag, $normalFields ) ) {
925 } elseif (
$tag ==
'contributor' ) {
927 } elseif (
$tag ==
'contents' ) {
929 $encoding = $this->reader->getAttribute(
'encoding' );
930 if ( $encoding ===
'base64' ) {
931 $uploadInfo[
'fileSrc'] = $this->
dumpTemp( base64_decode( $contents ) );
932 $uploadInfo[
'isTempSrc'] =
true;
934 } elseif (
$tag !=
'#text' ) {
935 $this->
warn(
"Unhandled upload XML tag $tag" );
940 if ( $this->mImageBasePath && isset( $uploadInfo[
'rel'] ) ) {
941 $path =
"{$this->mImageBasePath}/{$uploadInfo['rel']}";
942 if ( file_exists(
$path ) ) {
943 $uploadInfo[
'fileSrc'] =
$path;
944 $uploadInfo[
'isTempSrc'] =
false;
948 if ( $this->mImportUploads ) {
958 $filename = tempnam(
wfTempDir(),
'importupload' );
959 file_put_contents( $filename, $contents );
970 $text = isset( $uploadInfo[
'text'] ) ? $uploadInfo[
'text'] :
'';
972 $revision->setTitle( $pageInfo[
'_title'] );
973 $revision->setID( $pageInfo[
'id'] );
974 $revision->setTimestamp( $uploadInfo[
'timestamp'] );
975 $revision->setText( $text );
976 $revision->setFilename( $uploadInfo[
'filename'] );
977 if ( isset( $uploadInfo[
'archivename'] ) ) {
978 $revision->setArchiveName( $uploadInfo[
'archivename'] );
980 $revision->setSrc( $uploadInfo[
'src'] );
981 if ( isset( $uploadInfo[
'fileSrc'] ) ) {
982 $revision->setFileSrc( $uploadInfo[
'fileSrc'],
983 !empty( $uploadInfo[
'isTempSrc'] ) );
985 if ( isset( $uploadInfo[
'sha1base36'] ) ) {
986 $revision->setSha1Base36( $uploadInfo[
'sha1base36'] );
988 $revision->setSize( intval( $uploadInfo[
'size'] ) );
989 $revision->setComment( $uploadInfo[
'comment'] );
991 if ( isset( $uploadInfo[
'contributor'][
'ip'] ) ) {
992 $revision->setUserIP( $uploadInfo[
'contributor'][
'ip'] );
994 if ( isset( $uploadInfo[
'contributor'][
'username'] ) ) {
995 $revision->setUsername( $uploadInfo[
'contributor'][
'username'] );
997 $revision->setNoUpdates( $this->mNoUpdates );
999 return call_user_func( $this->mUploadCallback, $revision );
1006 $fields = [
'id',
'ip',
'username' ];
1009 if ( $this->reader->isEmptyElement ) {
1012 while ( $this->reader->read() ) {
1013 if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
1014 $this->reader->localName ==
'contributor' ) {
1018 $tag = $this->reader->localName;
1020 if ( in_array(
$tag, $fields ) ) {
1034 if ( is_null( $this->foreignNamespaces ) ) {
1038 $this->foreignNamespaces );
1041 $foreignTitle = $foreignTitleFactory->createForeignTitle( $text,
1044 $title = $this->importTitleFactory->createTitleFromForeignTitle(
1047 $commandLineMode = $this->config->get(
'CommandLineMode' );
1048 if ( is_null(
$title ) ) {
1049 # Invalid page title? Ignore the page
1050 $this->
notice(
'import-error-invalid', $foreignTitle->getFullText() );
1052 } elseif (
$title->isExternal() ) {
1053 $this->
notice(
'import-error-interwiki',
$title->getPrefixedText() );
1055 } elseif ( !
$title->canExist() ) {
1056 $this->
notice(
'import-error-special',
$title->getPrefixedText() );
1058 } elseif ( !
$title->userCan(
'edit' ) && !$commandLineMode ) {
1059 # Do not import if the importing wiki user cannot edit this page
1060 $this->
notice(
'import-error-edit',
$title->getPrefixedText() );
1062 } elseif ( !
$title->exists() && !
$title->userCan(
'create' ) && !$commandLineMode ) {
1063 # Do not import if the importing wiki user cannot create this page
1064 $this->
notice(
'import-error-create',
$title->getPrefixedText() );
1068 return [
$title, $foreignTitle ];
setTargetRootPage($rootpage)
Set a target root page under which all pages are imported.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
A parser that translates page titles on a foreign wiki into ForeignTitle objects, using information a...
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
wfGetDB($db, $groups=[], $wiki=false)
Get a Database object.
$wgMaxArticleSize
Maximum article size in kilobytes.
processRevision($pageInfo, $revisionInfo)
pageOutCallback($title, $foreignTitle, $revCount, $sucCount, $pageInfo)
Notify the callback function when a "" is closed.
XML file reader for the page data importer.
A class to convert page titles on a foreign wiki (ForeignTitle objects) into page titles on the local...
A class to convert page titles on a foreign wiki (ForeignTitle objects) into page titles on the local...
setSiteInfoCallback($callback)
Sets the action to perform when site info is encountered.
finishImportPage($title, $foreignTitle, $revCount, $sRevCount, $pageInfo)
Mostly for hook use.
static exists($index)
Returns whether the specified namespace exists.
static newFromText($text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
setNoticeCallback($callback)
Set a callback that displays notice messages.
importLogItem($revision)
Default per-revision callback, performs the import.
when a variable name is used in a it is silently declared as a new local masking the global
setRevisionCallback($callback)
Sets the action to perform as each page revision is reached.
setTargetNamespace($namespace)
Set a target namespace to override the defaults.
setPageOutCallback($callback)
Sets the action to perform as each page in the stream is completed.
wfDebug($text, $dest= 'all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
setImportTitleFactory($factory)
Sets the factory object to use to convert ForeignTitle objects into local Title objects.
handleRevision(&$pageInfo)
wfTempDir()
Tries to get the system directory for temporary files.
nodeContents()
Shouldn't something like this be built-in to XMLReader? Fetches text contents of the current element...
logItemCallback($revision)
Notify the callback function of a new log item.
doImport()
Primary entry point.
static factory(array $deltas)
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock()-offset Set to overwrite offset parameter in $wgRequest set to ''to unsetoffset-wrap String Wrap the message in html(usually something like"<
siteInfoCallback($siteInfo)
Notify the callback function of site info.
nodeAttribute($attr)
Retrieves the contents of the named attribute of the current element.
Represents a revision, log entry or upload during the import process.
wfDeprecated($function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
namespace and then decline to actually register it file or subcat img or subcat $title
static hasSubpages($index)
Does the namespace allow subpages?
static addUpdate(DeferrableUpdate $update, $type=self::POSTSEND)
Add an update to the deferred list.
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books $tag
debugRevisionHandler(&$revision)
Alternate per-revision callback, for debugging.
revisionCallback($revision)
Notify the callback function of a revision.
setDebug($debug)
Set debug mode...
setImportUploads($import)
setPageCallback($callback)
Sets the action to perform as each new page in the stream is reached.
__construct(ImportSource $source, Config $config=null)
Creates an ImportXMLReader drawing from the source provided.
setNoUpdates($noupdates)
Set 'no updates' mode.
processTitle($text, $ns=null)
static getDefaultInstance()
static registerSource(ImportSource $source)
setUploadCallback($callback)
Sets the action to perform as each file upload version is reached.
setLogItemCallback($callback)
Sets the action to perform as each log item reached.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
A parser that translates page titles on a foreign wiki into ForeignTitle objects, with no knowledge o...
wfSetVar(&$dest, $source, $force=false)
Sets dest to source and returns the original value of dest If source is NULL, it just returns the val...
processUpload($pageInfo, $uploadInfo)
Source interface for XML import.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set and then return false from the hook function Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions as context called by AbstractContent::getParserOutput May be used to override the normal model specific rendering of page content $content
ImportTitleFactory $importTitleFactory
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the local content language as $wgContLang
A class to convert page titles on a foreign wiki (ForeignTitle objects) into page titles on the local...
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist removed from all revisions and log entries to which it was applied This gives extensions a chance to take it off their books as the deletion has already been partly carried out by this point or something similar the user will be unable to create the tag set $status
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output modifiable modifiable after all normalizations have been except for the $wgMaxImageArea check set to true or false to override the $wgMaxImageArea check result gives extension the possibility to transform it themselves $handler
beforeImportPage($titleAndForeignTitle)
Default per-page callback.
pageCallback($title)
Notify the callback function when a new "
" is reached.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached one of or reset my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
importUpload($revision)
Dummy for now...
static newGood($value=null)
Factory function for good results.
Exception representing a failure to serialize or unserialize a content object.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached $page
importRevision($revision)
Default per-revision callback, performs the import.