[geeklog-hg] geeklog: Fixed default theme issue with detecting files needed f...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Jul 17 17:46:19 EDT 2013


changeset 9208:4bc56d1ef07c
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4bc56d1ef07c
user: Tom <websitemaster at cogeco.net>
date: Wed Jul 17 17:46:05 2013 -0400
description:
Fixed default theme issue with detecting files needed for login with an oauth service

diffstat:

 system/lib-security.php |  14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 5ad7b8704786 -r 4bc56d1ef07c system/lib-security.php
--- a/system/lib-security.php	Wed Jul 17 20:05:38 2013 +0200
+++ b/system/lib-security.php	Wed Jul 17 17:46:05 2013 -0400
@@ -2028,10 +2028,24 @@
             while (($filename = @readdir($folder)) !== false) {
                 $pos = strpos($filename, '.auth.class.php');
                 if ($pos && (substr($filename, strlen($filename) - 4) == '.php')) {
+                    // See if login template file exists
+                    $file_exists = false;
                     $mod = substr($filename, 0, $pos);
                     $def_thtml = $_CONF['path_layout'] . 'loginform_oauth.thtml';
                     $thtml = $_CONF['path_layout'] . 'loginform_' . $mod . '.thtml';
                     if (file_exists($def_thtml) || file_exists($thtml)) {
+                        $file_exists = true;    
+                    } else {
+                        // See if default theme is being used
+                        if (!empty($_CONF['path_layout_default'])) {
+                            $def_thtml = $_CONF['path_layout_default'] . 'loginform_oauth.thtml';
+                            $thtml = $_CONF['path_layout_default'] . 'loginform_' . $mod . '.thtml';
+                            if (file_exists($def_thtml) || file_exists($thtml)) {
+                                $file_exists = true;
+                            }
+                        }
+                    }
+                    if ($file_exists) {
                         // Check to see if there is a config value to enable or disable login method
                         if (isset($_CONF[$mod . '_login'])) {
                             if ($_CONF[$mod . '_login']) {



More information about the geeklog-cvs mailing list