* PHP Fatal error: Call to a member function getID() on a non-object
This commit is contained in:
parent
94a8bf4a1e
commit
da08796364
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ function efContributionScores_Render(&$parser, $usertext, $metric='score') {
|
|||
$user = User::newFromName($usertext);
|
||||
$dbr = wfGetDB( DB_SLAVE );
|
||||
|
||||
if ($user->getID() != 0) {
|
||||
if ( $user instanceof User && $user->isLoggedIn() ) {
|
||||
if ($metric=='score') {
|
||||
$res = $dbr->select('revision',
|
||||
'COUNT(DISTINCT rev_page)+SQRT(COUNT(rev_id)-COUNT(DISTINCT rev_page))*2 AS wiki_rank',
|
||||
|
|
Loading…
Add table
Reference in a new issue