Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
thisgun
2020-02-10 19:11:28 +09:00
4 changed files with 10 additions and 5 deletions

View File

@ -53,6 +53,7 @@ eval("\$file = \"$file\";");
$f = explode(";", $file);
for ($i=0; $i<count($f); $i++) {
if (trim($f[$i]) == "") continue;
$f[$i] = get_db_create_replace($f[$i]);
sql_query($f[$i]) or die(mysqli_error());
}
// 테이블 생성 ------------------------------------

View File

@ -329,7 +329,7 @@ function get_db_create_replace($sql_str){
function get_class_encrypt(){
static $cache;
if( $cache && is_object($obj) ){
if( $cache && is_object($cache) ){
return $cache;
}

View File

@ -229,7 +229,8 @@ function exist_seo_url($type, $seo_title, $write_table, $sql_id=0){
global $g5;
$exists_title = '';
$sql_id = preg_replace('/[^a-z0-9_]/i', '', $sql_id);
$sql_id = preg_replace('/[^a-z0-9_\-]/i', '', $sql_id);
// 영카트 상품코드의 경우 - 하이픈이 들어가야 함
if( $type === 'bbs' ){
$sql = "select wr_seo_title FROM {$write_table} WHERE wr_seo_title = '".sql_real_escape_string($seo_title)."' AND wr_id <> '$sql_id' limit 1";

View File

@ -26,7 +26,7 @@ class Hybrid_Providers_Kakao extends Hybrid_Provider_Model_OAuth2
parent::initialize();
// Provider API end-points
$this->api->api_base_url = "https://kapi.kakao.com/v1/";
$this->api->api_base_url = "https://kapi.kakao.com/v2/";
$this->api->authorize_url = "https://kauth.kakao.com/oauth/authorize";
$this->api->token_url = "https://kauth.kakao.com/oauth/token";
@ -72,7 +72,8 @@ class Hybrid_Providers_Kakao extends Hybrid_Provider_Model_OAuth2
*/
function getUserProfile()
{
$params = array('property_keys'=>'kaccount_email');
//$params = array('property_keys'=>'kaccount_email'); // v1 parameter
$params = array('property_keys'=>array('kakao_account.email')); // v2 parameter
$this->api->decode_json = false;
$this->api->curl_header = array( 'Authorization: Bearer ' . $this->api->access_token );
@ -86,7 +87,9 @@ class Hybrid_Providers_Kakao extends Hybrid_Provider_Model_OAuth2
$this->user->profile->identifier = @ $data->id;
$this->user->profile->displayName = @ $data->properties->nickname;
$this->user->profile->photoURL = @ $data->properties->thumbnail_image;
$email = @ $data->kaccount_email;
//$email = @ $data->properties->kaccount_email; // v1 version
$email = @ $data->kakao_account->email; // v2 version
if( $email ){
$this->user->profile->email = $email;