aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-01-20 20:32:33 -0500
committerCash Costello <cash.costello@gmail.com>2013-01-20 20:32:33 -0500
commit718cddc89e3b4901a641e175e86b4208436f2089 (patch)
tree2be9f8d6d4c0729549a13116ef5da7e4c6ca9c25
parent6fed7f5286a839cd81d038df8a7988a388d82f2b (diff)
downloadelgg-718cddc89e3b4901a641e175e86b4208436f2089.tar.gz
elgg-718cddc89e3b4901a641e175e86b4208436f2089.tar.bz2
Fixes #4991 CLI allowed when walled garden is turned on
-rw-r--r--CHANGES.txt8
-rw-r--r--engine/classes/ElggSite.php5
2 files changed, 11 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 8687b3d2a..105d60f72 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,12 +2,16 @@ Version 1.8.13
(January xx, 2013 from https://github.com/Elgg/Elgg/tree/1.8)
Contributing Developers:
* Cash Costello
- * Cristo Rabani
+ * Kevin Jardine
+ * Krzysztof Różalski
Security Fixes:
+ Bugfixes:
+ * CLI usages with walled garden fixed
+
Enhancements:
- * Added confirm dialog for resetting profile fields (adds language string profile:resetdefault:confirm)
+ * Added confirm dialog for resetting profile fields (adds language string profile:resetdefault:confirm)
Version 1.8.12
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index f7f5b68ea..1fe49b85c 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -362,6 +362,11 @@ class ElggSite extends ElggEntity {
public function checkWalledGarden() {
global $CONFIG;
+ // command line calls should not invoke the walled garden check
+ if (PHP_SAPI === 'cli') {
+ return;
+ }
+
if ($CONFIG->walled_garden) {
if ($CONFIG->default_access == ACCESS_PUBLIC) {
$CONFIG->default_access = ACCESS_LOGGED_IN;