]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correct a couple of bugs
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Sep 2008 19:09:37 +0000 (15:09 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Sep 2008 19:09:37 +0000 (15:09 -0400)
darcs-hash:20080922190937-5ed1f-9439cd9cff178323ac1445f33e2520260b4b267e.gz

classes/User.php
lib/util.php

index 1168406ef8e327f10ddf4dfd39c01c9b8d1d95aa..fcae38c098de2afe49113534234e9265bfcaf6f1 100644 (file)
@@ -149,6 +149,16 @@ class User extends DB_DataObject
        }
 
        function noticesWithFriends($offset=0, $limit=20) {
+
+               # We clearly need a more elegant way to make this work.
+               
+               if (common_config('memcached', 'enabled')) {
+                       if ($offset + $limit <= WITHFRIENDS_CACHE_WINDOW) {
+                               $cached = $this->noticesWithFriendsWindow();
+                               $wrapper = new NoticeWrapper(array_slice($cached, $offset, $limit));
+                               return $wrapper;
+                       } 
+               }
                
                $notice = new Notice();
        
index 48dd1a1b4a075fd106746545d33174854c3eb6d2..edab7aad878b48e0b8cb1950bb51880dac8f7fa0 100644 (file)
@@ -497,7 +497,7 @@ function common_language() {
                     return $language;
                 }
         } else {
-                return $config['site']['language'];
+                return common_config('site', 'language');
         }
 }
 # salted, hashed passwords are stored in the DB