AntonLV 9 лет назад
Родитель
Сommit
9d5d812956

+ 7 - 8
inc/classes/BxDolGridConnections.php

@@ -12,8 +12,8 @@ require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
 class BxDolGridConnections extends BxTemplGrid
 {
     protected $_bOwner = false;
-    protected $_sContentModule = 'bx_persons';
     protected $_sObjectConnections = 'sys_profiles_friends';
+    protected $_oProfile;
     protected $_oConnection;
 
     public function __construct ($aOptions, $oTemplate = false)
@@ -29,19 +29,18 @@ class BxDolGridConnections extends BxTemplGrid
         if (!$iProfileId)
             return;
 
-        $oProfile = BxDolProfile::getInstance($iProfileId);
-        if (!$oProfile)
+        $this->_oProfile = BxDolProfile::getInstance($iProfileId);
+        if (!$this->_oProfile)
             return;
 
-        if ($oProfile->id() == bx_get_logged_profile_id())
+        if ($this->_oProfile->id() == bx_get_logged_profile_id())
             $this->_bOwner = true;
 
-        $aSQLParts = $this->_oConnection->getConnectedInitiatorsAsSQLParts('p', 'id', $oProfile->id(), $this->_bOwner ? false : true);
+        $aSQLParts = $this->_oConnection->getConnectedInitiatorsAsSQLParts('p', 'id', $this->_oProfile->id(), $this->_bOwner ? false : true);
 
         $this->addMarkers(array(
-            'profile_id' => $oProfile->id(),
-            'join_connections' => $aSQLParts['join'],
-            'content_module' => $this->_sContentModule,
+            'profile_id' => $this->_oProfile->id(),
+            'join_connections' => $aSQLParts['join']
         ));
     }
 

+ 35 - 0
inc/classes/BxDolGridConnectionsRequests.php

@@ -0,0 +1,35 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaCore UNA Core
+ * @{
+ */
+
+class BxDolGridConnectionsRequests extends BxDolGridConnections
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+        parent::__construct ($aOptions, $oTemplate);
+
+        $aSQLParts = $this->_oConnection->getConnectedInitiatorsAsSQLParts('p', 'id', $this->_oProfile->id(), $this->_bOwner ? 0 : true);
+
+        $this->addMarkers(array(
+            'join_connections' => $aSQLParts['join']
+        ));
+    }
+
+    public function getCode ($isDisplayHeader = true)
+    {
+        if(!isLogged())
+            bx_require_authentication();
+
+        if(!$this->_bOwner)
+            return MsgBox(_t('_Access denied'));
+
+        return parent::getCode($isDisplayHeader);
+    }
+}
+
+/** @} */

+ 8 - 0
install/sql/system.sql

