r78243 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78242‎ | r78243 | r78244 >
Date:13:07, 12 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r78242 - removed debug statements, added check for username and password and added docs to settings file
Modified paths:
  • /trunk/extensions/Push/Push_Settings.php (modified) (history)
  • /trunk/extensions/Push/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/Push/api/ApiPush.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Push/Push_Settings.php
@@ -18,19 +18,35 @@
1919 die( 'Not an entry point.' );
2020 }
2121
 22+# List of targets that can be pushed to.
 23+# The array keys are the target names, and the values are the target urls (path to api.php without the '/api.php' part)
 24+# Example: $egPushTargets['English Wikipedia'] = 'http://en.wikipedia.org/w';
2225 $egPushTargets = array();
2326
 27+# Push rights.
2428 $wgGroupPermissions['*']['push'] = true;
2529 $wgGroupPermissions['autoconfirmed']['bulkpush'] = true;
2630 $wgGroupPermissions['sysop']['bulkpush'] = true;
2731 $wgGroupPermissions['sysop']['pushadmin'] = true;
2832
 33+# Show the push action as a tab (if not, it's displayed in the actions dropdown).
 34+# This only works for skins with an actions dropdown. For others push will always appear as a tab.
2935 $egPushShowTab = false;
 36+
 37+# You can choose to include templates when pushing a page.
 38+# This is the default choice.
3039 $egPushIncTemplates = false;
3140
 41+# Indicated if login options should be added to the push interface or not.
3242 $egPushAllowLogin = true;
 43+
 44+# Default login data. When set, the values will always be used when there is
 45+# no login interface. If there is, they will be filled in as default.
3346 $egPushLoginUser = '';
3447 $egPushLoginPass = '';
3548
 49+# The amount of push 'workers' (simultanious push requests) on Special:Push.
3650 $egPushBulkWorkers = 3;
 51+
 52+# The maximum amount of targets to push a page to in one go.
3753 $egPushBatchSize = 3;
Index: trunk/extensions/Push/RELEASE-NOTES
@@ -5,10 +5,11 @@
66
77
88 === Version 0.4 ===
9 -2010-12-xx
 9+2010-12-12
1010
1111 * Added option to include templates used on the page to the push to the tab interface.
12 -* Added adittional info about target pages to the tab interface.
 12+* Added remote authentication support to the push API module.
 13+* Added additional info about target pages to the tab interface.
1314
1415 === Version 0.3 ===
1516 2010-12-10
@@ -22,14 +23,14 @@
2324 === Version 0.2 ===
2425 2010-12-08
2526
26 -* Added Special:Push for bulk pushing
27 -* Added AdminLinks hook
 27+* Added Special:Push for bulk pushing.
 28+* Added AdminLinks hook.
2829
2930 === Version 0.1 ===
3031 2010-12-08
3132
3233 Initial release.
3334
34 -* Added push tab that allows pushing the page to one or more other wikis
35 -* Added ApprovedRevs support
36 -* Added 'push' right
\ No newline at end of file
 35+* Added push tab that allows pushing the page to one or more other wikis.
 36+* Added ApprovedRevs support.
 37+* Added 'push' right.
\ No newline at end of file
Index: trunk/extensions/Push/api/ApiPush.php
@@ -48,7 +48,9 @@
4949 }
5050
5151 global $egPushLoginUser, $egPushLoginPass;
52 - $this->doLogin( $egPushLoginUser, $egPushLoginPass, $params['targets'] );
 52+ if ( $egPushLoginUser != '' && $egPushLoginPass != '' ) {
 53+ $this->doLogin( $egPushLoginUser, $egPushLoginPass, $params['targets'] );
 54+ }
5355
5456 foreach ( $params['page'] as $page ) {
5557 $title = Title::newFromText( $page );
@@ -139,7 +141,7 @@
140142 $this->cookieJars[$target] = $req->getCookieJar();
141143 }
142144 else {
143 - var_dump($response->login);exit;
 145+ // TODO
144146 }
145147 }
146148 else {
@@ -335,9 +337,6 @@
336338 if ( array_key_exists( $target, $this->cookieJars ) ) {
337339 $req->setCookieJar( $this->cookieJars[$target] );
338340 }
339 - else {
340 - var_dump($this->cookieJars);exit;
341 - }
342341
343342 $status = $req->execute();
344343

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78242Implemented remote authentication via the apijeroendedauw12:40, 12 December 2010

Status & tagging log