From 26b6c4695c58aa99f9efe0d526710ea7dc2351a3 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Thu, 12 Feb 2015 08:10:57 +0000 Subject: VKontakte: cosmetic git-svn-id: http://svn.miranda-ng.org/main/trunk@12093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index a99f131539..a326002929 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -21,6 +21,7 @@ UINT_PTR CVkProto::m_timer; char szBlankUrl[] = "http://api.vk.com/blank.html"; static char VK_TOKEN_BEG[] = "access_token="; +static char VK_LOGIN_DOMAIN[] = "https://m.vk.com"; static char fieldsName[] = "id, first_name, last_name, photo_100, bdate, sex, timezone, contacts, online, status, about, domain"; ///////////////////////////////////////////////////////////////////////////////////////// @@ -177,11 +178,11 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq pReq->Redirect(reply); if (!pReq->m_szUrl.IsEmpty()) { if (pReq->m_szUrl.GetBuffer()[0] == '/') - pReq->m_szUrl = "https://m.vk.com" + pReq->m_szUrl; + pReq->m_szUrl = VK_LOGIN_DOMAIN + pReq->m_szUrl; ApplyCookies(pReq); m_prevUrl = pReq->m_szUrl; } - + pReq->m_bApiReq = false; Push(pReq); } } @@ -217,12 +218,13 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq pReq->m_szUrl = szAction; if (!pReq->m_szUrl.IsEmpty()) if (pReq->m_szUrl.GetBuffer()[0] == '/') - pReq->m_szUrl = "https://m.vk.com" + pReq->m_szUrl; + pReq->m_szUrl = VK_LOGIN_DOMAIN + pReq->m_szUrl; m_prevUrl = pReq->m_szUrl; pReq->m_pFunc = &CVkProto::OnOAuthAuthorize; pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded"); pReq->Redirect(reply); ApplyCookies(pReq); + pReq->m_bApiReq = false; Push(pReq); } -- cgit v1.2.3