r90797 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90796‎ | r90797 | r90798 >
Date:19:51, 25 June 2011
Author:ankitgarg833
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/PageSchemas/specials/GeneratePages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PageSchemas/specials/GeneratePages.php
@@ -29,7 +29,10 @@
3030 //this is when Special:GeneratePages/Category is accessed first time
3131 //Here check for the valid Category name and allow for generating pages
3232 $title = Title::newFromText( $category, NS_CATEGORY );
33 - $pageId = $title->getArticleID();
 33+ $pageId = $title->getArticleID();
 34+ $test_text = Title::newFromId($pageId)->getText();
 35+ wfDebugLog( 'myextension', 'newFromId: ' .$test_text );
 36+ wfDebugLog( 'myextension', 'newFromId->getNamespace(): ' .Title::newFromId($pageId)->getNamespace() );
3437 $dbr = wfGetDB( DB_SLAVE );
3538 //get the result set, query : slect page_props
3639 $res = $dbr->select( 'page_props',
@@ -48,7 +51,7 @@
4952 if( $row != null ){
5053 $wgOut->addHTML($text_2);
5154 }else {
52 - $text = "<p>No such category exist ! </p>";
 55+ $text = "<p>Error: there is no page schema defined for that category in the wiki. </p>";
5356 $wgOut->addHTML( $text );
5457 }
5558 }

Status & tagging log