correct a couple of bugs

darcs-hash:20080922190937-5ed1f-9439cd9cff178323ac1445f33e2520260b4b267e.gz
This commit is contained in:
Evan Prodromou 2008-09-22 15:09:37 -04:00
parent d73ed53535
commit e24425d44e
2 changed files with 11 additions and 1 deletions

View 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();

View 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