Index: trunk/extensions/UserDailyContribs/api/ApiUserDailyContribs.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | |
33 | 33 | // Returns date of registration in YYYYMMDDHHMMSS format |
34 | 34 | $result->addValue( $this->getModuleName(), |
35 | | - 'registration', !$user->getRegistration() ? '0' : $user->getRegistration() ); |
| 35 | + 'registration', $user->getRegistration() ? $user->getRegistration() : '0' ); |
36 | 36 | |
37 | 37 | // Returns number of edits between daysago date and basetimestamp (or today) |
38 | 38 | $result->addValue( $this->getModuleName(), |
Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -282,7 +282,7 @@ |
283 | 283 | |
284 | 284 | $launchTimestamp = wfTimestamp( TS_UNIX, '2011-12-06 00:00:00' ); |
285 | 285 | $groups = $wgUser->getGroups(); |
286 | | - $registrationDate = !$wgUser->getRegistration() ? 0 : $wgUser->getRegistration(); |
| 286 | + $registrationDate = $wgUser->getRegistration() ? $wgUser->getRegistration() : 0; |
287 | 287 | $daysOld = floor( ( $launchTimestamp - wfTimestamp( TS_UNIX, $registrationDate ) ) / ( 60*60*24 ) ); |
288 | 288 | $salt = $wgNoticeBanner_Harvard2011_salt; |
289 | 289 | $metrics = array( |