diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spawningdaemon.php | 2 | ||||
-rw-r--r-- | lib/stompqueuemanager.php | 2 | ||||
-rw-r--r-- | lib/util.php | 24 |
3 files changed, 11 insertions, 17 deletions
diff --git a/lib/spawningdaemon.php b/lib/spawningdaemon.php index 2f9f6e32e..ea09b6fb2 100644 --- a/lib/spawningdaemon.php +++ b/lib/spawningdaemon.php @@ -204,7 +204,7 @@ abstract class SpawningDaemon extends Daemon // Reconnect main memcached, or threads will stomp on // each other and corrupt their requests. - $cache = common_memcache(); + $cache = Cache::instance(); if ($cache) { $cache->reconnect(); } diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php index fc98c77d4..1d9a5ad20 100644 --- a/lib/stompqueuemanager.php +++ b/lib/stompqueuemanager.php @@ -578,7 +578,7 @@ class StompQueueManager extends QueueManager function incDeliveryCount($msgId) { $count = 0; - $cache = common_memcache(); + $cache = Cache::instance(); if ($cache) { $key = 'statusnet:stomp:message-retries:' . $msgId; $count = $cache->increment($key); diff --git a/lib/util.php b/lib/util.php index b7d3c80ca..d56c9124d 100644 --- a/lib/util.php +++ b/lib/util.php @@ -37,7 +37,7 @@ function common_user_error($msg, $code=400) /** * This should only be used at setup; processes switching languages * to send text to other users should use common_switch_locale(). - * + * * @param string $language Locale language code (optional; empty uses * current user's preference or site default) * @return mixed success @@ -61,10 +61,10 @@ function common_init_locale($language=null) /** * Initialize locale and charset settings and gettext with our message catalog, * using the current user's language preference or the site default. - * + * * This should generally only be run at framework initialization; code switching * languages at runtime should call common_switch_language(). - * + * * @access private */ function common_init_language() @@ -142,7 +142,6 @@ function common_switch_locale($language=null) textdomain("statusnet"); } - function common_timezone() { if (common_logged_in()) { @@ -1361,13 +1360,13 @@ function common_mtrand($bytes) /** * Record the given URL as the return destination for a future * form submission, to be read by common_get_returnto(). - * + * * @param string $url - * + * * @fixme as a session-global setting, this can allow multiple forms * to conflict and overwrite each others' returnto destinations if * the user has multiple tabs or windows open. - * + * * Should refactor to index with a token or otherwise only pass the * data along its intended path. */ @@ -1380,13 +1379,13 @@ function common_set_returnto($url) /** * Fetch a return-destination URL previously recorded by * common_set_returnto(). - * + * * @return mixed URL string or null - * + * * @fixme as a session-global setting, this can allow multiple forms * to conflict and overwrite each others' returnto destinations if * the user has multiple tabs or windows open. - * + * * Should refactor to index with a token or otherwise only pass the * data along its intended path. */ @@ -1809,11 +1808,6 @@ function common_keyize($str) return Cache::keyize($str); } -function common_memcache() -{ - return Cache::instance(); -} - function common_license_terms($uri) { if(preg_match('/creativecommons.org\/licenses\/([^\/]+)/', $uri, $matches)) { |