@@ -3649,6 +3649,7 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon
 -- GRID: connections
 INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
 ('sys_grid_connections', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxDolGridConnections', ''),
+('sys_grid_connections_requests', 'Sql', 'SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxDolGridConnectionsRequests', ''),
 ('sys_grid_subscriptions', 'Sql', 'SELECT `p`.`id`, `c`.`added` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxDolGridSubscriptions', ''),
 ('sys_grid_subscribed_me', 'Sql', 'SELECT `p`.`id`, `c`.`added` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) {join_connections}', 'sys_profiles', 'id', 'c`.`added', '', '', 10, NULL, 'start', '', 'name,email', '', 'auto', '', '', 2147483647, 'BxDolGridSubscribedMe', '');
 
@@ -3657,6 +3658,10 @@ INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `or
 ('sys_grid_connections', 'info', '', '30%', '', 2),
 ('sys_grid_connections', 'actions', '', '30%', '', 3),
 
+('sys_grid_connections_requests', 'name', '_sys_name', '40%', '', 1),
+('sys_grid_connections_requests', 'info', '', '30%', '', 2),
+('sys_grid_connections_requests', 'actions', '', '30%', '', 3),
+
 ('sys_grid_subscriptions', 'name', '_sys_name', '70%', '', 1),
 ('sys_grid_subscriptions', 'actions', '', '30%', '', 2),
 
@@ -3668,6 +3673,9 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `conf
 ('sys_grid_connections', 'single', 'delete', '', 'remove', 1, 2),
 ('sys_grid_connections', 'single', 'add_friend', '_sys_add_friend', 'plus', 0, 3),
 
+('sys_grid_connections_requests', 'single', 'accept', '_sys_accept', '', 0, 1),
+('sys_grid_connections_requests', 'single', 'delete', '', 'remove', 1, 2),
+
 ('sys_grid_subscriptions', 'single', 'subscribe', '_sys_subscribe', 'check', 0, 1),
 ('sys_grid_subscriptions', 'single', 'delete', '', 'remove', 1, 2),
 

+ 1 - 1
modules/base/groups/classes/BxBaseModGroupsGridConnections.php

@@ -11,9 +11,9 @@
 
 class BxBaseModGroupsGridConnections extends BxDolGridConnections
 {
+    protected $_sContentModule;
     protected $_iGroupProfileId;
     protected $_oModule;
-    protected $_oConnection;
     protected $_aContentInfo = array();
 
     public function __construct ($aOptions, $oTemplate = false)

+ 2 - 2
modules/base/profile/classes/BxBaseModProfileAlertsResponse.php

@@ -75,7 +75,7 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
     protected function sendMailFriendRequest ($oAlert)
     {
         $CNF = &$this->_oModule->_oConfig->CNF;
-        if(empty($CNF['EMAIL_FRIEND_REQUEST']) || empty($CNF['URI_VIEW_FRIENDS']))
+        if(empty($CNF['EMAIL_FRIEND_REQUEST']) || empty($CNF['URI_VIEW_FRIEND_REQUESTS']))
             return;
 
         $iRecipient = $oAlert->aExtras['content'];
@@ -88,7 +88,7 @@ class BxBaseModProfileAlertsResponse extends BxBaseModGeneralAlertsResponse
         sendMailTemplate($CNF['EMAIL_FRIEND_REQUEST'], 0, $iRecipient, array(
             'SenderUrl' => $oSender->getUrl(),
             'SenderDisplayName' => $oSender->getDisplayName(),
-            'FriendsLink' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_FRIENDS'] . '&profile_id=' . $iRecipient),
+            'FriendsLink' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_FRIEND_REQUESTS'] . '&profile_id=' . $iRecipient),
         ), BX_EMAIL_NOTIFY);
     }
 

+ 1 - 0
modules/boonex/organizations/classes/BxOrgsConfig.php

@@ -60,6 +60,7 @@ class BxOrgsConfig extends BxBaseModProfileConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-organization-profile',
         	'URI_VIEW_FRIENDS' => 'organization-profile-friends',
+        	'URI_VIEW_FRIEND_REQUESTS' => 'organization-friend-requests',
         	'URI_VIEW_FAVORITES' => 'organization-profile-favorites',
             'URI_EDIT_ENTRY' => 'edit-organization-profile',
             'URI_EDIT_COVER' => 'edit-organization-cover',

+ 4 - 0
modules/boonex/organizations/install/langs/en.xml

@@ -75,6 +75,8 @@
 	<string name="_bx_orgs_page_title_profile_favorites"><![CDATA[Favorite Organizations]]></string>
 	<string name="_bx_orgs_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_orgs_page_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_title_sys_friend_requests"><![CDATA[Friend Requests]]></string>
+    <string name="_bx_orgs_page_title_friend_requests"><![CDATA[Friend Requests]]></string>
 	<string name="_bx_orgs_page_title_sys_profile_subscriptions"><![CDATA[Following]]></string>
     <string name="_bx_orgs_page_title_profile_subscriptions"><![CDATA[Following & Followers]]></string>
     <string name="_bx_orgs_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
@@ -111,6 +113,8 @@
 	<string name="_bx_orgs_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
 	<string name="_bx_orgs_page_block_title_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_orgs_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_orgs_page_block_title_friend_requests_link"><![CDATA[Friend Requests for <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_orgs_page_block_title_system_friend_requests"><![CDATA[Friend Requests]]></string>
 	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Location]]></string>
 	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>

+ 1 - 1
modules/boonex/organizations/install/sql/disable.sql

@@ -10,7 +10,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 -- PAGES
 
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_organizations';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_profile_cover', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_friends', 'bx_organizations_profile_favorites', 'bx_organizations_profile_subscriptions', 'bx_organizations_profile_comments', 'bx_organizations_home', 'bx_organizations_search', 'bx_organizations_manage');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_profile_cover', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_friends', 'bx_organizations_friend_requests', 'bx_organizations_profile_favorites', 'bx_organizations_profile_subscriptions', 'bx_organizations_profile_comments', 'bx_organizations_home', 'bx_organizations_search', 'bx_organizations_manage');
 
 -- MENU
 

+ 7 - 0
modules/boonex/organizations/install/sql/enable.sql

@@ -95,6 +95,13 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
 ('bx_organizations_profile_friends', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_profile_friends', '_bx_orgs_page_block_title_profile_friends_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:17:\"connections_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
 
+-- PAGE: profile friend requests
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_organizations_friend_requests', 'organization-friend-requests', '_bx_orgs_page_title_sys_friend_requests', '_bx_orgs_page_title_friend_requests', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-friend-requests', '', '', '', 0, 1, 0, 'BxOrgsPageEntry', 'modules/boonex/organizations/classes/BxOrgsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_organizations_friend_requests', 1, 'bx_organizations', '_bx_orgs_page_block_title_system_friend_requests', '_bx_orgs_page_block_title_friend_requests_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:25:\"connections_request_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
 -- PAGE: profile favorites
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_organizations_profile_favorites', 'organization-profile-favorites', '_bx_orgs_page_title_sys_profile_favorites', '_bx_orgs_page_title_profile_favorites', 'bx_organizations', 5, 2147483647, 1, 'page.php?i=organization-profile-favorites', '', '', '', 0, 1, 0, 'BxOrgsPageBrowse', 'modules/boonex/organizations/classes/BxOrgsPageBrowse.php');

+ 1 - 0
modules/boonex/persons/classes/BxPersonsConfig.php

@@ -60,6 +60,7 @@ class BxPersonsConfig extends BxBaseModProfileConfig
             // page URIs
             'URI_VIEW_ENTRY' => 'view-persons-profile',
         	'URI_VIEW_FRIENDS' => 'persons-profile-friends',
+        	'URI_VIEW_FRIEND_REQUESTS' => 'persons-friend-requests',
         	'URI_VIEW_FAVORITES' => 'persons-profile-favorites',
             'URI_EDIT_ENTRY' => 'edit-persons-profile',
             'URI_EDIT_COVER' => 'edit-persons-cover',

+ 4 - 0
modules/boonex/persons/install/langs/en.xml

@@ -77,6 +77,8 @@
 	<string name="_bx_persons_page_title_profile_favorites"><![CDATA[Favorite persons]]></string>
 	<string name="_bx_persons_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_persons_page_title_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_title_sys_friend_requests"><![CDATA[Friend Requests]]></string>
+	<string name="_bx_persons_page_title_friend_requests"><![CDATA[Friend Requests]]></string>
 	<string name="_bx_persons_page_title_sys_profile_subscriptions"><![CDATA[Following]]></string>
     <string name="_bx_persons_page_title_profile_subscriptions"><![CDATA[Following & Followers]]></string>
     <string name="_bx_persons_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
@@ -113,6 +115,8 @@
 	<string name="_bx_persons_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
 	<string name="_bx_persons_page_block_title_profile_friends"><![CDATA[Friends]]></string>
 	<string name="_bx_persons_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+	<string name="_bx_persons_page_block_title_friend_requests_link"><![CDATA[Friend Requests for <a href="{profile_link}">{display_name}</a>]]></string>
+	<string name="_bx_persons_page_block_title_system_friend_requests"><![CDATA[Friend Requests]]></string>
 	<string name="_bx_persons_page_block_title_profile_location"><![CDATA[Location]]></string>
 	<string name="_bx_persons_page_block_title_system_profile_subscriptions"><![CDATA[Following]]></string>
 	<string name="_bx_persons_page_block_title_profile_subscriptions"><![CDATA[Following]]></string>

+ 1 - 1
modules/boonex/persons/install/sql/disable.sql

@@ -10,7 +10,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 -- PAGES
 
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_persons';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_persons' OR `object` IN('bx_persons_create_profile', 'bx_persons_delete_profile', 'bx_persons_edit_profile', 'bx_persons_edit_profile_cover', 'bx_persons_view_profile', 'bx_persons_view_profile_closed', 'bx_persons_profile_info', 'bx_persons_profile_friends', 'bx_persons_profile_favorites', 'bx_persons_profile_subscriptions', 'bx_persons_profile_comments', 'bx_persons_home', 'bx_persons_search', 'bx_persons_manage');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_persons' OR `object` IN('bx_persons_create_profile', 'bx_persons_delete_profile', 'bx_persons_edit_profile', 'bx_persons_edit_profile_cover', 'bx_persons_view_profile', 'bx_persons_view_profile_closed', 'bx_persons_profile_info', 'bx_persons_profile_friends', 'bx_persons_friend_requests', 'bx_persons_profile_favorites', 'bx_persons_profile_subscriptions', 'bx_persons_profile_comments', 'bx_persons_home', 'bx_persons_search', 'bx_persons_manage');
 
 -- MENU
 

+ 7 - 0
modules/boonex/persons/install/sql/enable.sql

@@ -90,6 +90,13 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
 ('bx_persons_profile_friends', 1, 'bx_persons', '_bx_persons_page_block_title_system_profile_friends', '_bx_persons_page_block_title_profile_friends_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:17:\"connections_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
 
+-- PAGE: profile friend requests
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_persons_friend_requests', 'persons-friend-requests', '_bx_persons_page_title_sys_friend_requests', '_bx_persons_page_title_friend_requests', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-friend-requests', '', '', '', 0, 1, 0, 'BxPersonsPageEntry', 'modules/boonex/persons/classes/BxPersonsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_persons_friend_requests', 1, 'bx_persons', '_bx_persons_page_block_title_system_friend_requests', '_bx_persons_page_block_title_friend_requests_link', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:25:\"connections_request_table\";s:5:\"class\";s:23:\"TemplServiceConnections\";}', 0, 0, 1, 1);
+
 -- PAGE: profile favorites
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_persons_profile_favorites', 'persons-profile-favorites', '_bx_persons_page_title_sys_profile_favorites', '_bx_persons_page_title_profile_favorites', 'bx_persons', 5, 2147483647, 1, 'page.php?i=persons-profile-favorites', '', '', '', 0, 1, 0, 'BxPersonsPageBrowse', 'modules/boonex/persons/classes/BxPersonsPageBrowse.php');

+ 4 - 0
modules/boonex/russian/data/langs/bx_organizations/ru.xml

@@ -75,6 +75,8 @@
 	<string name="_bx_orgs_page_title_profile_favorites"><![CDATA[Избранные организации]]></string>
 	<string name="_bx_orgs_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
 	<string name="_bx_orgs_page_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_orgs_page_title_sys_friend_requests"><![CDATA[Приглашения в друзья]]></string>
+    <string name="_bx_orgs_page_title_friend_requests"><![CDATA[Приглашения в друзья]]></string>
 	<string name="_bx_orgs_page_title_sys_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_orgs_page_title_profile_subscriptions"><![CDATA[Подписки и подписчики]]></string>
     <string name="_bx_orgs_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
@@ -111,6 +113,8 @@
 	<string name="_bx_orgs_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
 	<string name="_bx_orgs_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
 	<string name="_bx_orgs_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_orgs_page_block_title_friend_requests_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Приглашения в друзья]]></string>
+    <string name="_bx_orgs_page_block_title_system_friend_requests"><![CDATA[Приглашения в друзья]]></string>
 	<string name="_bx_orgs_page_block_title_profile_location"><![CDATA[Расположение]]></string>
 	<string name="_bx_orgs_page_block_title_system_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_orgs_page_block_title_profile_subscriptions"><![CDATA[Подписки]]></string>

+ 4 - 0
modules/boonex/russian/data/langs/bx_persons/ru.xml

@@ -77,6 +77,8 @@
 	<string name="_bx_persons_page_title_profile_favorites"><![CDATA[Избранные персоны]]></string>
 	<string name="_bx_persons_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
 	<string name="_bx_persons_page_title_profile_friends"><![CDATA[Друзья]]></string>
+	<string name="_bx_persons_page_title_sys_friend_requests"><![CDATA[Приглашения в друзья]]></string>
+    <string name="_bx_persons_page_title_friend_requests"><![CDATA[Приглашения в друзья]]></string>
 	<string name="_bx_persons_page_title_sys_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_persons_page_title_profile_subscriptions"><![CDATA[Подписки и подписчики]]></string>
     <string name="_bx_persons_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
@@ -113,6 +115,8 @@
 	<string name="_bx_persons_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
 	<string name="_bx_persons_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
 	<string name="_bx_persons_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_persons_page_block_title_friend_requests_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Приглашения в друзья]]></string>
+    <string name="_bx_persons_page_block_title_system_friend_requests"><![CDATA[Приглашения в друзья]]></string>
 	<string name="_bx_persons_page_block_title_profile_location"><![CDATA[Расположение]]></string>
 	<string name="_bx_persons_page_block_title_system_profile_subscriptions"><![CDATA[Подписки]]></string>
     <string name="_bx_persons_page_block_title_profile_subscriptions"><![CDATA[Подписки]]></string>

+ 12 - 0
template/scripts/BxBaseServiceConnections.php

@@ -29,6 +29,18 @@ class BxBaseServiceConnections extends BxDol
         return $oGrid->getCode();
     }
 
+	/**
+     * get grid with friends connection requests
+     */
+    public function serviceConnectionsRequestTable ()
+    {
+        $oGrid = BxDolGrid::getObjectInstance('sys_grid_connections_requests');
+        if (!$oGrid)
+            return false;
+
+        return $oGrid->getCode();
+    }
+
     /**
      * get number of received unconfirmed connections (friend requests)
      * @param $sConnectionsObject connections object to get unconfirmed connections from