svn: /web/doc-editor/trunk/php/ SvnClient.php

From: Date: Tue, 19 Jul 2011 23:45:15 +0000
Subject: svn: /web/doc-editor/trunk/php/ SvnClient.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-2105@lists.php.net to get a copy of this message
yannick Tue, 19 Jul 2011 23:45:15 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313460 Log: Fix karma process Changed paths: U web/doc-editor/trunk/php/SvnClient.php Modified: web/doc-editor/trunk/php/SvnClient.php =================================================================== --- web/doc-editor/trunk/php/SvnClient.php 2011-07-19 23:16:41 UTC (rev 313459) +++ web/doc-editor/trunk/php/SvnClient.php 2011-07-19 23:45:15 UTC (rev 313460) @@ -24,11 +24,12 @@ // If this data is older than 1 day, we update it $data = RepositoryFetcher::getStaticValue('karma_list', ''); - if( $data === false || ($data["update_time"] + (24*60*60)) > time() ) { + if( $data === false || ($data->update_time + (24*60*60)) > time() ) { $this->updateKarmaList(); $data = RepositoryFetcher::getStaticValue('karma_list', ''); } - return $data["data"]; + + return $data->data; } private function updateKarmaList() @@ -82,8 +83,12 @@ { $userList = $this->getKarmaList(); + $userList = (array) $userList; + if( isset($userList[$user]) ) { + $userList[$user] = (array) $userList[$user]; + $karma = $userList[$user]['karma']; // Must have ALL, phpdoc or phpdoc/$lang

« previous php.doc.web (#2105) next »