]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4991 CLI allowed when walled garden is turned on
authorCash Costello <cash.costello@gmail.com>
Mon, 21 Jan 2013 01:32:33 +0000 (20:32 -0500)
committerCash Costello <cash.costello@gmail.com>
Mon, 21 Jan 2013 01:32:33 +0000 (20:32 -0500)
CHANGES.txt
engine/classes/ElggSite.php

index 8687b3d2a0b054730dd0423bbb07c5f8b25bee03..105d60f726204a38b92bd18983b2a680f5c69475 100644 (file)
@@ -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
index f7f5b68ea436ed79ad2191d1d1c10a471e06f70b..1fe49b85c726e97b2fdb01195f3ef5876dd2e328 100644 (file)
@@ -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;