From 9911390332d78426339ec7acd05634adad8e80d5 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Sun, 22 Nov 2009 23:36:23 +0000 Subject: [PATCH] getperms() BC fix and remove debug info from signup --- class2.php | 11 +++++++---- signup.php | 14 +++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/class2.php b/class2.php index d3dc705ad..d7bc4266e 100644 --- a/class2.php +++ b/class2.php @@ -9,8 +9,8 @@ * General purpose file * * $Source: /cvs_backup/e107_0.8/class2.php,v $ -* $Revision: 1.161 $ -* $Date: 2009-11-22 14:10:00 $ +* $Revision: 1.162 $ +* $Date: 2009-11-22 23:36:23 $ * $Author: e107coders $ * */ @@ -183,6 +183,9 @@ unset($inc_path); // F: Grab e107_config, get directory paths and create $e107 object // @include_once(realpath(dirname(__FILE__).'/e107_config.php')); + +define("MPREFIX", $mySQLprefix); + if(!isset($ADMIN_DIRECTORY)) { // e107_config.php is either empty, not valid or doesn't exist so redirect to installer.. @@ -305,7 +308,7 @@ if (!$ADMIN_DIRECTORY && !$DOWNLOADS_DIRECTORY) e107::getSingleton('e107_traffic'); // We start traffic counting ASAP //$eTraffic->Calibrate($eTraffic); -define("MPREFIX", $mySQLprefix); + e107_require_once(e_HANDLER.'mysql_class.php'); @@ -1340,7 +1343,7 @@ function getperms($arg, $ap = ADMINPERMS) return false; } - if ($ap === '0') + if ($ap === '0' || $ap === '0.') // BC fix. { return true; } diff --git a/signup.php b/signup.php index 193d8a7b8..d44f95876 100644 --- a/signup.php +++ b/signup.php @@ -9,8 +9,8 @@ * User signup * * $Source: /cvs_backup/e107_0.8/signup.php,v $ - * $Revision: 1.43 $ - * $Date: 2009-11-22 14:10:03 $ + * $Revision: 1.44 $ + * $Date: 2009-11-22 23:36:23 $ * $Author: e107coders $ * */ @@ -255,14 +255,10 @@ if($signup_imagecode) $sec_img = new secure_image; } + if (USER || ($pref['user_reg'] == 0) || (vartrue($pref['auth_method'],'e107') != 'e107')) -{ - //header('location: '.e_HTTP.'index.php'); - var_dump(USER); - var_dump($pref['user_reg']); - var_dump($pref['auth_method']); - echo "hello"; - exit; +{ + header('location: '.e_HTTP.'index.php'); }