diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-06-20 15:53:32 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-06-20 15:53:32 -0700 |
commit | 2826dc077c405ee0b63713d989983085ff230ac3 (patch) | |
tree | d9fa4e55822fac80d94d13500e06616821f640fb | |
parent | 5023e99301cd7576ea25056b77a43576a6e36b9a (diff) | |
parent | 7e59ef7adec3b716aabc9c61c485ceb17e5d1f68 (diff) | |
download | elgg-2826dc077c405ee0b63713d989983085ff230ac3.tar.gz elgg-2826dc077c405ee0b63713d989983085ff230ac3.tar.bz2 |
Merge pull request #192 from jeabakker/#3405
#3405 Memcache: fault in contructor can cause site to go into English language
-rw-r--r-- | engine/classes/ElggMemcache.php | 6 | ||||
-rw-r--r-- | languages/en.php | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/engine/classes/ElggMemcache.php b/engine/classes/ElggMemcache.php index f27b017d0..d9539b9cb 100644 --- a/engine/classes/ElggMemcache.php +++ b/engine/classes/ElggMemcache.php @@ -40,7 +40,7 @@ class ElggMemcache extends ElggSharedMemoryCache { // Do we have memcache? if (!class_exists('Memcache')) { - throw new ConfigurationException(elgg_echo('memcache:notinstalled')); + throw new ConfigurationException('PHP memcache module not installed, you must install php5-memcache'); } // Create memcache object @@ -48,7 +48,7 @@ class ElggMemcache extends ElggSharedMemoryCache { // Now add servers if (!$CONFIG->memcache_servers) { - throw new ConfigurationException(elgg_echo('memcache:noservers')); + throw new ConfigurationException('No memcache servers defined, please populate the $CONFIG->memcache_servers variable'); } if (is_callable(array($this->memcache, 'addServer'))) { @@ -85,7 +85,7 @@ class ElggMemcache extends ElggSharedMemoryCache { // Get version $this->version = $this->memcache->getVersion(); if (version_compare($this->version, ElggMemcache::$MINSERVERVERSION, '<')) { - $msg = elgg_echo('memcache:versiontoolow', + $msg = vsprintf('Memcache needs at least version %s to run, you are running %s', array(ElggMemcache::$MINSERVERVERSION, $this->version )); diff --git a/languages/en.php b/languages/en.php index 93096df38..03e6dfa84 100644 --- a/languages/en.php +++ b/languages/en.php @@ -230,11 +230,6 @@ $english = array( 'LoginException:AccountLocked' => 'Your account has been locked for too many log in failures.', 'LoginException:ChangePasswordFailure' => 'Failed current password check.', - 'memcache:notinstalled' => 'PHP memcache module not installed, you must install php5-memcache', - 'memcache:noservers' => 'No memcache servers defined, please populate the $CONFIG->memcache_servers variable', - 'memcache:versiontoolow' => 'Memcache needs at least version %s to run, you are running %s', - 'memcache:noaddserver' => 'Multiple server support disabled, you may need to upgrade your PECL memcache library', - 'deprecatedfunction' => 'Warning: This code uses the deprecated function \'%s\' and is not compatible with this version of Elgg', 'pageownerunavailable' => 'Warning: The page owner %d is not accessible!', |