Update CreateTemplate to mention DPL3, not DPL (#166)

This commit is contained in:
Universal Omega 2022-04-14 11:50:05 -06:00 committed by GitHub
parent 4a72ed31c3
commit 7ad00427e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,15 +17,12 @@ if ( $IP === false ) {
require_once "$IP/maintenance/Maintenance.php";
/*
* Creates the DPL template when updating.
*/
class CreateTemplate extends LoggedUpdateMaintenance {
public function __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
*/
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
*/
@ -68,7 +65,7 @@ class CreateTemplate extends LoggedUpdateMaintenance {
$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 );
$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(
$comment,