Alex Trofimov 6 лет назад
Родитель
Сommit
d22c906873

+ 5 - 0
inc/classes/BxDolPage.php

@@ -247,6 +247,11 @@ class BxDolPage extends BxDolFactory implements iBxDolFactoryObject, iBxDolRepla
         $oTemplate->getPageCode();
     }
 
+    public function getId ()
+    {
+    	return (int)$this->_aObject['id'];
+    }
+
     public function getType ()
     {
     	return (int)$this->_aObject['type_id'];

+ 1 - 0
modules/boonex/oauth2/classes/BxOAuthModule.php

@@ -208,6 +208,7 @@ class BxOAuthModule extends BxDolModule
         else {
             if (!$this->_oAPI->isSafeAPI(bx_get('module') ? bx_get('module') : 'bx_api', $sMethod)) {
                 $this->_oAPI->errorOutput(403, 'access_denied', 'Only "public" and "safe" services can be called, or method doesn\'t exist');
+                return;
             }
 
             $this->initOAuth($this->getClientIdFromAccessTokenHeader());

+ 2 - 2
studio/classes/BxDolStudioBuilderPageQuery.php

@@ -150,7 +150,7 @@ class BxDolStudioBuilderPageQuery extends BxDolStudioPageQuery
     {
         $sSql = "UPDATE `sys_objects_page` SET `" . implode("`=?, `", array_keys($aFields)) . "`=?  WHERE `id`=?";
         $sSql = call_user_func_array(array($this, 'prepare'), array_merge(array($sSql), array_values($aFields), array($iId)));
-        return $this->query($sSql);
+        return $this->res($sSql);
     }
 
     function deletePages($aParams)
@@ -432,7 +432,7 @@ class BxDolStudioBuilderPageQuery extends BxDolStudioPageQuery
     function updateBlock($iId, $aFields)
     {
         $sSql = "UPDATE `sys_pages_blocks` SET " . $this->arrayToSQL($aFields) . " WHERE `id`=:id";
-        return $this->query($sSql, array('id' => $iId));
+        return $this->res($sSql, array('id' => $iId));
     }
 
     function deleteBlocks($aParams)