Page MenuHomePhabricator

Please fix the content model of these Commons modules
Closed, ResolvedPublic

Description

Could someone please clean up the content models of the 16 Commons modules matching listed by the query at http://quarry.wmflabs.org/query/3611,

use commonswiki_p;
SELECT page_title from page where
  page_namespace = 828 and page_title not like '%/doc' and page_content_model = 'wikitext'

If anyone cares, the page titles are:

  • Category_handler
  • Category_handler/blacklist
  • Category_handler/config
  • Category_handler/data
  • Category_handler/shared
  • Chart
  • Documentation/config
  • Effective_protection_level
  • List
  • Lua_banner
  • Message_box
  • Message_box/configuration
  • Namespace_detect/config
  • Namespace_detect/data
  • No_globals
  • Plotter/DefaultColors

(But obviously don't take my word for it!)

Kudos to @Bawolff for writing the initial query (which I modified to show only the one field) and introducing me to the "Quarry" tool.

Event Timeline

SamB raised the priority of this task from to Needs Triage.
SamB updated the task description. (Show Details)
SamB added subscribers: SamB, Bawolff.
$user = User::newFromName( 'Krenair' );
$summary = "[[phabricator:T99157|scribunto content model]]";
$titles = array( "Category_handler", "Category_handler/blacklist", "Category_handler/config", "Category_handler/data", "Category_handler/shared", "Chart", "Documentation/config", "Effective_protection_level", "List", "Lua_banner", "Message_box", "Message_box/configuration", "Namespace_detect/config", "Namespace_detect/data", "No_globals", "Plotter/DefaultColors" );
foreach ( $titles as $title ) {
	$page = WikiPage::factory( Title::newFromText( 'Module:' . $title ) );
	$sc = new ScribuntoContent( $page->getContent()->getNativeData() );
	$page->doEditContent( $sc, $summary, 0, false, $user, $sc->getDefaultFormat() );
}

Seems to have done the trick. Silly imports.