1
0
Эх сурвалжийг харах

Ticket #4444 - Add ability to block users in groups. Core.

AntonLV 2 жил өмнө
parent
commit
cd85a96317

+ 33 - 0
inc/classes/BxDolBan.php

@@ -0,0 +1,33 @@
+<?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 BxDolBan extends BxDolConnection
+{
+    protected function __construct($aObject)
+    {
+        parent::__construct($aObject);
+    }  
+
+    /**
+     * Add new connection.
+     * @param $iInitiator initiator of the connection, in most cases some profile id
+     * @param $iContent content to make connection to, in most cases some content id, or other profile id in case of friends
+     * @return true - if connection was added, false - if connection already exists or error occured
+     */
+    public function addConnection($iInitiator, $iContent, $aParams = [])
+    {
+        $bResult = parent::addConnection($iInitiator, $iContent, $aParams);
+        if($bResult)
+            $this->_oQuery->updateConnection($iInitiator, $iContent, [
+                'module' => !empty($aParams['module']) ? $aParams['module'] : BxDolProfile::getInstance($iInitiator)->getModule(),
+            ]);
+
+        return $bResult;
+    }
+}

+ 8 - 0
inc/classes/BxDolConnection.php

@@ -161,10 +161,18 @@ class BxDolConnection extends BxDolFactory implements iBxDolFactoryObject
             require_once(BX_DIRECTORY_PATH_ROOT . $aObject['override_class_file']);
 
         $o = new $sClass($aObject);
+        $o->init();
 
         return ($GLOBALS['bxDolClasses']['BxTemplConnection!'.$sObject] = $o);
     }
 
