OSDN Git Service

FIX: MEMBER::__construct()にてグローバル変数$CONFを参照できないバグの修正
authorsakamocchi <o-takashi@sakamocchi.jp>
Sat, 3 Mar 2012 15:36:16 +0000 (00:36 +0900)
committersakamocchi <o-takashi@sakamocchi.jp>
Sat, 3 Mar 2012 15:36:16 +0000 (00:36 +0900)
グローバル宣言の追加
不要なLWSの削除

nucleus/libs/MEMBER.php

index 73689fc..40aad4a 100644 (file)
@@ -17,8 +17,8 @@
  * @copyright Copyright (C) 2002-2009 The Nucleus Group
  * @version $Id: MEMBER.php 1616 2012-01-08 09:48:15Z sakamocchi $
  */
-class MEMBER {
-       
+class MEMBER
+{
        // 1 when authenticated, 0 when not
        public $loggedin = 0;
        public $password;               // not the actual password, but rather a MD5 hash
@@ -51,6 +51,7 @@ class MEMBER {
         */
        public function __construct()
        {
+               global $CONF;
                /* secure cookie key settings (either 'none', 0, 8, 16, 24, or 32) */
                if ( !array_key_exists('secureCookieKey', $CONF) )
                {
@@ -198,7 +199,7 @@ class MEMBER {
                        {
                                $errormessage = "Please enter a username.";
                        }
-                       else 
+                       else
                        {
                                $errormessage = 'Login failed for ' . $login;
                        }
@@ -723,7 +724,7 @@ class MEMBER {
                           . "     mnotes='" . sql_real_escape_string($this->getNotes()) . "',"
                           . "     mcanlogin=" . $this->canLogin() . ","
                           . "     mlocale='" . sql_real_escape_string($this->getLocale()) . "',"
-                          . "     mautosave=" . intval($this->getAutosave()) . ""                         
+                          . "     mautosave=" . intval($this->getAutosave()) . ""
                           . " WHERE mnumber=" . $this->getID();
                sql_query($query);
                return;