mirror of
https://github.com/Universal-Omega/DynamicPageList3
synced 2024-12-03 12:16:33 +00:00
Update CreateTemplate to mention DPL3, not DPL (#166)
This commit is contained in:
parent
4a72ed31c3
commit
7ad00427e6
|
@ -17,15 +17,12 @@ if ( $IP === false ) {
|
||||||
|
|
||||||
require_once "$IP/maintenance/Maintenance.php";
|
require_once "$IP/maintenance/Maintenance.php";
|
||||||
|
|
||||||
/*
|
|
||||||
* Creates the DPL template when updating.
|
|
||||||
*/
|
|
||||||
class CreateTemplate extends LoggedUpdateMaintenance {
|
class CreateTemplate extends LoggedUpdateMaintenance {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->addDescription( 'Handle inserting DPL\'s necessary template for content inclusion.' );
|
$this->addDescription( 'Handle inserting DynamicPageList3\'s necessary template for content inclusion.' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +31,7 @@ class CreateTemplate extends LoggedUpdateMaintenance {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getUpdateKey() {
|
protected function getUpdateKey() {
|
||||||
return 'dynamic-page-list-create-template';
|
return 'dynamic-page-list-3-create-template';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -47,7 +44,7 @@ class CreateTemplate extends LoggedUpdateMaintenance {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle inserting DPL's necessary template for content inclusion.
|
* Handle inserting DynamicPageList3's necessary template for content inclusion.
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
@ -68,7 +65,7 @@ class CreateTemplate extends LoggedUpdateMaintenance {
|
||||||
$updater = $page->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
|
$updater = $page->newPageUpdater( User::newSystemUser( 'DynamicPageList3 extension' ) );
|
||||||
$content = $page->getContentHandler()->makeContent( '<noinclude>This page was automatically created. It serves as an anchor page for all \'\'\'[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]\'\'\' of [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:DynamicPageList3 Extension:DynamicPageList3].</noinclude>', $title );
|
$content = $page->getContentHandler()->makeContent( '<noinclude>This page was automatically created. It serves as an anchor page for all \'\'\'[[Special:WhatLinksHere/Template:Extension_DPL|invocations]]\'\'\' of [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:DynamicPageList3 Extension:DynamicPageList3].</noinclude>', $title );
|
||||||
$updater->setContent( SlotRecord::MAIN, $content );
|
$updater->setContent( SlotRecord::MAIN, $content );
|
||||||
$comment = CommentStoreComment::newUnsavedComment( 'Autogenerated DPL\'s necessary template for content inclusion' );
|
$comment = CommentStoreComment::newUnsavedComment( 'Autogenerated DynamicPageList3\'s necessary template for content inclusion.' );
|
||||||
|
|
||||||
$updater->saveRevision(
|
$updater->saveRevision(
|
||||||
$comment,
|
$comment,
|
||||||
|
|
Loading…
Reference in a new issue