+    /**
+     * Init something here if it's needed.
+     */
+    public function init()
+    {
+    }
+
     /**
      * Get connection type.
      * return BX_CONNECTIONS_TYPE_ONE_WAY or BX_CONNECTIONS_TYPE_MUTUAL

+ 14 - 8
inc/classes/BxDolGridConnections.php

@@ -181,21 +181,27 @@ class BxDolGridConnections extends BxTemplGrid
 
     protected function _prepareIds ()
     {
-        $iViewedId = false;
-        $iId = 0;
         $aIds = bx_get('ids');
-        if ($aIds && is_array($aIds))
+        if($aIds && is_array($aIds))
             $mixedId = array_pop($aIds);
 
-        if (false === strpos($mixedId, ':')) {
-            $iId = (int)$mixedId;
-        }
-        else {
+        return $this->__prepareIds($mixedId);
+    }
+
+    protected function __prepareIds ($mixedId)
+    {
+        $iId = 0;
+        $iViewedId = false;
+
+        if(strpos($mixedId, ':') !== false) {
             list ($iId, $iViewedId) = explode (':', $mixedId);
             $iId = (int)$iId;
             $iViewedId = (int)$iViewedId;
         }
-        return array($iId, $iViewedId);
+        else
+            $iId = (int)$mixedId;
+
+        return [$iId, $iViewedId];
     }
 }
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
install/sql/system.sql


+ 89 - 79
modules/boonex/groups/install/langs/en.xml

@@ -84,59 +84,61 @@
     <string name="_bx_groups_acl_action_delete_any_profile"><![CDATA[Delete Any Group]]></string>
     <string name="_bx_groups_acl_action_delete_invites"><![CDATA[Delete Invites]]></string>
 
-        <string name="_bx_groups_page_title_sys_entries_in_context"><![CDATA[Groups in context]]></string>
-        <string name="_bx_groups_page_title_entries_in_context"><![CDATA[Groups in {display_name}]]></string>
-	<string name="_bx_groups_page_title_sys_joined_entries"><![CDATA[Profile Groups]]></string>
-	<string name="_bx_groups_page_title_joined_entries"><![CDATA[Profile Groups]]></string>
-	<string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Create Group]]></string>
-	<string name="_bx_groups_page_title_create_profile"><![CDATA[Create Group]]></string>
-	<string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Edit Group]]></string>
-	<string name="_bx_groups_page_title_edit_profile"><![CDATA[Edit Group]]></string>
-	<string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Edit Group Cover]]></string>
-	<string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
-	<string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Delete Group]]></string>
-	<string name="_bx_groups_page_title_delete_profile"><![CDATA[Delete Group]]></string>
-        <string name="_bx_groups_page_title_sys_join_profile"><![CDATA[Join Group]]></string>
-	<string name="_bx_groups_page_title_join_profile"><![CDATA[Join Group]]></string>
-	<string name="_bx_groups_page_title_sys_view_profile_closed"><![CDATA[View Closed Group]]></string>
-	<string name="_bx_groups_page_title_sys_view_profile"><![CDATA[View Group]]></string>
-	<string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
-	<string name="_bx_groups_page_title_browse"><![CDATA[Groups]]></string>
-	<string name="_bx_groups_page_title_browse_by_author"><![CDATA[Groups of {display_name}]]></string>
-        <string name="_bx_groups_page_title_browse_by_context"><![CDATA[Groups in {display_name}]]></string>
-	<string name="_bx_groups_page_title_browse_featured"><![CDATA[Featured Groups]]></string>
-	<string name="_bx_groups_page_title_browse_top"><![CDATA[Top Groups]]></string>
-	<string name="_bx_groups_page_title_browse_recent"><![CDATA[New Groups]]></string>
-	<string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} connections]]></string>
-	<string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
-	<string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
-	<string name="_bx_groups_page_title_profile_friends"><![CDATA[Friends]]></string>
-	<string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Members]]></string>
-	<string name="_bx_groups_page_title_group_fans"><![CDATA[Members]]></string>
-	<string name="_bx_groups_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
-	<string name="_bx_groups_page_block_title_entry_reports"><![CDATA[Reports]]></string>
+    <string name="_bx_groups_page_title_sys_entries_in_context"><![CDATA[Groups in context]]></string>
+    <string name="_bx_groups_page_title_entries_in_context"><![CDATA[Groups in {display_name}]]></string>
+    <string name="_bx_groups_page_title_sys_joined_entries"><![CDATA[Profile Groups]]></string>
+    <string name="_bx_groups_page_title_joined_entries"><![CDATA[Profile Groups]]></string>
+    <string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Create Group]]></string>
+    <string name="_bx_groups_page_title_create_profile"><![CDATA[Create Group]]></string>
+    <string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Edit Group]]></string>
+    <string name="_bx_groups_page_title_edit_profile"><![CDATA[Edit Group]]></string>
+    <string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Edit Group Cover]]></string>
+    <string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_groups_page_title_manage_profile"><![CDATA[Manage]]></string>
+    <string name="_bx_groups_page_title_sys_manage_profile"><![CDATA[Manage]]></string>
+    <string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Delete Group]]></string>
+    <string name="_bx_groups_page_title_delete_profile"><![CDATA[Delete Group]]></string>
+    <string name="_bx_groups_page_title_sys_join_profile"><![CDATA[Join Group]]></string>
+    <string name="_bx_groups_page_title_join_profile"><![CDATA[Join Group]]></string>
+    <string name="_bx_groups_page_title_sys_view_profile_closed"><![CDATA[View Closed Group]]></string>
+    <string name="_bx_groups_page_title_sys_view_profile"><![CDATA[View Group]]></string>
+    <string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
+    <string name="_bx_groups_page_title_browse"><![CDATA[Groups]]></string>
+    <string name="_bx_groups_page_title_browse_by_author"><![CDATA[Groups of {display_name}]]></string>
+    <string name="_bx_groups_page_title_browse_by_context"><![CDATA[Groups in {display_name}]]></string>
+    <string name="_bx_groups_page_title_browse_featured"><![CDATA[Featured Groups]]></string>
+    <string name="_bx_groups_page_title_browse_top"><![CDATA[Top Groups]]></string>
+    <string name="_bx_groups_page_title_browse_recent"><![CDATA[New Groups]]></string>
+    <string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} connections]]></string>
+    <string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} and {1} mutual connections]]></string>
+    <string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_page_title_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Members]]></string>
+    <string name="_bx_groups_page_title_group_fans"><![CDATA[Members]]></string>
+    <string name="_bx_groups_page_title_sys_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_groups_page_block_title_entry_reports"><![CDATA[Reports]]></string>
     <string name="_bx_groups_page_title_profile_comments"><![CDATA[Comments]]></string>
-	<string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Group Info]]></string>
-	<string name="_bx_groups_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
-        <string name="_bx_groups_page_title_sys_profile_pricing"><![CDATA[Pricing]]></string>
-	<string name="_bx_groups_page_title_profile_pricing"><![CDATA[Pricing]]></string>
-	<string name="_bx_groups_page_title_sys_recent"><![CDATA[New Groups]]></string>
-	<string name="_bx_groups_page_title_recent"><![CDATA[New Groups]]></string>
-	<string name="_bx_groups_page_title_sys_manage"><![CDATA[Manage Own Groups]]></string>
-	<string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Manage All Groups]]></string>
-	<string name="_bx_groups_page_title_manage"><![CDATA[Manage Groups]]></string>
-	<string name="_bx_groups_page_title_sys_top"><![CDATA[Top Groups]]></string>
-	<string name="_bx_groups_page_title_top"><![CDATA[Top Groups]]></string>
+    <string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Group Info]]></string>
+    <string name="_bx_groups_page_title_profile_info"><![CDATA[Info about {display_name}]]></string>
+    <string name="_bx_groups_page_title_sys_profile_pricing"><![CDATA[Pricing]]></string>
+    <string name="_bx_groups_page_title_profile_pricing"><![CDATA[Pricing]]></string>
+    <string name="_bx_groups_page_title_sys_recent"><![CDATA[New Groups]]></string>
+    <string name="_bx_groups_page_title_recent"><![CDATA[New Groups]]></string>
+    <string name="_bx_groups_page_title_sys_manage"><![CDATA[Manage Own Groups]]></string>
+    <string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Manage All Groups]]></string>
+    <string name="_bx_groups_page_title_manage"><![CDATA[Manage Groups]]></string>
+    <string name="_bx_groups_page_title_sys_top"><![CDATA[Top Groups]]></string>
+    <string name="_bx_groups_page_title_top"><![CDATA[Top Groups]]></string>
     <string name="_bx_groups_page_title_sys_joined"><![CDATA[Joined Groups]]></string>
     <string name="_bx_groups_page_title_sys_followed"><![CDATA[Groups I follow]]></string>
     <string name="_bx_groups_page_title_joined"><![CDATA[Joined Groups]]></string>
     <string name="_bx_groups_page_title_followed"><![CDATA[Groups I follow]]></string>
-	<string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
-	<string name="_bx_groups_page_title_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
-	<string name="_bx_groups_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
+    <string name="_bx_groups_page_title_invite_to_group"><![CDATA[Invite Members to the Group]]></string>
+    <string name="_bx_groups_page_title_sys_entries_search"><![CDATA[Search]]></string>
     <string name="_bx_groups_page_title_entries_search"><![CDATA[Search]]></string>
-  <string name="_bx_groups_page_title_sys_entries_favorites"><![CDATA[Favorites Groups]]></string>
-  <string name="_bx_groups_page_title_entries_favorites"><![CDATA[Favorites Groups]]></string>
+    <string name="_bx_groups_page_title_sys_entries_favorites"><![CDATA[Favorites Groups]]></string>
+    <string name="_bx_groups_page_title_entries_favorites"><![CDATA[Favorites Groups]]></string>
 
     <string name="_bx_groups_page_block_title_sys_entries_actions"><![CDATA[Groups actions]]></string>
     <string name="_bx_groups_page_block_title_entries_actions"><![CDATA[Groups actions]]></string>
@@ -151,41 +153,44 @@
     <string name="_bx_groups_page_block_title_entries_in_context_link"><![CDATA[Groups in <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_groups_page_block_title_entries_in_context"><![CDATA[Groups in context]]></string>
     <string name="_bx_groups_page_block_title_sys_entries_in_context"><![CDATA[Groups in context]]></string>
-	<string name="_bx_groups_page_block_title_sys_joined_entries"><![CDATA[Joined Groups]]></string>
-	<string name="_bx_groups_page_block_title_joined_entries"><![CDATA[Joined Groups]]></string>
+    <string name="_bx_groups_page_block_title_sys_joined_entries"><![CDATA[Joined Groups]]></string>
+    <string name="_bx_groups_page_block_title_joined_entries"><![CDATA[Joined Groups]]></string>
     <string name="_bx_groups_page_block_title_sys_followed_entries"><![CDATA[Groups I follow]]></string>
-	<string name="_bx_groups_page_block_title_followed_entries"><![CDATA[Groups I follow]]></string>
-	<string name="_bx_groups_page_block_title_create_profile"><![CDATA[Create Group]]></string>
-	<string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Edit Group]]></string>
-	<string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
-	<string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Delete Group]]></string>
-        <string name="_bx_groups_page_block_title_join_profile"><![CDATA[Join Group]]></string>
-	<string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[About <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_info"><![CDATA[Info]]></string>
-	<string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Info]]></string>
-        <string name="_bx_groups_page_block_title_system_profile_pricing"><![CDATA[Pricing]]></string>
-        <string name="_bx_groups_page_block_title_profile_pricing"><![CDATA[Pricing]]></string>
-        <string name="_bx_groups_page_block_title_profile_pricing_link"><![CDATA[Pricing of <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_description"><![CDATA[Description]]></string>
-	<string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Friends]]></string>
-	<string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
-        <string name="_bx_groups_page_block_title_entry_context"><![CDATA[Posted in]]></string>
-	<string name="_bx_groups_page_block_title_admins"><![CDATA[Administrators]]></string>
-	<string name="_bx_groups_page_block_title_fans_link"><![CDATA[Members of <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_followed_entries"><![CDATA[Groups I follow]]></string>
+    <string name="_bx_groups_page_block_title_create_profile"><![CDATA[Create Group]]></string>
+    <string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Edit Group]]></string>
+    <string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
+    <string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Delete Group]]></string>
+    <string name="_bx_groups_page_block_title_join_profile"><![CDATA[Join Group]]></string>
+    <string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[About <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Info]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_pricing"><![CDATA[Pricing]]></string>
+    <string name="_bx_groups_page_block_title_profile_pricing"><![CDATA[Pricing]]></string>
+    <string name="_bx_groups_page_block_title_profile_pricing_link"><![CDATA[Pricing of <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_profile_description"><![CDATA[Description]]></string>
+    <string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[Friends of <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Friends]]></string>
+    <string name="_bx_groups_page_block_title_entry_context"><![CDATA[Posted in]]></string>
+    <string name="_bx_groups_page_block_title_admins"><![CDATA[Administrators]]></string>
+    <string name="_bx_groups_page_block_title_fans_link"><![CDATA[Members of <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_groups_page_block_title_fans"><![CDATA[Members]]></string>
-	<string name="_bx_groups_page_block_title_system_fans"><![CDATA[Members]]></string>
-  <string name="_bx_groups_page_block_title_fans_invites"><![CDATA[Invites]]></string>
-  <string name="_bx_groups_page_block_title_system_invites"><![CDATA[Invites]]></string>
-        <string name="_bx_groups_page_block_title_profile_location"><![CDATA[Location]]></string>
-	<string name="_bx_groups_page_block_title_profile_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_groups_page_block_title_system_fans"><![CDATA[Members]]></string>
+    <string name="_bx_groups_page_block_title_system_fans_manage"><![CDATA[Manage fans]]></string>
+    <string name="_bx_groups_page_block_title_invites"><![CDATA[Invites]]></string>
+    <string name="_bx_groups_page_block_title_system_invites_manage"><![CDATA[Invites]]></string>
+    <string name="_bx_groups_page_block_title_bans"><![CDATA[Bans]]></string>
+    <string name="_bx_groups_page_block_title_system_bans_manage"><![CDATA[Bans]]></string>
+    <string name="_bx_groups_page_block_title_profile_location"><![CDATA[Location]]></string>
+    <string name="_bx_groups_page_block_title_profile_comments"><![CDATA[Comments]]></string>
     <string name="_bx_groups_page_block_title_profile_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Actions]]></string>
-	<string name="_bx_groups_page_block_title_featured_profiles"><![CDATA[Featured Groups]]></string>
-	<string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[New Groups]]></string>
-	<string name="_bx_groups_page_block_title_system_manage"><![CDATA[Manage Own Groups]]></string>
-	<string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Manage All Groups]]></string>
-	<string name="_bx_groups_page_block_title_manage"><![CDATA[Manage Groups]]></string>
+    <string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_groups_page_block_title_featured_profiles"><![CDATA[Featured Groups]]></string>
+    <string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[New Groups]]></string>
+    <string name="_bx_groups_page_block_title_system_manage"><![CDATA[Manage Own Groups]]></string>
+    <string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Manage All Groups]]></string>
+    <string name="_bx_groups_page_block_title_manage"><![CDATA[Manage Groups]]></string>
     <string name="_bx_groups_page_block_title_top_profiles"><![CDATA[Top Groups]]></string>
     <string name="_bx_groups_page_block_title_joined_profiles"><![CDATA[Joined Groups]]></string>
     <string name="_bx_groups_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
@@ -254,6 +259,8 @@
     <string name="_bx_groups_menu_item_title_view_joined_groups"><![CDATA[Groups]]></string>
     <string name="_bx_groups_menu_item_title_system_view_fans"><![CDATA[Members]]></string>
     <string name="_bx_groups_menu_item_title_view_fans"><![CDATA[Members]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_groups_menu_item_title_view_manage"><![CDATA[Manage]]></string>
     <string name="_bx_groups_menu_item_title_system_view_profile_comments"><![CDATA[Comments]]></string>
     <string name="_bx_groups_menu_item_title_view_profile_comments"><![CDATA[Comments]]></string>
     <string name="_bx_groups_menu_item_title_system_view_profile_info"><![CDATA[Info]]></string>
@@ -365,6 +372,7 @@
     <string name="_bx_groups_txt_account_suspended"><![CDATA[This group is suspended.]]></string>
     <string name="_bx_groups_txt_status_hidden"><![CDATA[This group was hidden.]]></string>
     <string name="_bx_groups_txt_N_fans"><![CDATA[{0} members]]></string>
+    <string name="_bx_groups_txt_ban_added"><![CDATA[Banned]]></string>
     <string name="_bx_groups_txt_role"><![CDATA[Role]]></string>
     <string name="_bx_groups_txt_role_added"><![CDATA[Added]]></string>
     <string name="_bx_groups_txt_role_expired"><![CDATA[Expires]]></string>
@@ -375,6 +383,8 @@
     <string name="_bx_groups_txt_sample_score_up_single"><![CDATA[score up vote to group]]></string>
     <string name="_bx_groups_txt_sample_score_down_single"><![CDATA[score down vote to group]]></string>
     <string name="_bx_groups_txt_set_role"><![CDATA[Set Role]]></string>
+    <string name="_bx_groups_txt_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_groups_txt_delete_and_ban"><![CDATA[Delete and ban]]></string>
     <string name="_bx_groups_txt_private_group"><![CDATA[Private group]]></string>
     <string name="_bx_groups_txt_invite_popup_text"><![CDATA[You have been invited to a group. Click the button below to accept the invitation.]]></string>
     <string name="_bx_groups_txt_invite_popup_title"><![CDATA[Invitation to a group]]></string>

+ 4 - 4
modules/boonex/groups/install/sql/disable.sql

@@ -8,7 +8,7 @@ DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
 
 -- PAGES
 DELETE FROM `sys_objects_page` WHERE `module` = 'bx_groups';
-DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_groups' OR `object` IN('bx_groups_create_profile', 'bx_groups_delete_profile', 'bx_groups_context', 'bx_groups_join_profile', 'bx_groups_edit_profile', 'bx_groups_edit_profile_cover', 'bx_groups_invite', 'bx_groups_view_profile', 'bx_groups_view_profile_closed', 'bx_groups_profile_info', 'bx_groups_profile_pricing', 'bx_groups_profile_comments', 'bx_groups_home', 'bx_groups_fans', 'bx_groups_joined', 'bx_groups_favorites', 'bx_groups_top', 'bx_groups_search', 'bx_groups_manage', 'bx_groups_administration');
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_groups' OR `object` IN('bx_groups_create_profile', 'bx_groups_delete_profile', 'bx_groups_context', 'bx_groups_join_profile', 'bx_groups_edit_profile', 'bx_groups_edit_profile_cover', 'bx_groups_invite', 'bx_groups_view_profile', 'bx_groups_view_profile_closed', 'bx_groups_profile_info', 'bx_groups_profile_pricing', 'bx_groups_profile_comments', 'bx_groups_home', 'bx_groups_fans', 'bx_groups_manage_item', 'bx_groups_joined', 'bx_groups_favorites', 'bx_groups_top', 'bx_groups_search', 'bx_groups_manage', 'bx_groups_administration');
 
 -- MENU
 DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_groups';
@@ -44,9 +44,9 @@ DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_groups%';
 DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_groups%';
 
 -- GRIDS
-DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
-DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
-DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_bans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_bans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_groups_administration', 'bx_groups_moderation', 'bx_groups_common', 'bx_groups_fans', 'bx_groups_bans', 'bx_groups_invites', 'bx_groups_prices_manage', 'bx_groups_prices_view');
 
 -- ALERTS
 SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_groups' LIMIT 1);

+ 30 - 8
modules/boonex/groups/install/sql/enable.sql

@@ -107,13 +107,21 @@ 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_groups_profile_pricing', 1, 'bx_groups', '_bx_groups_page_block_title_system_profile_pricing', '_bx_groups_page_block_title_profile_pricing_link', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_groups";s:6:"method";s:14:"entity_pricing";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 0, 1, 1);
 
--- PAGE: group fans
+-- PAGE: event fans
 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_groups_fans', 'group-fans', '_bx_groups_page_title_sys_group_fans', '_bx_groups_page_title_group_fans', 'bx_groups', 5, 2147483647, 1, 'page.php?i=group-fans', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_fans', 1, 'bx_groups', '_bx_groups_page_block_title_system_fans', '_bx_groups_page_block_title_fans_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:10:"fans_table";}', 0, 0, 1, 1),
-('bx_groups_fans', 1, 'bx_groups', '_bx_groups_page_block_title_system_invites', '_bx_groups_page_block_title_fans_invites', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:13:"invites_table";}', 0, 0, 1, 1);
+('bx_groups_fans', 1, 'bx_groups', '_bx_groups_page_block_title_system_fans', '_bx_groups_page_block_title_fans_link', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_groups";s:6:"method";s:14:"browse_members";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}}', 0, 0, 1, 1);
+
+-- PAGE: group manage
+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_groups_manage_item', 'group-manage', '_bx_groups_page_title_sys_manage_profile', '_bx_groups_page_title_manage_profile', 'bx_groups', 5, 2147483647, 1, 'page.php?i=manage', '', '', '', 0, 1, 0, 'BxGroupsPageEntry', 'modules/boonex/groups/classes/BxGroupsPageEntry.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_groups_manage_item', 1, 'bx_groups', '_bx_groups_page_block_title_system_fans_manage', '_bx_groups_page_block_title_fans_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:10:"fans_table";}', 0, 0, 1, 1),
+('bx_groups_manage_item', 1, 'bx_groups', '_bx_groups_page_block_title_system_invites_manage', '_bx_groups_page_block_title_invites', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:13:"invites_table";}', 0, 0, 1, 2),
+('bx_groups_manage_item', 1, 'bx_groups', '_bx_groups_page_block_title_system_bans_manage', '_bx_groups_page_block_title_bans', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_groups";s:6:"method";s:10:"bans_table";}', 0, 0, 1, 3);
 
 -- PAGE: view entry comments
 INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
@@ -370,6 +378,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_groups_view_submenu', 'bx_groups', 'group-profile-info', '_bx_groups_menu_item_title_system_view_profile_info', '_bx_groups_menu_item_title_view_profile_info', 'page.php?i=group-profile-info&id={content_id}', '', '', 'info-circle col-gray', '', '', 0, 2147483647, 1, 0, 2),
 ('bx_groups_view_submenu', 'bx_groups', 'group-profile-comments', '_bx_groups_menu_item_title_system_view_profile_comments', '_bx_groups_menu_item_title_view_profile_comments', 'page.php?i=group-profile-comments&id={content_id}', '', '', '', '', '', 0, 2147483647, 0, 0, 3),
 ('bx_groups_view_submenu', 'bx_groups', 'group-fans', '_bx_groups_menu_item_title_system_view_fans', '_bx_groups_menu_item_title_view_fans', 'page.php?i=group-fans&profile_id={profile_id}', '', '', 'users col-blue3', '', '', 0, 2147483647, 1, 0, 4),
+('bx_groups_view_submenu', 'bx_groups', 'group-manage', '_bx_groups_menu_item_title_system_view_manage', '_bx_groups_menu_item_title_view_manage', 'page.php?i=group-manage&profile_id={profile_id}', '', '', 'users col-blue3', '', '', 0, 2147483647, 1, 0, 5),
 ('bx_groups_view_submenu', 'bx_groups', 'more-auto', '_bx_groups_menu_item_title_system_view_profile_more_auto', '_bx_groups_menu_item_title_view_profile_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, 1, 0, 9999);
 
 -- MENU: custom menu for snippet meta info
@@ -565,11 +574,24 @@ INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `or
 ('bx_groups_fans', 'role_expired', '_bx_groups_txt_role_expired', '10%', '', 17),
 ('bx_groups_fans', 'actions', '', '20%', '', 20);
 
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`) VALUES
-('bx_groups_fans', 'single', 'accept', '_sys_accept', '', 0, 10),
-('bx_groups_fans', 'single', 'set_role', '_bx_groups_txt_set_role', '', 0, 20),
-('bx_groups_fans', 'single', 'set_role_submit', '', '', 0, 21),
-('bx_groups_fans', 'single', 'delete', '', 'remove', 1, 40);
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_groups_fans', 'single', 'accept', '_sys_accept', '', 0, 0, 10),
+('bx_groups_fans', 'single', 'set_role', '_bx_groups_txt_set_role', '', 0, 0, 20),
+('bx_groups_fans', 'single', 'set_role_submit', '', '', 0, 0, 21),
+('bx_groups_fans', 'single', 'delete', '_bx_groups_txt_delete', 'remove', 1, 1, 40),
+('bx_groups_fans', 'single', 'delete_and_ban', '_bx_groups_txt_delete_and_ban', 'user-xmark', 1, 1, 41);
+
+-- GRID: bans
+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`, `responsive`, `override_class_name`, `override_class_file`) VALUES
+('bx_groups_bans', '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, 1, 'BxGroupsGridBans', 'modules/boonex/groups/classes/BxGroupsGridBans.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
+('bx_groups_bans', 'name', '_sys_name', '70%', '', 10),
+('bx_groups_bans', 'added', '_bx_groups_txt_ban_added', '10%', '', 20),
+('bx_groups_bans', 'actions', '', '20%', '', 30);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_groups_bans', 'single', 'delete', '', 'remove', 1, 1, 10);
 
 
 -- GRID: invites

+ 1 - 1
modules/boonex/russian/data/langs/bx_events/ru.xml

@@ -242,7 +242,7 @@
     <string name="_bx_events_page_block_title_fans_link"><![CDATA[Придут на <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_events_page_block_title_fans"><![CDATA[Придут]]></string>
     <string name="_bx_events_page_block_title_system_fans"><![CDATA[Придут]]></string>
-    <string name="_bx_events_page_block_title_system_fans_manage"><![CDATA[Manage fans]]></string>
+    <string name="_bx_events_page_block_title_system_fans_manage"><![CDATA[Управление гостями]]></string>
     <string name="_bx_events_page_block_title_invites"><![CDATA[Приглашения]]></string>
     <string name="_bx_events_page_block_title_system_invites_manage"><![CDATA[Приглашения]]></string>
     <string name="_bx_events_page_block_title_subscribers_link"><![CDATA[Заинтересованы в <a href="{profile_link}">{display_name}</a>]]></string>

+ 84 - 74
modules/boonex/russian/data/langs/bx_groups/ru.xml

@@ -84,49 +84,51 @@
 	<string name="_bx_groups_acl_action_delete_any_profile"><![CDATA[Удалять любую группу]]></string>
 	<string name="_bx_groups_acl_action_delete_invites"><![CDATA[Удалять приглашения]]></string>
 
-        <string name="_bx_groups_page_title_sys_entries_in_context"><![CDATA[Группы в контексте]]></string>
-        <string name="_bx_groups_page_title_entries_in_context"><![CDATA[Группы в {display_name}]]></string>
-	<string name="_bx_groups_page_title_sys_joined_entries"><![CDATA[Группы профиля]]></string>
+    <string name="_bx_groups_page_title_sys_entries_in_context"><![CDATA[Группы в контексте]]></string>
+    <string name="_bx_groups_page_title_entries_in_context"><![CDATA[Группы в {display_name}]]></string>
+    <string name="_bx_groups_page_title_sys_joined_entries"><![CDATA[Группы профиля]]></string>
     <string name="_bx_groups_page_title_sys_followed"><![CDATA[Подписанные Группы]]></string>
     <string name="_bx_groups_page_title_followed"><![CDATA[Подписанные Группы]]></string>
-	<string name="_bx_groups_page_title_joined_entries"><![CDATA[Группы профиля]]></string>
-	<string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Создать группу]]></string>
-	<string name="_bx_groups_page_title_create_profile"><![CDATA[Создать группу]]></string>
-	<string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Редактировать группу]]></string>
-	<string name="_bx_groups_page_title_edit_profile"><![CDATA[Редактировать группу]]></string>
-	<string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку группы]]></string>
-	<string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
-	<string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Удалить группу]]></string>
-	<string name="_bx_groups_page_title_delete_profile"><![CDATA[Удалить группу]]></string>
-        <string name="_bx_groups_page_title_sys_join_profile"><![CDATA[Присоединиться к группе]]></string>
-	<string name="_bx_groups_page_title_join_profile"><![CDATA[Присоединиться к группе]]></string>
-	<string name="_bx_groups_page_title_sys_view_profile_closed"><![CDATA[Просмотр закрытой группы]]></string>
-	<string name="_bx_groups_page_title_sys_view_profile"><![CDATA[Просмотр группы]]></string>
-	<string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
-	<string name="_bx_groups_page_title_browse"><![CDATA[Группы]]></string>
-	<string name="_bx_groups_page_title_browse_by_author"><![CDATA[Группы {display_name}]]></string>
-        <string name="_bx_groups_page_title_browse_by_context"><![CDATA[Группы в {display_name}]]></string>
-	<string name="_bx_groups_page_title_browse_featured"><![CDATA[Продвинутые группы]]></string>
+    <string name="_bx_groups_page_title_joined_entries"><![CDATA[Группы профиля]]></string>
+    <string name="_bx_groups_page_title_sys_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_page_title_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_page_title_sys_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_page_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_page_title_sys_edit_profile_cover"><![CDATA[Редактировать обложку группы]]></string>
+    <string name="_bx_groups_page_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_groups_page_title_manage_profile"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_page_title_sys_manage_profile"><![CDATA[Управление группой]]></string>
+    <string name="_bx_groups_page_title_sys_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_page_title_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_page_title_sys_join_profile"><![CDATA[Присоединиться к группе]]></string>
+    <string name="_bx_groups_page_title_join_profile"><![CDATA[Присоединиться к группе]]></string>
+    <string name="_bx_groups_page_title_sys_view_profile_closed"><![CDATA[Просмотр закрытой группы]]></string>
+    <string name="_bx_groups_page_title_sys_view_profile"><![CDATA[Просмотр группы]]></string>
+    <string name="_bx_groups_page_title_view_profile"><![CDATA[{display_name}]]></string>
+    <string name="_bx_groups_page_title_browse"><![CDATA[Группы]]></string>
+    <string name="_bx_groups_page_title_browse_by_author"><![CDATA[Группы {display_name}]]></string>
+    <string name="_bx_groups_page_title_browse_by_context"><![CDATA[Группы в {display_name}]]></string>
+    <string name="_bx_groups_page_title_browse_featured"><![CDATA[Продвинутые группы]]></string>
     <string name="_bx_groups_page_title_browse_top"><![CDATA[Популярные группы]]></string>
-	<string name="_bx_groups_page_title_browse_recent"><![CDATA[Новые группы]]></string>
-	<string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} связей]]></string>
-	<string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
-	<string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
-	<string name="_bx_groups_page_title_profile_friends"><![CDATA[Друзья]]></string>
-	<string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Участники]]></string>
-	<string name="_bx_groups_page_title_group_fans"><![CDATA[Участники]]></string>
-	<string name="_bx_groups_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_page_title_browse_recent"><![CDATA[Новые группы]]></string>
+    <string name="_bx_groups_page_title_browse_connections"><![CDATA[{0} связей]]></string>
+    <string name="_bx_groups_page_title_browse_connections_mutual"><![CDATA[{0} и {1} обоюдных связей]]></string>
+    <string name="_bx_groups_page_title_sys_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_page_title_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_page_title_sys_group_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_page_title_group_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_page_title_sys_profile_comments"><![CDATA[Комментарии]]></string>
     <string name="_bx_groups_page_title_profile_comments"><![CDATA[Комментарии]]></string>
-	<string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Инфо группы]]></string>
-	<string name="_bx_groups_page_title_profile_info"><![CDATA[Инфо о {display_name}]]></string>
-        <string name="_bx_groups_page_title_sys_profile_pricing"><![CDATA[Цены]]></string>
-	<string name="_bx_groups_page_title_profile_pricing"><![CDATA[Цены]]></string>
-	<string name="_bx_groups_page_title_sys_recent"><![CDATA[Новые группы]]></string>
-	<string name="_bx_groups_page_title_recent"><![CDATA[Новые группы]]></string>
-	<string name="_bx_groups_page_title_sys_manage"><![CDATA[Управление собственными группами]]></string>
-	<string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Управление всеми группами]]></string>
-	<string name="_bx_groups_page_title_manage"><![CDATA[Управление]]></string>
-	<string name="_bx_groups_page_title_sys_top"><![CDATA[Популярные группы]]></string>
+    <string name="_bx_groups_page_title_sys_profile_info"><![CDATA[Инфо группы]]></string>
+    <string name="_bx_groups_page_title_profile_info"><![CDATA[Инфо о {display_name}]]></string>
+    <string name="_bx_groups_page_title_sys_profile_pricing"><![CDATA[Цены]]></string>
+    <string name="_bx_groups_page_title_profile_pricing"><![CDATA[Цены]]></string>
+    <string name="_bx_groups_page_title_sys_recent"><![CDATA[Новые группы]]></string>
+    <string name="_bx_groups_page_title_recent"><![CDATA[Новые группы]]></string>
+    <string name="_bx_groups_page_title_sys_manage"><![CDATA[Управление собственными группами]]></string>
+    <string name="_bx_groups_page_title_sys_manage_administration"><![CDATA[Управление всеми группами]]></string>
+    <string name="_bx_groups_page_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_page_title_sys_top"><![CDATA[Популярные группы]]></string>
     <string name="_bx_groups_page_title_top"><![CDATA[Популярные группы]]></string>
     <string name="_bx_groups_page_title_sys_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
     <string name="_bx_groups_page_title_invite_to_group"><![CDATA[Пригласить участников в группу]]></string>
@@ -144,43 +146,46 @@
     <string name="_bx_groups_page_block_title_entries_in_context_link"><![CDATA[Группы в <a href="{profile_link}">{display_name}</a>]]></string>
     <string name="_bx_groups_page_block_title_entries_in_context"><![CDATA[Группы в контексте]]></string>
     <string name="_bx_groups_page_block_title_sys_entries_in_context"><![CDATA[Группы в контексте]]></string>
-	<string name="_bx_groups_page_block_title_sys_joined_entries"><![CDATA[Участие в группах]]></string>
-	<string name="_bx_groups_page_block_title_joined_entries"><![CDATA[Участие в группах]]></string>
-     <string name="_bx_groups_page_block_title_sys_followed_entries"><![CDATA[Подписанные Группы]]></string>
-	<string name="_bx_groups_page_block_title_followed_entries"><![CDATA[Подписанные Группы]]></string>
-	<string name="_bx_groups_page_block_title_create_profile"><![CDATA[Создать группу]]></string>
-	<string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Редактировать группу]]></string>
-	<string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
-	<string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Удалить группу]]></string>
-        <string name="_bx_groups_page_block_title_join_profile"><![CDATA[Присоединиться к группе]]></string>
-	<string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
-	<string name="_bx_groups_page_block_title_profile_info"><![CDATA[Инфо]]></string>
-	<string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
-        <string name="_bx_groups_page_block_title_system_profile_pricing"><![CDATA[Цены]]></string>
-        <string name="_bx_groups_page_block_title_profile_pricing"><![CDATA[Цены]]></string>
-        <string name="_bx_groups_page_block_title_profile_pricing_link"><![CDATA[Расценки группы: <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_description"><![CDATA[Описание]]></string>
-	<string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
-	<string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
-	<string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
-        <string name="_bx_groups_page_block_title_entry_context"><![CDATA[Опубликовано в]]></string>
-	<string name="_bx_groups_page_block_title_admins"><![CDATA[Администраторы]]></string>
-	<string name="_bx_groups_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
-	<string name="_bx_groups_page_block_title_fans"><![CDATA[Участники]]></string>
-	<string name="_bx_groups_page_block_title_system_fans"><![CDATA[Участники]]></string>
-	<string name="_bx_groups_page_block_title_fans_invites"><![CDATA[Приглашения]]></string>
-	<string name="_bx_groups_page_block_title_system_invites"><![CDATA[Приглашения]]></string>
-        <string name="_bx_groups_page_block_title_profile_location"><![CDATA[Расположение]]></string>
-	<string name="_bx_groups_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
+    <string name="_bx_groups_page_block_title_sys_joined_entries"><![CDATA[Участие в группах]]></string>
+    <string name="_bx_groups_page_block_title_joined_entries"><![CDATA[Участие в группах]]></string>
+    <string name="_bx_groups_page_block_title_sys_followed_entries"><![CDATA[Подписанные Группы]]></string>
+    <string name="_bx_groups_page_block_title_followed_entries"><![CDATA[Подписанные Группы]]></string>
+    <string name="_bx_groups_page_block_title_create_profile"><![CDATA[Создать группу]]></string>
+    <string name="_bx_groups_page_block_title_edit_profile"><![CDATA[Редактировать группу]]></string>
+    <string name="_bx_groups_page_block_title_edit_profile_cover"><![CDATA[Редактировать обложку]]></string>
+    <string name="_bx_groups_page_block_title_delete_profile"><![CDATA[Удалить группу]]></string>
+    <string name="_bx_groups_page_block_title_join_profile"><![CDATA[Присоединиться к группе]]></string>
+    <string name="_bx_groups_page_block_title_profile_info_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Инфо]]></string>
+    <string name="_bx_groups_page_block_title_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_pricing"><![CDATA[Цены]]></string>
+    <string name="_bx_groups_page_block_title_profile_pricing"><![CDATA[Цены]]></string>
+    <string name="_bx_groups_page_block_title_profile_pricing_link"><![CDATA[Расценки группы: <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_profile_description"><![CDATA[Описание]]></string>
+    <string name="_bx_groups_page_block_title_profile_friends_link"><![CDATA[<a href="{profile_link}">{display_name}</a> - Друзья]]></string>
+    <string name="_bx_groups_page_block_title_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_page_block_title_system_profile_friends"><![CDATA[Друзья]]></string>
+    <string name="_bx_groups_page_block_title_entry_context"><![CDATA[Опубликовано в]]></string>
+    <string name="_bx_groups_page_block_title_admins"><![CDATA[Администраторы]]></string>
+    <string name="_bx_groups_page_block_title_fans_link"><![CDATA[Участники группы: <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_groups_page_block_title_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_page_block_title_system_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_page_block_title_system_fans_manage"><![CDATA[Управление участниками]]></string>
+    <string name="_bx_groups_page_block_title_invites"><![CDATA[Приглашения]]></string>
+    <string name="_bx_groups_page_block_title_system_invites_manage"><![CDATA[Приглашения]]></string>
+    <string name="_bx_groups_page_block_title_bans"><![CDATA[Баны]]></string>
+    <string name="_bx_groups_page_block_title_system_bans_manage"><![CDATA[Баны]]></string>
+    <string name="_bx_groups_page_block_title_profile_location"><![CDATA[Расположение]]></string>
+    <string name="_bx_groups_page_block_title_profile_comments"><![CDATA[Комментарии]]></string>
     <string name="_bx_groups_page_block_title_profile_comments_link"><![CDATA[Комментарии к <a href="{entry_link}">{title}</a>]]></string>
-	<string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Действия]]></string>
-	<string name="_bx_groups_page_block_title_featured_profiles"><![CDATA[Продвинутые группы]]></string>
-	<string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[Новые группы]]></string>
-	<string name="_bx_groups_page_block_title_system_manage"><![CDATA[Управление собственными группами]]></string>
-	<string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Управление всеми группами]]></string>
-	<string name="_bx_groups_page_block_title_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_page_block_title_profile_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_groups_page_block_title_featured_profiles"><![CDATA[Продвинутые группы]]></string>
+    <string name="_bx_groups_page_block_title_latest_profiles"><![CDATA[Новые группы]]></string>
+    <string name="_bx_groups_page_block_title_system_manage"><![CDATA[Управление собственными группами]]></string>
+    <string name="_bx_groups_page_block_title_system_manage_administration"><![CDATA[Управление всеми группами]]></string>
+    <string name="_bx_groups_page_block_title_manage"><![CDATA[Управление]]></string>
     <string name="_bx_groups_page_block_title_top_profiles"><![CDATA[Популярные группы]]></string>
-	<string name="_bx_groups_page_block_title_joined_profiles"><![CDATA[Мои группы]]></string>
+    <string name="_bx_groups_page_block_title_joined_profiles"><![CDATA[Мои группы]]></string>
     <string name="_bx_groups_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
     <string name="_bx_groups_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
     <string name="_bx_groups_page_block_title_categories"><![CDATA[Категории групп]]></string>
@@ -250,6 +255,8 @@
     <string name="_bx_groups_menu_item_title_view_joined_groups"><![CDATA[Группы]]></string>
     <string name="_bx_groups_menu_item_title_system_view_fans"><![CDATA[Участники]]></string>
     <string name="_bx_groups_menu_item_title_view_fans"><![CDATA[Участники]]></string>
+    <string name="_bx_groups_menu_item_title_system_view_manage"><![CDATA[Управление]]></string>
+    <string name="_bx_groups_menu_item_title_view_manage"><![CDATA[Управление]]></string>
     <string name="_bx_groups_menu_item_title_system_view_profile_comments"><![CDATA[Комментарии]]></string>
     <string name="_bx_groups_menu_item_title_view_profile_comments"><![CDATA[Комментарии]]></string>
     <string name="_bx_groups_menu_item_title_system_view_profile_info"><![CDATA[Инфо]]></string>
@@ -362,6 +369,7 @@
     <string name="_bx_groups_txt_account_suspended"><![CDATA[Эта группа заблокирована.]]></string>
     <string name="_bx_groups_txt_status_hidden"><![CDATA[Эта группа была скрыта.]]></string>
     <string name="_bx_groups_txt_N_fans"><![CDATA[{0} участников]]></string>
+    <string name="_bx_groups_txt_ban_added"><![CDATA[Заблокирован]]></string>
     <string name="_bx_groups_txt_role"><![CDATA[Роль]]></string>
     <string name="_bx_groups_txt_role_added"><![CDATA[Начало]]></string>
     <string name="_bx_groups_txt_role_expired"><![CDATA[Окончание]]></string>
@@ -372,6 +380,8 @@
     <string name="_bx_groups_txt_sample_score_up_single"><![CDATA[голос за группу]]></string>
     <string name="_bx_groups_txt_sample_score_down_single"><![CDATA[голос против группы]]></string>
     <string name="_bx_groups_txt_set_role"><![CDATA[Задать роль]]></string>
+    <string name="_bx_groups_txt_delete"><![CDATA[Удалить]]></string>
+    <string name="_bx_groups_txt_delete_and_ban"><![CDATA[Удалить и забанить]]></string>
     <string name="_bx_groups_txt_private_group"><![CDATA[Приватная группа]]></string>
     <string name="_bx_groups_txt_invite_popup_text"><![CDATA[Вы были приглашены в эту группу.  Нажмите кнопку ниже чтобы принять приглашение.]]></string>
     <string name="_bx_groups_txt_invite_popup_title"><![CDATA[Приглашение в группу]]></string>

+ 7 - 2
template/scripts/BxBaseGrid.php

@@ -85,7 +85,7 @@ class BxBaseGrid extends BxDolGrid
         $iAffected = 0;
         $aIds = bx_get('ids');
         if (!$aIds || !is_array($aIds))
-            return $this->_bIsApi ? $aResult : echoJson($aResult);
+            return $this->_getActionResult($aResult);
 
         foreach ($aIds as $mixedId)
             $iAffected += $this->_delete($mixedId) ? 1 : 0;
@@ -95,7 +95,7 @@ class BxBaseGrid extends BxDolGrid
         else
             $aResult = ['msg' => _t("_sys_grid_delete_failed")];
 
-        return $this->_bIsApi ? $aResult : echoJson($aResult);
+        return $this->_getActionResult($aResult);
     }
 
     public function performActionEnable($mixedChecked = null)
@@ -824,6 +824,11 @@ class BxBaseGrid extends BxDolGrid
         return '<div class="bx-grid-actions-divider bx-def-margin-sec-left"> | </div>';
     }
 
+    protected function _getActionResult($aResult)
+    {
+        return $this->_bIsApi ? $aResult : echoJson($aResult);
+    }
+
     protected function _getFilterControls ()
     {
         $oForm = new BxTemplFormView(array());

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно