Index: trunk/extensions/DSMW/DSMW_Settings.php |
— | — | @@ -10,6 +10,9 @@ |
11 | 11 | define( "PULLFEED", 210 ); |
12 | 12 | define( "CHANGESET", 220 ); |
13 | 13 | |
| 14 | +define( 'INT_MAX', '1000000000000000000000' ); // 22 |
| 15 | +define( 'INT_MIN', '0' ); |
| 16 | + |
14 | 17 | $wgExtraNamespaces[PATCH] = "Patch"; |
15 | 18 | $wgExtraNamespaces[PUSHFEED] = "PushFeed"; |
16 | 19 | $wgExtraNamespaces[PULLFEED] = "PullFeed"; |
Index: trunk/extensions/DSMW/DSMW.php |
— | — | @@ -9,7 +9,9 @@ |
10 | 10 | * |
11 | 11 | * @copyright 2009 INRIA-LORIA-ECOO project |
12 | 12 | * |
13 | | - * @author jean-philippe muller & Morel Émile |
| 13 | + * @author jean-philippe muller |
| 14 | + * @author Morel Émile |
| 15 | + * @author Jeroen De Dauw |
14 | 16 | */ |
15 | 17 | |
16 | 18 | /** |
— | — | @@ -34,8 +36,14 @@ |
35 | 37 | |
36 | 38 | define( 'DSMW_VERSION', '1.1 alpha' ); |
37 | 39 | |
| 40 | +// Load and register the StoryReview special page and register it's group. |
| 41 | +$wgSpecialPages['ArticleAdminPage'] = 'ArticleAdminPage'; |
38 | 42 | $wgSpecialPageGroups['ArticleAdminPage'] = 'dsmw_group'; |
| 43 | + |
| 44 | +$wgSpecialPages['DSMWAdmin'] = 'DSMWAdmin'; |
39 | 45 | $wgSpecialPageGroups['DSMWAdmin'] = 'dsmw_group'; |
| 46 | + |
| 47 | +$wgSpecialPages['DSMWGeneralExhibits'] = 'DSMWGeneralExhibits'; |
40 | 48 | $wgSpecialPageGroups['DSMWGeneralExhibits'] = 'dsmw_group'; |
41 | 49 | |
42 | 50 | $wgGroupPermissions['*']['upload_by_url'] = true; |
Index: trunk/extensions/DSMW/includes/DSMW_GlobalFunctions.php |
— | — | @@ -38,7 +38,3 @@ |
39 | 39 | else |
40 | 40 | return 0; |
41 | 41 | } |
42 | | - |
43 | | -define( 'INT_MAX', '1000000000000000000000' ); // 22 |
44 | | -define( 'INT_MIN', '0' ); |
45 | | - |
Index: trunk/extensions/DSMW/specialPage/ArticleAdminPage.php |
— | — | @@ -9,9 +9,6 @@ |
10 | 10 | require_once "$IP/includes/SpecialPage.php"; |
11 | 11 | require_once "$wgDSMWIP/files/utils.php"; |
12 | 12 | |
13 | | -/* Extension variables */ |
14 | | -$wgExtensionFunctions[] = "wfSetupAdminPage"; |
15 | | - |
16 | 13 | class ArticleAdminPage extends SpecialPage { |
17 | 14 | |
18 | 15 | public function __construct() { |
— | — | @@ -740,16 +737,4 @@ |
741 | 738 | return $article; |
742 | 739 | } |
743 | 740 | |
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 @@ |
10 | 10 | |
11 | 11 | require_once "$IP/includes/SpecialPage.php"; |
12 | 12 | |
13 | | -/* Extension variables */ |
14 | | -$wgExtensionFunctions[] = 'wfSetupDSMWAdmin'; |
15 | | - |
16 | 13 | class DSMWAdmin extends SpecialPage { |
17 | 14 | |
18 | 15 | public function __construct() { |
— | — | @@ -135,18 +132,6 @@ |
136 | 133 | |
137 | 134 | $wgOut->addHTML( $output ); |
138 | 135 | return false; |
139 | | -}// end execute fct |
| 136 | + } |
140 | 137 | |
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 | | - } |
153 | 138 | } |
Index: trunk/extensions/DSMW/specialPage/DSMWGeneralExhibits.php |
— | — | @@ -11,10 +11,6 @@ |
12 | 12 | |
13 | 13 | require_once "$IP/includes/SpecialPage.php"; |
14 | 14 | |
15 | | -/* Extension variables */ |
16 | | -// FIXME |
17 | | -$wgExtensionFunctions[] = 'wfSetupDSMWGenExhibits'; |
18 | | - |
19 | 15 | class DSMWGeneralExhibits extends SpecialPage { |
20 | 16 | |
21 | 17 | public function __construct() { |
— | — | @@ -150,18 +146,6 @@ |
151 | 147 | $wgOut->addWikiText( $wikitext ); |
152 | 148 | |
153 | 149 | return false; |
154 | | -}// end execute fct |
| 150 | + }// end execute fct |
155 | 151 | |
156 | | - |
157 | 152 | } |
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 | | -} |