aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggGroup.php2
-rw-r--r--engine/classes/ElggMemcache.php6
-rw-r--r--engine/classes/ElggSite.php26
3 files changed, 21 insertions, 13 deletions
diff --git a/engine/classes/ElggGroup.php b/engine/classes/ElggGroup.php
index f7f67bf41..121186196 100644
--- a/engine/classes/ElggGroup.php
+++ b/engine/classes/ElggGroup.php
@@ -16,8 +16,6 @@ class ElggGroup extends ElggEntity
* Sets the type to group.
*
* @return void
- *
- * @deprecated 1.8 Use initializeAttributes
*/
protected function initializeAttributes() {
parent::initializeAttributes();
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/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index e793ab9c6..401939005 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -381,14 +381,24 @@ class ElggSite extends ElggEntity {
public function checkWalledGarden() {
global $CONFIG;
- if ($CONFIG->walled_garden && !elgg_is_logged_in()) {
- // hook into the index system call at the highest priority
- elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1);
-
- if (!$this->isPublicPage()) {
- $_SESSION['last_forward_from'] = current_page_url();
- register_error(elgg_echo('loggedinrequired'));
- forward();
+ if ($CONFIG->walled_garden) {
+ if ($CONFIG->default_access == ACCESS_PUBLIC) {
+ $CONFIG->default_access = ACCESS_LOGGED_IN;
+ }
+ elgg_register_plugin_hook_handler(
+ 'access:collections:write',
+ 'user',
+ '_elgg_walled_garden_remove_public_access');
+
+ if (!elgg_is_logged_in()) {
+ // hook into the index system call at the highest priority
+ elgg_register_plugin_hook_handler('index', 'system', 'elgg_walled_garden_index', 1);
+
+ if (!$this->isPublicPage()) {
+ $_SESSION['last_forward_from'] = current_page_url();
+ register_error(elgg_echo('loggedinrequired'));
+ forward();
+ }
}
}
}