Index: trunk/extensions/Collection/Collection.i18n.php |
— | — | @@ -125,15 +125,6 @@ |
126 | 126 | 'coll-invalid_podpartner_msg' => 'The supplied POD partner is invalid. |
127 | 127 | Please contact your MediaWiki administrator.', |
128 | 128 | 'coll-license' => 'License', |
129 | | - 'coll-start_title' => "Start collection", |
130 | | - 'coll-start_text' => "From now on, you can collect pages, generate and download a document in one of several formats from page collections or from single pages, order books from a print-on-demand partner, and save page collections for later use, or to share them. |
131 | | - |
132 | | -See the [[{{MediaWiki:Coll-helppage}}|help page about collections]] for more information. |
133 | | -", |
134 | | - 'coll-start_add_box_title' => "Start collection right now", |
135 | | - 'coll-start_add_link' => "Click to start your collection.", |
136 | | - 'coll-start_add_page_text' => "Click to add the page <em>$1</em> to your collection", |
137 | | - 'coll-start_add_page_category' => "Click to add the pages in category <em>$1</em> to your collection", |
138 | 129 | 'coll-return_to' => "Return to [[:$1]]", |
139 | 130 | ); |
140 | 131 | |
Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -37,9 +37,6 @@ |
38 | 38 | |
39 | 39 | # Configuration: |
40 | 40 | |
41 | | -/** Title of Start Collection page */ |
42 | | -$wgCollectionStartPage = 'Start collection'; |
43 | | - |
44 | 41 | /** URL of mw-serve render server */ |
45 | 42 | $wgCollectionMWServeURL = 'http://tools.pediapress.com/mw-serve/'; |
46 | 43 | |
Index: trunk/extensions/Collection/README.txt |
— | — | @@ -98,15 +98,6 @@ |
99 | 99 | |
100 | 100 | See mwlib_ for possible other writers. |
101 | 101 | |
102 | | - *$wgCollectionStartPage (string)* |
103 | | - Title of a page that is displayed when a user clicks on "Start collection", |
104 | | - i.e. is using the Collection extension "for the first time" (actually it's |
105 | | - not necessarily the first time, because it can be turned off again on the |
106 | | - Special:Collection page). If the page does not exist, a (short) fallback |
107 | | - page is displayed which essentially links to the Help:Collections page. |
108 | | - |
109 | | - Default is 'Start collection'. |
110 | | - |
111 | 102 | *$wgCommunityCollectionNamespace (integer)* |
112 | 103 | Namespace for "community collections", i.e. the namespace where non-personal |
113 | 104 | article collection pages are saved. |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -55,15 +55,7 @@ |
56 | 56 | |
57 | 57 | wfLoadExtensionMessages( 'Collection' ); |
58 | 58 | |
59 | | - if ( $par == 'start_collection/' ) { |
60 | | - $art_url = $wgRequest->getVal( 'arttitle', '' ); |
61 | | - $oldid = $wgRequest->getInt( 'oldid', 0 ); |
62 | | - $art_title = Title::newFromURL( $art_url ); |
63 | | - $cat_url = $wgRequest->getVal( 'cattitle', '' ); |
64 | | - $cat_title = Title::makeTitleSafe( NS_CATEGORY, $cat_url ); |
65 | | - $this->startCollection( $art_title, $olid, $cat_title ); |
66 | | - return; |
67 | | - } else if ( $par == 'add_article/' ) { |
| 59 | + if ( $par == 'add_article/' ) { |
68 | 60 | if ( self::countArticles() >= $wgCollectionMaxArticles ) { |
69 | 61 | $this->limitExceeded(); |
70 | 62 | return; |
— | — | @@ -171,12 +163,6 @@ |
172 | 164 | $this->outputSaveOverwrite( $title ); |
173 | 165 | } |
174 | 166 | return; |
175 | | - } else if ( $par == 'disable_collection/' ) { |
176 | | - if ( self::hasSession() ) { |
177 | | - unset( $_SESSION['wsCollection'] ); |
178 | | - } |
179 | | - $mp = Title::newFromText( wfMsgNoDB( "mainpage" ) ); |
180 | | - $wgOut->redirect( $mp->getFullURL() ); |
181 | 167 | } else if ( $par == 'render/' ) { |
182 | 168 | $title = $wgRequest->getVal( 'downloadTitle', '' ); |
183 | 169 | if ( $title ) { |
— | — | @@ -219,7 +205,6 @@ |
220 | 206 | $this->outputBookSection(); |
221 | 207 | $this->outputDownloadSection(); |
222 | 208 | $this->outputSaveSection(); |
223 | | - $this->outputDisableSection(); |
224 | 209 | $this->outputIntro(); |
225 | 210 | $this->outputArticleList(); |
226 | 211 | } |
— | — | @@ -284,68 +269,6 @@ |
285 | 270 | return -1; |
286 | 271 | } |
287 | 272 | |
288 | | - function startCollection( $title, $oldid, $cat_title ) { |
289 | | - global $wgOut; |
290 | | - global $wgCollectionStartPage; |
291 | | - |
292 | | - if ( !self::hasSession() ) { |
293 | | - self::startSession(); |
294 | | - } |
295 | | - |
296 | | - $wgOut->setPageTitle( wfMsg( 'coll-collection' ) ); |
297 | | - |
298 | | - if ( !is_null( $title ) or !is_null( $cat_title ) ) { |
299 | | - if ( !is_null( $title ) ) { |
300 | | - $params = 'arttitle=' . $title->getPrefixedURL(); |
301 | | - if ( $oldid ) { |
302 | | - $params .= '&oldid=' . $oldid; |
303 | | - } |
304 | | - $addLinkURL = htmlspecialchars( wfAppendQuery( SkinTemplate::makeSpecialUrlSubpage( |
305 | | - 'Collection', |
306 | | - 'add_article/' |
307 | | - ), $params ) ); |
308 | | - $addLinkLabel = wfMsg( "coll-start_add_page_text", $title->getPrefixedText() ); |
309 | | - } else { |
310 | | - $params = 'cattitle=' . $cat_title->getPartialURL(); |
311 | | - $addLinkURL = htmlspecialchars( wfAppendQuery( SkinTemplate::makeSpecialUrlSubpage( |
312 | | - 'Collection', |
313 | | - 'add_category/' |
314 | | - ), $params ) ); |
315 | | - $addLinkLabel = wfMsg( "coll-start_add_category_text", $link ); |
316 | | - } |
317 | | - //$addLinkLabel = wfMsg( "coll-start_add_link", $title->getPrefixedText() ); |
318 | | - $wgOut->addHTML( <<<EOS |
319 | | -<table align="center" margin-bottom: 10px;" class="toccolours" width="50%"> |
320 | | - <tr> |
321 | | - <td align="center"> |
322 | | - <a href="$addLinkURL" rel="nofollow"><strong>$addLinkLabel</strong></a><br/> |
323 | | - </td> |
324 | | - </tr> |
325 | | -</table> |
326 | | -EOS |
327 | | - ); |
328 | | - } |
329 | | - |
330 | | - $fallback = true; |
331 | | - $startPageTitle = Title::newFromText( $wgCollectionStartPage ); |
332 | | - if ( !is_null( $startPageTitle ) ) { |
333 | | - $startPage = new Article( $startPageTitle ); |
334 | | - if ( $startPage->exists() ) { |
335 | | - $wgOut->addWikiText( "{{:$wgCollectionStartPage}}" ); |
336 | | - $fallback = false; |
337 | | - } |
338 | | - } |
339 | | - if ( $fallback ) { |
340 | | - $wgOut->addWikiText( wfMsg( 'coll-start_text' ) ); |
341 | | - } |
342 | | - |
343 | | - if ( $title ) { |
344 | | - $wgOut->addWikiText( wfMsg( 'coll-return_to', $title->getPrefixedText() ) ); |
345 | | - } else if ( $cat_title ) { |
346 | | - $wgOut->addWikiText( wfMsg( 'coll-return_to', $cat_title->getPrefixedText() ) ); |
347 | | - } |
348 | | - } |
349 | | - |
350 | 273 | function addArticle( $title, $oldid=0 ) { |
351 | 274 | $article = new Article( $title, $oldid ); |
352 | 275 | $latest = $article->getLatest(); |
— | — | @@ -1018,14 +941,6 @@ |
1019 | 942 | $this->outputBox( $html ); |
1020 | 943 | } |
1021 | 944 | |
1022 | | - private function outputDisableSection() { |
1023 | | - $html = '<p>' . wfMsg( |
1024 | | - 'coll-disable_collection_text', |
1025 | | - htmlspecialchars( SkinTemplate::makeSpecialUrlSubpage( 'Collection', 'disable_collection/' ) ) |
1026 | | - ) . '</p>'; |
1027 | | - $this->outputBox( $html ); |
1028 | | - } |
1029 | | - |
1030 | 945 | private function outputSaveOverwrite( $title ) { |
1031 | 946 | global $wgOut; |
1032 | 947 | |
— | — | @@ -1268,35 +1183,8 @@ |
1269 | 1184 | 'load_collection/' |
1270 | 1185 | ), $params ) ); |
1271 | 1186 | $out .= "<li><a href=\"$href\" rel=\"nofollow\">$loadCollection</a></li>"; |
1272 | | - } else if ( !self::hasSession() ) { |
1273 | | - $startURL = SkinTemplate::makeSpecialUrlSubpage( |
1274 | | - 'Collection', |
1275 | | - 'start_collection/' |
1276 | | - ); |
1277 | | - if ( $wgRequest->getRequestURL() == $startURL ) { |
1278 | | - return; |
1279 | | - } |
1280 | | - $params = null; |
1281 | | - if ( !is_null($wgArticle) && $wgArticle->exists() ) { |
1282 | | - if ( $wgTitle->getNamespace() == NS_MAIN ) { // TODO: only NS_MAIN? |
1283 | | - $params = "arttitle=" . $wgTitle->getPrefixedUrl() |
1284 | | - . "&oldid=" . $wgArticle->getOldID(); |
1285 | | - } else if ( $wgTitle->getNamespace() == NS_CATEGORY ) { |
1286 | | - $params = "cattitle=" . $wgTitle->getPartialURL(); |
1287 | | - } |
1288 | | - } |
1289 | | - $startURL = SkinTemplate::makeSpecialUrlSubpage( |
1290 | | - 'Collection', |
1291 | | - 'start_collection/' |
1292 | | - ); |
1293 | | - if ( $params ) { |
1294 | | - $startURL = wfAppendQuery( $startURL, $params ); |
1295 | | - } |
1296 | | - $startURL = htmlspecialchars( $startURL ); |
1297 | | - $startLabel = 'Start collection'; |
1298 | | - $out .= "<li><a href=\"$startURL\">$startLabel</a></li>"; |
1299 | 1187 | } else { |
1300 | | - |
| 1188 | + |
1301 | 1189 | // disable caching |
1302 | 1190 | $wgOut->setSquidMaxage( 0 ); |
1303 | 1191 | $wgOut->enableClientCache( false ); |