Sfoglia il codice sorgente

UNA Market like on Boonex site: Store and OAuth

AntonLV 10 anni fa
parent
commit
02b16f7586

+ 1 - 1
modules/boonex/oauth2/classes/BxOAuthDb.php

@@ -19,7 +19,7 @@ class BxOAuthDb extends BxDolModuleDb
 	function getClient($sClientId)
     {
         $sQuery = $this->prepare("SELECT * FROM `bx_oauth_clients` WHERE `client_id` = ?", $sClientId);
-        return $this->getOne($sQuery);
+        return $this->getRow($sQuery);
     }
 
     function getClientTitle($sClientId)

+ 3 - 0
studio/classes/BxDolStudioInstallerUtils.php

@@ -329,6 +329,9 @@ class BxDolStudioInstallerUtils extends BxDolInstallerUtils implements iBxDolSin
     	else
 			$aProducts = $this->getAccessObject(false)->load($this->sStoreDataUrlPublic . 'json_browse_purchased', array('key' => getParam('sys_oauth_key')));
 
+		if(empty($aProducts) || !is_array($aProducts))
+			return $aProducts;
+
     	$oModuleDb = BxDolModuleQuery::getInstance();
 
     	$oModuleDb->updateModule(array('hash' => ''));

+ 1 - 1
studio/classes/BxDolStudioOAuthOAuth2.php

@@ -125,7 +125,7 @@ class BxDolStudioOAuthOAuth2 extends BxDolStudioOAuth implements iBxDolSingleton
 			return isset($aResponse['error_description']) ? $aResponse['error_description'] : _t('_error occured');
         }
 
-        return $aResponse;
+        return $aResponse['data'];
     }
 
     protected function isReloginRequired($sError)