svn: /web/doc-editor/trunk/php/ SvnClient.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
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