瀏覽代碼

Ticket #4558 - Build-in API support: Connection actions.

AntonLV 2 年之前
父節點
當前提交
696f845fce

+ 0 - 9
inc/utils.inc.php

@@ -2399,7 +2399,6 @@ function bx_api_check_access()
             exit;
         }
     }
-    /*
     elseif (getParam('sys_api_access_by_origin') && $sOriginHeader) {
 
         if (parse_url($sOriginHeader, PHP_URL_HOST) != parse_url(BX_DOL_URL_ROOT, PHP_URL_HOST)) {
@@ -2424,14 +2423,6 @@ function bx_api_check_access()
         header('HTTP/1.0 403 Forbidden');
         echo json_encode(['status' => 403, 'error' => _t("_Access denied")]);
         exit;
-    }
-     * 
-     */
-
-    if (isset($_GET['demo']) && $_GET['demo'] == 1 ){
-        bx_login(1);
-        check_logged();
-        
     }
 
     // TODO: Temporarily to use logged state

+ 0 - 5
modules/base/groups/classes/BxBaseModGroupsModule.php

@@ -2126,11 +2126,6 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
         return $aResult;
     }
 
-    /*
-     * TODO: Start from here!!!
-     * 
-     * https://neo.so/api.php?r=system/get_page_by_request/TemplServicePages&params[]=view-event-profile/ert&demo=1
-     */
     public function getMenuItemTitleByConnection($sConnection, $sAction, $iContentProfileId, $iInitiatorProfileId = 0)
     {
         $CNF = $this->_oConfig->getCNF();

+ 5 - 5
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -1408,6 +1408,11 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
         return $this->_serviceGetTimelineProfileImageAllowedView($aEvent);
     }
 
+    public function serviceGetMenuItemTitleByConnection($sConnection, $sAction, $iContentProfileId, $iInitiatorProfileId = 0)
+    {
+        return $this->getMenuItemTitleByConnection($sConnection, $sAction, $iContentProfileId, $iInitiatorProfileId);
+    }
+
 
     // ====== PERMISSION METHODS
     /**
@@ -1592,11 +1597,6 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
         return $o -> getSearchData();
     }
 
-    public function serviceGetMenuItemTitleByConnection($sConnection, $sAction, $iContentProfileId, $iInitiatorProfileId = 0)
-    {
-        return $this->getMenuItemTitleByConnection($sConnection, $sAction, $iContentProfileId, $iInitiatorProfileId);
-    }
-
     /**
      * @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden. So make sure to make strict(===) checking.
      */

+ 1 - 1
template/scripts/BxBaseServiceConnections.php

@@ -102,7 +102,7 @@ class BxBaseServiceConnections extends BxDol
             $sAction = $aFlip[$sAction];
 
         return !empty($aTitles[$sAction]) ? _t($aTitles[$sAction]) : '';
-    }       
+    }
 
     /**
      * get grid with friends connections