r105901 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r105900
|
r105901
|
r105902
>
Date:
16:32, 12 December 2011
Author:
gregchiasson
Status:
ok
Tags:
Comment:
AFTv5 - fix a privacy issue introduced by
r105448
- apparently we only want to store IP addresses for anonymous submissions, not ones from registered users.
Modified paths:
/trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
—
—
@@ -448,8 +448,13 @@
449
449
$link = $params['link'];
450
450
$token = $this->getAnonToken( $params );
451
451
$timestamp = $dbw->timestamp();
452
- $ip = wfGetIP();
452
+ $ip = null;
453
453
454
+ // Only save IP address if the user isn't logged in.
455
+ if( !$wgUser->isLoggedIn() ) {
456
+ $ip = wfGetIP();
457
+ }
458
+
454
459
# make sure we have a page/user
455
460
if ( !$params['pageid'] || !$wgUser) {
456
461
return null;
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r105448
Making long-delayed schema updates to AFTv5, per Roan's feedback in the CodeR...
gregchiasson
18:37, 7 December 2011
Status & tagging log
21:08, 12 December 2011
Catrope
(
talk
|
contribs
)
changed the
status
of r105901
[
removed:
new
added:
ok]