diff --git a/index.php b/index.php index 29f84a6a..5e1e0465 100644 --- a/index.php +++ b/index.php @@ -39,9 +39,9 @@ var oauthMode = null; function getOAuthToken(mode='login', scope_list = null){ oauthMode = mode; - var url = 'https://kauth.kakao.com/oauth/authorize?'\ - 'client_id=&'\ - 'redirect_uri=&'\ + var url = 'https://kauth.kakao.com/oauth/authorize?'+ + 'client_id=&'+ + 'redirect_uri=&'+ 'response_type=code'; if(Array.isArray(scope_list)){ url += '&scope='+scope_list.join(','); diff --git a/src/kakao/kakao.php b/src/kakao/Kakao_REST_API_Helper.php similarity index 99% rename from src/kakao/kakao.php rename to src/kakao/Kakao_REST_API_Helper.php index 79642535..b50a0350 100644 --- a/src/kakao/kakao.php +++ b/src/kakao/Kakao_REST_API_Helper.php @@ -1,7 +1,7 @@ set($name, $value); } - private function set(string $name, mixed $value){ + private function set(string $name, $value){ if($value === null){ unset($_SESSION[$name]); } diff --git a/twe/lib.php b/twe/lib.php index 785c4588..d50fd93d 100644 --- a/twe/lib.php +++ b/twe/lib.php @@ -11,6 +11,11 @@ class Autoloader { public static function register() { + static $isRegisterd = false; + if($isRegisterd){ + return; + } + $isRegisterd = true; spl_autoload_register(function ($class) { $file = __DIR__.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; if (file_exists($file)) { @@ -19,6 +24,16 @@ class Autoloader } return false; }); + + spl_autoload_register(function ($class) { + $class = Util::array_last(explode('\\', $class)); + $file = __DIR__."/d_setting/{$class}.php"; + if (file_exists($file)) { + require $file; + return true; + } + return false; + }); } } Autoloader::register();