r77757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77756‎ | r77757 | r77758 >
Date:03:03, 5 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed mispaces settings and weird registration of special pages
Modified paths:
  • /trunk/extensions/DSMW/DSMW.php (modified) (history)
  • /trunk/extensions/DSMW/DSMW_Settings.php (modified) (history)
  • /trunk/extensions/DSMW/includes/DSMW_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/DSMW/specialPage/ArticleAdminPage.php (modified) (history)
  • /trunk/extensions/DSMW/specialPage/DSMWAdmin.php (modified) (history)
  • /trunk/extensions/DSMW/specialPage/DSMWGeneralExhibits.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DSMW/DSMW_Settings.php
@@ -10,6 +10,9 @@
1111 define( "PULLFEED", 210 );
1212 define( "CHANGESET", 220 );
1313
 14+define( 'INT_MAX', '1000000000000000000000' ); // 22
 15+define( 'INT_MIN', '0' );
 16+
1417 $wgExtraNamespaces[PATCH] = "Patch";
1518 $wgExtraNamespaces[PUSHFEED] = "PushFeed";
1619 $wgExtraNamespaces[PULLFEED] = "PullFeed";
Index: trunk/extensions/DSMW/DSMW.php
@@ -9,7 +9,9 @@
1010 *
1111 * @copyright 2009 INRIA-LORIA-ECOO project
1212 *
13 - * @author jean-philippe muller & Morel Émile
 13+ * @author jean-philippe muller
 14+ * @author Morel Émile
 15+ * @author Jeroen De Dauw
1416 */
1517
1618 /**
@@ -34,8 +36,14 @@
3537
3638 define( 'DSMW_VERSION', '1.1 alpha' );
3739
 40+// Load and register the StoryReview special page and register it's group.
 41+$wgSpecialPages['ArticleAdminPage'] = 'ArticleAdminPage';
3842 $wgSpecialPageGroups['ArticleAdminPage'] = 'dsmw_group';
 43+
 44+$wgSpecialPages['DSMWAdmin'] = 'DSMWAdmin';
3945 $wgSpecialPageGroups['DSMWAdmin'] = 'dsmw_group';
 46+
 47+$wgSpecialPages['DSMWGeneralExhibits'] = 'DSMWGeneralExhibits';
4048 $wgSpecialPageGroups['DSMWGeneralExhibits'] = 'dsmw_group';
4149
4250 $wgGroupPermissions['*']['upload_by_url'] = true;
Index: trunk/extensions/DSMW/includes/DSMW_GlobalFunctions.php
@@ -38,7 +38,3 @@
3939 else
4040 return 0;
4141 }
42 -
43 -define( 'INT_MAX', '1000000000000000000000' ); // 22
44 -define( 'INT_MIN', '0' );
45 -
Index: trunk/extensions/DSMW/specialPage/ArticleAdminPage.php
@@ -9,9 +9,6 @@
1010 require_once "$IP/includes/SpecialPage.php";
1111 require_once "$wgDSMWIP/files/utils.php";
1212
13 -/* Extension variables */
14 -$wgExtensionFunctions[] = "wfSetupAdminPage";
15 -
1613 class ArticleAdminPage extends SpecialPage {
1714
1815 public function __construct() {
@@ -740,16 +737,4 @@
741738 return $article;
742739 }
743740
744 -
745 -} // end class
746 -
747 -/* Global function */
748 -# Called from $wgExtensionFunctions array when initialising extensions
749 -function wfSetupAdminPage() {
750 - global $wgUser;
751 - SpecialPage::addPage( new ArticleAdminPage );
752 - if ( $wgUser->isAllowed( "ArticleAdminPage" ) ) {
753 - global $wgArticleAdminPage;
754 - $wgArticleAdminPage = new ArticleAdminPage();
755 - }
756 -}
 741+}
Index: trunk/extensions/DSMW/specialPage/DSMWAdmin.php
@@ -9,9 +9,6 @@
1010
1111 require_once "$IP/includes/SpecialPage.php";
1212
13 -/* Extension variables */
14 -$wgExtensionFunctions[] = 'wfSetupDSMWAdmin';
15 -
1613 class DSMWAdmin extends SpecialPage {
1714
1815 public function __construct() {
@@ -135,18 +132,6 @@
136133
137134 $wgOut->addHTML( $output );
138135 return false;
139 -}// end execute fct
 136+ }
140137
141 -
142 -}// end class
143 -
144 -/* Global function */
145 -# Called from $wgExtensionFunctions array when initialising extensions
146 -function wfSetupDSMWAdmin() {
147 - global $wgUser;
148 - SpecialPage::addPage( new DSMWAdmin() );
149 - if ( $wgUser->isAllowed( "DSMWAdmin" ) ) {
150 - global $wgDSMWAdmin;
151 - $wgDSMWAdmin = new DSMWAdmin();
152 - }
153138 }
Index: trunk/extensions/DSMW/specialPage/DSMWGeneralExhibits.php
@@ -11,10 +11,6 @@
1212
1313 require_once "$IP/includes/SpecialPage.php";
1414
15 -/* Extension variables */
16 -// FIXME
17 -$wgExtensionFunctions[] = 'wfSetupDSMWGenExhibits';
18 -
1915 class DSMWGeneralExhibits extends SpecialPage {
2016
2117 public function __construct() {
@@ -150,18 +146,6 @@
151147 $wgOut->addWikiText( $wikitext );
152148
153149 return false;
154 -}// end execute fct
 150+ }// end execute fct
155151
156 -
157152 }
158 -
159 -/* Global function */
160 -# Called from $wgExtensionFunctions array when initialising extensions
161 -function wfSetupDSMWGenExhibits() {
162 - global $wgUser;
163 - SpecialPage::addPage( new DSMWGeneralExhibits() );
164 - if ( $wgUser->isAllowed( "DSMWGeneralExhibits" ) ) {
165 - global $wgDSMWGenExhibits;
166 - $wgDSMWGenExhibits = new DSMWGeneralExhibits();
167 - }
168 -}

Status & tagging log