Delete code comment

This commit is contained in:
Marco A. Nina Mena
2015-11-17 15:23:29 -04:00
parent c5a01f962e
commit 44a2c0eeaa
3 changed files with 17 additions and 24 deletions

View File

@@ -181,10 +181,10 @@ class PMGoogleApi
{ {
$client = null; $client = null;
if ($this->typeAuthentication == 'webApplication') { if ($this->typeAuthentication == 'webApplication') {
$key = file_get_contents(PATH_DATA_SITE . $this->accountJson); $credential = file_get_contents(PATH_DATA_SITE . $this->accountJson);
$client = new Google_Client(); $client = new Google_Client();
$client->setAuthConfig($key); $client->setAuthConfig($credential);
$client->addScope($this->scope); $client->addScope($this->scope);
if (!empty($_SESSION['google_token'])) { if (!empty($_SESSION['google_token'])) {
@@ -244,10 +244,10 @@ class PMGoogleApi
); );
if ($credentials->typeAuth == 'webApplication') { if ($credentials->typeAuth == 'webApplication') {
$key = file_get_contents($credentials->pathFileJson); $credential = file_get_contents($credentials->pathFileJson);
$client = new Google_Client(); $client = new Google_Client();
$client->setAuthConfig($key); $client->setAuthConfig($credential);
$client->addScope($scope); $client->addScope($scope);
if (!empty($_SESSION['google_token'])) { if (!empty($_SESSION['google_token'])) {
@@ -257,8 +257,6 @@ class PMGoogleApi
} }
} else if (!empty($_SESSION['CODE_GMAIL'])) { } else if (!empty($_SESSION['CODE_GMAIL'])) {
$token = $client->authenticate($_SESSION['CODE_GMAIL']); $token = $client->authenticate($_SESSION['CODE_GMAIL']);
//$client->setAccessToken($token);
// store in the session also
$_SESSION['google_token'] = $client->getAccessToken(); $_SESSION['google_token'] = $client->getAccessToken();
} else { } else {
$authUrl = $client->createAuthUrl(); $authUrl = $client->createAuthUrl();

View File

@@ -72,7 +72,6 @@ Ext.onReady(function(){
name : 'typeAuthentication', name : 'typeAuthentication',
xtype : 'combo', xtype : 'combo',
fieldLabel : _('GMAIL_TYPE_AUTH'), fieldLabel : _('GMAIL_TYPE_AUTH'),
//typeAhead : false,
hiddenName: 'typeAuth', hiddenName: 'typeAuth',
mode : 'local', mode : 'local',
triggerAction : 'all', triggerAction : 'all',

View File

@@ -16,7 +16,6 @@ $gCurl = curl_init( 'https://' . $server . '/api/1.0/' . $pmws . '/gmailIntegrat
curl_setopt( $gCurl, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' . $pmtoken ) ); curl_setopt( $gCurl, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' . $pmtoken ) );
curl_setopt( $gCurl, CURLOPT_RETURNTRANSFER, true); curl_setopt( $gCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $gCurl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt( $gCurl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $gCurl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt( $gCurl, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt( $gCurl, CURLOPT_CONNECTTIMEOUT, 0);
$gCurl_response = curl_exec( $gCurl ); $gCurl_response = curl_exec( $gCurl );
@@ -34,7 +33,6 @@ $curl = curl_init( 'https://' . $server . '/api/1.0/' . $pmws . '/gmailIntegrati
curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' . $pmtoken ) ); curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' . $pmtoken ) );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true); curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER,false); curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt( $curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 0);
$curl_response = curl_exec( $curl ); $curl_response = curl_exec( $curl );
@@ -56,7 +54,6 @@ if( !isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] != $decodedResp
$optArray = array( $optArray = array(
CURLOPT_URL => $url, CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST, false,
CURLOPT_SSL_VERIFYPEER => false CURLOPT_SSL_VERIFYPEER => false
); );
// apply those options // apply those options
@@ -71,8 +68,8 @@ if( !isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] != $decodedResp
//If the email corresponds I get the username and with the gmail user_id the session is created. //If the email corresponds I get the username and with the gmail user_id the session is created.
if($decodedResp['0']->USR_STATUS == "ACTIVE"){ if($decodedResp['0']->USR_STATUS == "ACTIVE"){
//User Active! lets create the Session //User Active! lets create the Session
@session_destroy(); @session_destroy();
session_start(); session_start();
session_regenerate_id(); session_regenerate_id();
if (PHP_VERSION < 5.2) { if (PHP_VERSION < 5.2) {
@@ -81,17 +78,17 @@ if( !isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] != $decodedResp
setcookie("workspaceSkin", "neoclasic", time() + (24 * 60 * 60), "/sys" . "neoclasic", null, false, true); setcookie("workspaceSkin", "neoclasic", time() + (24 * 60 * 60), "/sys" . "neoclasic", null, false, true);
} }
$_SESSION = array(); $_SESSION = array();
$_SESSION['__EE_INSTALLATION__'] = 2; $_SESSION['__EE_INSTALLATION__'] = 2;
$_SESSION['__EE_SW_PMLICENSEMANAGER__'] = 1; $_SESSION['__EE_SW_PMLICENSEMANAGER__'] = 1;
$_SESSION['phpLastFileFound'] = ''; $_SESSION['phpLastFileFound'] = '';
$_SESSION['USERNAME_PREVIOUS1'] = 'admin'; $_SESSION['USERNAME_PREVIOUS1'] = 'admin';
$_SESSION['USERNAME_PREVIOUS2'] = 'admin'; $_SESSION['USERNAME_PREVIOUS2'] = 'admin';
$_SESSION['WORKSPACE'] = $pmws; $_SESSION['WORKSPACE'] = $pmws;
$_SESSION['USER_LOGGED'] = $decodedResp['0']->USR_UID; $_SESSION['USER_LOGGED'] = $decodedResp['0']->USR_UID;
$_SESSION['USR_USERNAME'] = $decodedResp['0']->USR_USERNAME; $_SESSION['USR_USERNAME'] = $decodedResp['0']->USR_USERNAME;
$_SESSION['USR_FULLNAME'] = $decodedResp['0']->USR_FIRSTNAME. ' ' .$decodedResp['0']->USR_LASTNAME; $_SESSION['USR_FULLNAME'] = $decodedResp['0']->USR_FIRSTNAME. ' ' .$decodedResp['0']->USR_LASTNAME;
$_SESSION['__sw__'] = 1; $_SESSION['__sw__'] = 1;
//session created //session created
} else { } else {
echo Bootstrap::LoadTranslation( 'ID_USER_NOT_ACTIVE' ); echo Bootstrap::LoadTranslation( 'ID_USER_NOT_ACTIVE' );
@@ -110,7 +107,6 @@ if ($action == "draft"){
curl_setopt( $curlApp, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt( $curlApp, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt( $curlApp, CURLOPT_RETURNTRANSFER, true); curl_setopt( $curlApp, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $curlApp, CURLOPT_SSL_VERIFYPEER,false); curl_setopt( $curlApp, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt( $curlApp, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt( $curlApp, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt( $curlApp, CURLOPT_CONNECTTIMEOUT, 0);
$curl_response_app = curl_exec( $curlApp ); $curl_response_app = curl_exec( $curlApp );