[geeklog-cvs] geeklog: Fixed notices in the config class, caused by the check ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun May 10 05:23:19 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a65dd04d595b
changeset: 7019:a65dd04d595b
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun May 10 09:30:30 2009 +0200
description:
Fixed notices in the config class, caused by the check to prevent people from locking themselves out of their site by disabling all 3 login methods.

diffstat:

2 files changed, 10 insertions(+), 3 deletions(-)
public_html/docs/history        |    1 +
system/classes/config.class.php |   12 +++++++++---

diffs (33 lines):

diff -r f3fa64601bb3 -r a65dd04d595b public_html/docs/history
--- a/public_html/docs/history	Sat May 09 17:59:54 2009 +0200
+++ b/public_html/docs/history	Sun May 10 09:30:30 2009 +0200
@@ -11,6 +11,7 @@
 + Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
+- Fixed notices in the config class (reported by tgc and others) [Dirk]
 - Fixed empty entries in the "Type" dropdown on the Advanced Search page.
   Requires an updated search/searchform.thtml template (part of bug #0000874)
 - Ensure PLG_templateSetVars (and therefore CUSTOM_templateSetVars) is called
diff -r f3fa64601bb3 -r a65dd04d595b system/classes/config.class.php
--- a/system/classes/config.class.php	Sat May 09 17:59:54 2009 +0200
+++ b/system/classes/config.class.php	Sun May 10 09:30:30 2009 +0200
@@ -387,9 +387,15 @@
             }
         }
 
-        if (!$this->config_array['Core']['user_login_method']['standard'] &&
-            !$this->config_array['Core']['user_login_method']['openid'] &&
-            !$this->config_array['Core']['user_login_method']['3rdparty']) {
+        $methods = array('standard', 'openid', '3rdparty');
+        $methods_disabled = 0;
+        foreach ($methods as $m) {
+            if (isset($this->config_array['Core']['user_login_method'][$m]) &&
+                    !$this->config_array['Core']['user_login_method'][$m]) {
+                $methods_disabled++;    
+            }
+        }
+        if ($methods_disabled == count($methods)) {
             // just to make sure people don't lock themselves out of their site
             $this->config_array['Core']['user_login_method']['standard'] = true;
 



More information about the geeklog-cvs mailing list