Index: trunk/extensions/PageSchemas/PS_Tabs.php |
— | — | @@ -61,11 +61,11 @@ |
62 | 62 | |
63 | 63 | $categoryName = $title->getText(); |
64 | 64 | if ( $action == 'generatepages' ) { |
65 | | - $gen_page = new GeneratePages(); |
| 65 | + $gen_page = new PSGeneratePages(); |
66 | 66 | $gen_page->execute( $categoryName ); |
67 | 67 | return false; |
68 | 68 | } elseif ( $action == 'editschema' ) { |
69 | | - $edit_schema = new EditSchema(); |
| 69 | + $edit_schema = new PSEditSchema(); |
70 | 70 | $edit_schema->execute( $categoryName ); |
71 | 71 | return false; |
72 | 72 | } |
Index: trunk/extensions/PageSchemas/PageSchemas.classes.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | if ( $namespace != '' ) { |
66 | 66 | $namespace .= ':'; |
67 | 67 | } |
68 | | - if ( self::isCapitalized( $title ) ) { |
| 68 | + if ( MWNamespace::isCapitalized( $title->getNamespace() ) ) { |
69 | 69 | global $wgContLang; |
70 | 70 | return $namespace . $wgContLang->ucfirst( $title->getText() ); |
71 | 71 | } else { |
— | — | @@ -72,10 +72,6 @@ |
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | | - public static function isCapitalized( $title ) { |
77 | | - return MWNamespace::isCapitalized( $title->getNamespace() ); |
78 | | - } |
79 | | - |
80 | 76 | public static function validateXML( $xml, &$error_msg ) { |
81 | 77 | $xmlDTD =<<<END |
82 | 78 | <?xml version="1.0" encoding="utf-8"?> |
Index: trunk/extensions/PageSchemas/specials/PS_GeneratePages.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * @author Ankit Garg |
7 | 7 | */ |
8 | 8 | |
9 | | -class GeneratePages extends IncludableSpecialPage { |
| 9 | +class PSGeneratePages extends IncludableSpecialPage { |
10 | 10 | function __construct() { |
11 | 11 | parent::__construct( 'GeneratePages' ); |
12 | 12 | } |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | $this->setHeaders(); |
18 | 18 | $param = $wgRequest->getText('param'); |
19 | 19 | if ( $param != "" && $category != "" ) { |
20 | | - $this->generatePages( $param, $_POST['page'] ); |
| 20 | + $this->generatePages( $param, $wgRequest->getValues( 'page' ) ); |
21 | 21 | $text = '<p>All pages will be generated! </p>'; |
22 | 22 | $wgOut->addHTML( $text ); |
23 | 23 | return true; |
— | — | @@ -66,7 +66,7 @@ |
67 | 67 | return true; |
68 | 68 | } |
69 | 69 | |
70 | | - function generatePages ( $categoryName, $toGenPageList ) { |
| 70 | + function generatePages( $categoryName, $toGenPageList ) { |
71 | 71 | $pageSchema = new PSSchema( $categoryName ); |
72 | 72 | $pageSchema->generateAllPages( $toGenPageList ); |
73 | 73 | } |
Index: trunk/extensions/PageSchemas/specials/PS_EditSchema.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * @author Ankit Garg |
7 | 7 | */ |
8 | 8 | |
9 | | -class EditSchema extends IncludableSpecialPage { |
| 9 | +class PSEditSchema extends IncludableSpecialPage { |
10 | 10 | function __construct() { |
11 | 11 | parent::__construct( 'EditSchema' ); |
12 | 12 | } |
Index: trunk/extensions/PageSchemas/PageSchemas.php |
— | — | @@ -45,12 +45,12 @@ |
46 | 46 | $wgAutoloadClasses['PageSchemas'] = $dir . 'PageSchemas.classes.php'; |
47 | 47 | $wgAutoloadClasses['PSSchema'] = $dir . 'PageSchemas.classes.php'; |
48 | 48 | $wgAutoloadClasses['ApiQueryPageSchemas'] = $dir . 'ApiQueryPageSchemas.php'; |
49 | | -$wgAutoloadClasses['GeneratePages'] = $dir . 'specials/PS_GeneratePages.php'; |
50 | | -$wgAutoloadClasses['EditSchema'] = $dir . 'specials/PS_EditSchema.php'; |
| 49 | +$wgAutoloadClasses['PSGeneratePages'] = $dir . 'specials/PS_GeneratePages.php'; |
| 50 | +$wgAutoloadClasses['PSEditSchema'] = $dir . 'specials/PS_EditSchema.php'; |
51 | 51 | $wgAutoloadClasses['PSTabs'] = $dir . 'PS_Tabs.php'; |
52 | 52 | // registering Special page |
53 | | -$wgSpecialPages['GeneratePages'] = 'GeneratePages'; |
54 | | -$wgSpecialPages['EditSchema'] = 'EditSchema'; |
| 53 | +$wgSpecialPages['GeneratePages'] = 'PSGeneratePages'; |
| 54 | +$wgSpecialPages['EditSchema'] = 'PSEditSchema'; |
55 | 55 | $wgSpecialPageGroups['GeneratePages'] = 'other'; |
56 | 56 | $wgSpecialPageGroups['EditSchema'] = 'other'; |
57 | 57 | // Register parser hook |