Răsfoiți Sursa

Ticket #833 - points 1 - 3

AntonLV 9 ani în urmă
părinte
comite
ee6ed1745d

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileDb.php

@@ -21,7 +21,7 @@ class BxBaseModProfileDb extends BxBaseModGeneralDb
 
     public function getContentInfoById ($iContentId)
     {
-        $sQuery = $this->prepare ("SELECT `c`.*, `p`.`account_id`, `p`.`id` AS `profile_id`, `p`.`status` AS `profile_status` FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` AS `c` INNER JOIN `sys_profiles` AS `p` ON (`p`.`content_id` = `c`.`id` AND `p`.`type` = ?) WHERE `c`.`id` = ?", $this->_oConfig->getName(), $iContentId);
+        $sQuery = $this->prepare ("SELECT `c`.*, `p`.`account_id`, `p`.`id` AS `profile_id`, `a`.`email` AS `profile_email`, `p`.`status` AS `profile_status` FROM `" . $this->_oConfig->CNF['TABLE_ENTRIES'] . "` AS `c` INNER JOIN `sys_profiles` AS `p` ON (`p`.`content_id` = `c`.`id` AND `p`.`type` = ?) INNER JOIN `sys_accounts` AS `a` ON (`p`.`account_id` = `a`.`id`) WHERE `c`.`id` = ?", $this->_oConfig->getName(), $iContentId);
         return $this->getRow($sQuery);
     }
 

+ 44 - 0
modules/base/profile/classes/BxBaseModProfileFormEntry.php

@@ -118,6 +118,50 @@ class BxBaseModProfileFormEntry extends BxBaseModGeneralFormEntry
         return parent::delete($iContentId, $aContentInfo);
     }
 
+    protected function genCustomViewRowValueProfileEmail($aInput)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if(empty($aInput['value']))
+            return '';
+
+        $sEmail = $aInput['value'];
+
+        $sModuleAccounts = 'bx_accounts';
+    	if(!BxDolModuleQuery::getInstance()->isEnabledByName($sModuleAccounts))
+    		return $sEmail;
+
+		$oModuleAccounts = BxDolModule::getInstance($sModuleAccounts);
+		if(!$oModuleAccounts || empty($oModuleAccounts->_oConfig->CNF['URL_MANAGE_ADMINISTRATION']))
+			return $sEmail;
+
+        return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
+            'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($oModuleAccounts->_oConfig->CNF['URL_MANAGE_ADMINISTRATION'], array(
+            	'filter' => urlencode($sEmail)
+            )),
+            'title' => '',
+            'content' => $sEmail
+        ));
+    }
+
+    protected function genCustomViewRowValueProfileStatus($aInput)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if(empty($aInput['value']))
+            return '';
+
+        $sStatus = _t('_sys_profile_status_' . $aInput['value']);
+        if(empty($CNF['URL_MANAGE_ADMINISTRATION']) || empty($CNF['FIELD_TITLE']) && !empty($this->aInputs[$CNF['FIELD_TITLE']]['value']))
+            return $sStatus;
+
+        return $this->_oModule->_oTemplate->parseHtmlByName('name_link.html', array(
+            'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array(
+            	'filter' => urlencode($this->aInputs[$CNF['FIELD_TITLE']]['value'])
+            )),
+            'title' => '',
+            'content' => $sStatus
+        ));
+    }
+
     protected function _associalFileWithContent($oStorage, $iFileId, $iProfileId, $iContentId, $sPictureField = '')
     {
         $isAdmin = $this->_oModule->_isModerator();        

+ 2 - 0
modules/base/profile/classes/BxBaseModProfileGridAdministration.php

@@ -21,6 +21,8 @@ class BxBaseModProfileGridAdministration extends BxBaseModGeneralGridAdministrat
 
         $CNF = &$this->_oModule->_oConfig->CNF;
 
+        $this->_aQueryReset = array('order_field', 'order_dir', $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
+
         $this->_sFilter1Name = 'filter1';
         $this->_aFilter1Values = array(
 			'active' => $CNF['T']['filter_item_active'],

+ 30 - 13
modules/base/profile/classes/BxBaseModProfilePageEntry.php

@@ -38,7 +38,9 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
             $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_aProfileInfo['content_id']);
         }
 
-        if (!$this->_aContentInfo || !$this->_oProfile || (!$this->_oProfile->isActive() && $this->_oModule->checkAllowedEditAnyEntry() !== CHECK_ACTION_RESULT_ALLOWED)) {
+        $bLoggedOwner = $this->_oProfile->id() == bx_get_logged_profile_id();
+        $bLoggedModerator = $this->_oModule->checkAllowedEditAnyEntry() === CHECK_ACTION_RESULT_ALLOWED; 
+        if (!$this->_aContentInfo || !$this->_oProfile || (!$this->_oProfile->isActive() && !$bLoggedOwner && !$bLoggedModerator)) {
             $this->setPageCover(false);
             return;
         }
@@ -57,13 +59,34 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
         $this->addMarkers(array('display_name' => $this->_oProfile->getDisplayName())); // profile display name
         $this->addMarkers(array('profile_link' => $this->_oProfile->getUrl())); // profile link
 
-        // display message if profile isn't active
         $aInformers = array ();
         $oInformer = BxDolInformer::getInstance($this->_oTemplate);
-        if (bx_get_logged_profile_id() == $this->_oProfile->id() && !empty($CNF['INFORMERS']['status']) && $oInformer) {
-            $sStatus = $this->_aContentInfo['profile_status'];
-            if (isset($CNF['INFORMERS']['status']['map'][$sStatus]))
-                $aInformers[] = array ('name' => $CNF['INFORMERS']['status']['name'], 'msg' => _t($CNF['INFORMERS']['status']['map'][$sStatus]), 'type' => BX_INFORMER_ALERT);
+        if($oInformer) {
+            // display message to profile author if profile isn't active
+            if ($bLoggedOwner && !empty($CNF['INFORMERS']['status'])) {
+                $sStatus = $this->_aContentInfo['profile_status'];
+
+                $aInformer = $CNF['INFORMERS']['status'];
+                if (isset($aInformer['map'][$sStatus]))
+                    $aInformers[] = array ('name' => $aInformer['name'], 'msg' => _t($aInformer['map'][$sStatus]), 'type' => BX_INFORMER_ALERT);
+            }
+
+            // display message to moderator/administrator if profile isn't active
+            if (!$bLoggedOwner && $bLoggedModerator && !empty($CNF['INFORMERS']['status_moderation'])) {
+                $sStatus = $this->_aContentInfo['profile_status'];
+                $sManageUrl = '#';
+                if(!empty($CNF['FIELD_TITLE']) && !empty($CNF['URL_MANAGE_ADMINISTRATION']))
+                    $sManageUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_MANAGE_ADMINISTRATION'], array('filter' => urlencode($this->_aContentInfo[$CNF['FIELD_TITLE']])));
+
+                $aInformer = $CNF['INFORMERS']['status_moderation'];
+                if (isset($aInformer['map'][$sStatus]))
+                    $aInformers[] = array ('name' => $aInformer['name'], 'msg' => _t($aInformer['map'][$sStatus], $sManageUrl), 'type' => BX_INFORMER_ALERT);
+            }
+
+            // add informers
+            if ($aInformers)
+                foreach ($aInformers as $a)
+                    $oInformer->add($a['name'], $this->_replaceMarkers($a['msg']), $a['type']);
         }
 
         // display message if it is possible to switch to this profile
@@ -73,12 +96,6 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
                 $oProfile->checkSwitchToProfile($this->_oTemplate);
         }
 
-        // add informers
-        if ($aInformers && $oInformer) {
-            foreach ($aInformers as $a)
-                $oInformer->add($a['name'], $this->_replaceMarkers($a['msg']), $a['type']);
-        }
-
         // set cover
         $this->_oModule->_oTemplate->setCover($this, $this->_aContentInfo);
     }
@@ -86,7 +103,7 @@ class BxBaseModProfilePageEntry extends BxBaseModGeneralPageEntry
     public function getCode ()
     {
         // check if profile is active
-        if (!$this->_oProfile || (!$this->_oProfile->isActive() && $this->_oModule->checkAllowedEditAnyEntry() !== CHECK_ACTION_RESULT_ALLOWED)) {
+        if (!$this->_oProfile || (!$this->_oProfile->isActive() && $this->_oProfile->id() != bx_get_logged_profile_id() && $this->_oModule->checkAllowedEditAnyEntry() !== CHECK_ACTION_RESULT_ALLOWED)) {
             $this->_oTemplate->displayPageNotFound();
             exit;
         }

+ 2 - 9
modules/boonex/accounts/classes/BxAccntGridAdministration.php

@@ -15,6 +15,8 @@ class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
     {
     	$this->MODULE = 'bx_accounts';
         parent::__construct ($aOptions, $oTemplate);
+
+        $this->_aQueryReset = array('order_field', 'order_dir', $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
     }
 
     public function getCode($isDisplayHeader = true)
@@ -157,15 +159,6 @@ class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
     	$this->_performActionChangeRole(1);
     }
 
-    public function resetQueryParams()
-    {
-        $aKeys = array('order_field', 'order_dir', $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
-        foreach ($aKeys as $sKey) {
-            unset($_GET[$sKey]);
-            unset($_POST[$sKey]);
-        }
-    }
-
 	protected function _performActionChangeRole($iRole)
     {
     	$CNF = &$this->_oModule->_oConfig->CNF;

+ 3 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -2251,6 +2251,9 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_profile_sample_single"><![CDATA[profile]]></string>
 	<string name="_sys_profile_friendship_added"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> is now friends with <a href="{entry_url}">{entry_caption}</a>]]></string>
 	<string name="_sys_profile_subscription_added"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> subscribed to <a href="{entry_url}">{entry_caption}</a> {entry_sample}]]></string>
+	<string name="_sys_profile_status_active"><![CDATA[Active]]></string>
+	<string name="_sys_profile_status_pending"><![CDATA[Pending]]></string>
+	<string name="_sys_profile_status_suspended"><![CDATA[Suspended]]></string>
 	<string name="_sys_private"><![CDATA[Private]]></string>
     <string name="_sys_pruning_db"><![CDATA[<h3>Database pruning:</h3>
         <ul>

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

@@ -142,6 +142,13 @@ class BxOrgsConfig extends BxBaseModProfileConfig
                         BX_PROFILE_STATUS_SUSPENDED => '_bx_orgs_txt_account_suspended',
                     ),
                 ),
+                'status_moderation' => array (
+                    'name' => 'bx-organizations-status-not-active-moderation',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_orgs_txt_account_pending_moderation',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_orgs_txt_account_suspended_moderation',
+                    ),
+                ),
             ),
 
             // some language keys

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

@@ -45,6 +45,10 @@
 	<string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[I am sure I want to delete this profile]]></string>
 	<string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
 	<string name="_bx_orgs_form_profile_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete your profile.]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_profile_status"><![CDATA[Status]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_status"><![CDATA[Status]]></string>
 
 	<string name="_bx_orgs_acl_action_create_profile"><![CDATA[Create Organization's Profile]]></string>
 	<string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Delete Organization's Profile]]></string>
@@ -240,7 +244,9 @@
     <string name="_bx_orgs_search_extended_cmts"><![CDATA[Organizations Comments Search]]></string>
 
     <string name="_bx_orgs_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
+    <string name="_bx_orgs_txt_account_pending_moderation"><![CDATA[This <a href="{0}">profile</a> is pending approval.]]></string>
     <string name="_bx_orgs_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
+    <string name="_bx_orgs_txt_account_suspended_moderation"><![CDATA[This <a href="{0}">profile</a> is suspended.]]></string>
 
     <string name="_bx_orgs_pre_lists_cats"><![CDATA[Organization categories]]></string>
     <string name="_bx_orgs_cat_Agriculture"><![CDATA[Agriculture]]></string>

+ 10 - 9
modules/boonex/organizations/install/sql/install.sql

@@ -176,7 +176,9 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_organization', 'bx_organizations', 'org_name', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_org_name', '_bx_orgs_form_profile_input_org_name', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_orgs_form_profile_input_org_name_err', 'Xss', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'cover', 'a:1:{i:0;s:27:"bx_organizations_cover_crop";}', 'a:1:{s:27:"bx_organizations_cover_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_cover', '_bx_orgs_form_profile_input_cover', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_organization', 'bx_organizations', 'picture', 'a:1:{i:0;s:29:"bx_organizations_picture_crop";}', 'a:1:{s:29:"bx_organizations_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_orgs_form_profile_input_sys_picture', '_bx_orgs_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_orgs_form_profile_input_picture_err', '', '', 1, 0),
-('bx_organization', 'bx_organizations', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+('bx_organization', 'bx_organizations', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_organization', 'bx_organizations', 'profile_email', '', '', 0, 'text', '_bx_orgs_form_profile_input_sys_profile_email', '_bx_orgs_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_organization', 'bx_organizations', 'profile_status', '', '', 0, 'custom', '_bx_orgs_form_profile_input_sys_profile_status', '_bx_orgs_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
 
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
@@ -210,17 +212,16 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_organization_edit_cover', 'cover', 2147483647, 1, 7),
 ('bx_organization_edit_cover', 'do_submit', 2147483647, 1, 8),
 
-('bx_organization_view', 'delete_confirm', 2147483647, 0, 3),
-('bx_organization_view', 'picture', 2147483647, 0, 4),
-('bx_organization_view', 'cover', 2147483647, 0, 5),
-('bx_organization_view', 'do_submit', 2147483647, 0, 6),
-('bx_organization_view', 'org_name', 2147483647, 1, 7),
-('bx_organization_view', 'org_cat', 2147483647, 1, 8),
-('bx_organization_view', 'org_desc', 2147483647, 0, 9),
+('bx_organization_view', 'org_name', 2147483647, 1, 1),
+('bx_organization_view', 'org_cat', 2147483647, 1, 2),
+('bx_organization_view', 'profile_email', 192, 1, 3),
+('bx_organization_view', 'profile_status', 192, 1, 4),
 
 ('bx_organization_view_full', 'org_name', 2147483647, 1, 1),
 ('bx_organization_view_full', 'org_cat', 2147483647, 1, 2),
-('bx_organization_view_full', 'org_desc', 2147483647, 1, 3);
+('bx_organization_view_full', 'org_desc', 2147483647, 1, 3),
+('bx_organization_view_full', 'profile_email', 192, 1, 4),
+('bx_organization_view_full', 'profile_status', 192, 1, 5);
 
 -- PRE-VALUES
 INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES

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

@@ -142,6 +142,13 @@ class BxPersonsConfig extends BxBaseModProfileConfig
                         BX_PROFILE_STATUS_SUSPENDED => '_bx_persons_txt_account_suspended',
                     ),
                 ),
+                'status_moderation' => array (
+                    'name' => 'bx-persons-status-not-active-moderation',
+                    'map' => array (
+                        BX_PROFILE_STATUS_PENDING => '_bx_persons_txt_account_pending_moderation',
+                        BX_PROFILE_STATUS_SUSPENDED => '_bx_persons_txt_account_suspended_moderation',
+                    ),
+                ),
             ),
 
             // some language keys

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

@@ -47,6 +47,10 @@
     <string name="_bx_persons_form_profile_input_birthday"><![CDATA[Birthday]]></string>
     <string name="_bx_persons_form_profile_input_sys_gender"><![CDATA[Gender]]></string>
     <string name="_bx_persons_form_profile_input_gender"><![CDATA[Gender]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_persons_form_profile_input_profile_email"><![CDATA[Email]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_status"><![CDATA[Status]]></string>
+    <string name="_bx_persons_form_profile_input_profile_status"><![CDATA[Status]]></string>
 
 	<string name="_bx_persons_acl_action_create_profile"><![CDATA[Create Person's Profile]]></string>
 	<string name="_bx_persons_acl_action_delete_profile"><![CDATA[Delete Person's Profile]]></string>
@@ -241,7 +245,9 @@
     <string name="_bx_persons_search_extended_cmts"><![CDATA[Persons Comments Search]]></string>
 
     <string name="_bx_persons_txt_account_pending"><![CDATA[This profile is pending approval, please wait until it is activated.]]></string>
+    <string name="_bx_persons_txt_account_pending_moderation"><![CDATA[This <a href="{0}">profile</a> is pending approval.]]></string>
     <string name="_bx_persons_txt_account_suspended"><![CDATA[This profile is suspended.]]></string>
+    <string name="_bx_persons_txt_account_suspended_moderation"><![CDATA[This <a href="{0}">profile</a> is suspended.]]></string>
     <string name="_bx_persons_txt_N_friends"><![CDATA[{0} friends]]></string>
     <string name="_bx_persons_txt_ntfs_timeline_post_common"><![CDATA[New post in <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> profile timeline from <a href="{subentry_url}">{subentry_sample}</a>]]></string>
     <string name="_bx_persons_txt_sample_single"><![CDATA[person]]></string>

+ 8 - 4
modules/boonex/persons/install/sql/install.sql

@@ -178,8 +178,9 @@ INSERT INTO `sys_form_inputs`(`object`, `module`, `name`, `value`, `values`, `ch
 ('bx_person', 'bx_persons', 'picture', 'a:1:{i:0;s:23:"bx_persons_picture_crop";}', 'a:1:{s:23:"bx_persons_picture_crop";s:24:"_sys_uploader_crop_title";}', 0, 'files', '_bx_persons_form_profile_input_sys_picture', '_bx_persons_form_profile_input_picture', '', 0, 0, 0, '', '', '', '', '', '_bx_persons_form_profile_input_picture_err', '', '', 1, 0),
 ('bx_person', 'bx_persons', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('bx_person', 'bx_persons', 'birthday', 0, '', 0, 'datepicker', '_bx_persons_form_profile_input_sys_birthday', '_bx_persons_form_profile_input_birthday', '', 0, 0, 0, '', '', '', '', '', '', 'Date', '', 1, 0),
-('bx_person', 'bx_persons', 'gender', '', '#!Sex', 0, 'select', '_bx_persons_form_profile_input_sys_gender', '_bx_persons_form_profile_input_gender', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
-
+('bx_person', 'bx_persons', 'gender', '', '#!Sex', 0, 'select', '_bx_persons_form_profile_input_sys_gender', '_bx_persons_form_profile_input_gender', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', 'profile_email', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_email', '_bx_persons_form_profile_input_profile_email', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_person', 'bx_persons', 'profile_status', '', '', 0, 'text', '_bx_persons_form_profile_input_sys_profile_status', '_bx_persons_form_profile_input_profile_status', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0);
 
 INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
 ('bx_person_add', 'picture', 2147483647, 1, 1),
@@ -215,12 +216,15 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_person_view', 'gender', 2147483647, 1, 1),
 ('bx_person_view', 'birthday', 2147483647, 1, 2),
 ('bx_person_view', 'fullname', 2147483647, 1, 3),
-('bx_person_view', 'description', 2147483647, 0, 4),
+('bx_person_view', 'profile_email', 192, 1, 4),
+('bx_person_view', 'profile_status', 192, 1, 5),
 
 ('bx_person_view_full', 'gender', 2147483647, 1, 1),
 ('bx_person_view_full', 'birthday', 2147483647, 1, 2),
 ('bx_person_view_full', 'fullname', 2147483647, 1, 3),
-('bx_person_view_full', 'description', 2147483647, 1, 4);
+('bx_person_view_full', 'description', 2147483647, 1, 4),
+('bx_person_view_full', 'profile_email', 192, 1, 5),
+('bx_person_view_full', 'profile_status', 192, 1, 6);
 
 -- CONTENT INFO
 INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES

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

@@ -45,6 +45,10 @@
 	<string name="_bx_orgs_form_profile_input_delete_confirm"><![CDATA[Я уверен, что хочу удалить этот профиль]]></string>
 	<string name="_bx_orgs_form_profile_input_delete_confirm_info"><![CDATA[Это действие не может быть отменено.]]></string>
 	<string name="_bx_orgs_form_profile_input_delete_confirm_error"><![CDATA[Пожалуйста, отметьте этот флажок, если действительно хотите удалить свой профиль.]]></string>
+	<string name="_bx_orgs_form_profile_input_sys_profile_email"><![CDATA[Имейл]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_email"><![CDATA[Имейл]]></string>
+    <string name="_bx_orgs_form_profile_input_sys_profile_status"><![CDATA[Статус]]></string>
+    <string name="_bx_orgs_form_profile_input_profile_status"><![CDATA[Статус]]></string>
 
 	<string name="_bx_orgs_acl_action_create_profile"><![CDATA[Создать профиль организации]]></string>
 	<string name="_bx_orgs_acl_action_delete_profile"><![CDATA[Удалить профиль организации]]></string>
@@ -240,7 +244,9 @@
     <string name="_bx_orgs_search_extended_cmts"><![CDATA[Поиск комментариев к организациям]]></string>
 
     <string name="_bx_orgs_txt_account_pending"><![CDATA[Этот профиль ожидает одобрения. Пожалуйста, дождитесь его активации.]]></string>
+    <string name="_bx_orgs_txt_account_pending_moderation"><![CDATA[Этот <a href="{0}">профиль</a> ожидает одобрения.]]></string>
     <string name="_bx_orgs_txt_account_suspended"><![CDATA[Этот профиль заблокирован.]]></string>
+    <string name="_bx_orgs_txt_account_suspended_moderation"><![CDATA[Этот <a href="{0}">профиль</a> заблокирован.]]></string>
 
     <string name="_bx_orgs_pre_lists_cats"><![CDATA[Категории организаций]]></string>
     <string name="_bx_orgs_cat_Agriculture"><![CDATA[Сельское хозяйство]]></string>

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

@@ -47,6 +47,10 @@
     <string name="_bx_persons_form_profile_input_birthday"><![CDATA[День рождения]]></string>
     <string name="_bx_persons_form_profile_input_sys_gender"><![CDATA[Пол]]></string>
     <string name="_bx_persons_form_profile_input_gender"><![CDATA[Пол]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_email"><![CDATA[Имейл]]></string>
+    <string name="_bx_persons_form_profile_input_profile_email"><![CDATA[Имейл]]></string>
+    <string name="_bx_persons_form_profile_input_sys_profile_status"><![CDATA[Статус]]></string>
+    <string name="_bx_persons_form_profile_input_profile_status"><![CDATA[Статус]]></string>
 
 	<string name="_bx_persons_acl_action_create_profile"><![CDATA[Создать персональный профиль]]></string>
 	<string name="_bx_persons_acl_action_delete_profile"><![CDATA[Удалить персональный профиль]]></string>
@@ -242,7 +246,9 @@
     <string name="_bx_persons_search_extended_cmts"><![CDATA[Поиск комментариев к персональным профилям]]></string>
 
     <string name="_bx_persons_txt_account_pending"><![CDATA[Этот профиль ожидает одобрения. Пожалуйста, дождитесь его активации.]]></string>
+    <string name="_bx_persons_txt_account_pending_moderation"><![CDATA[Этот <a href="{0}">профиль</a> ожидает одобрения.]]></string>
     <string name="_bx_persons_txt_account_suspended"><![CDATA[Этот профиль заблокирован.]]></string>
+    <string name="_bx_persons_txt_account_suspended_moderation"><![CDATA[Этот <a href="{0}">профиль</a> заблокирован.]]></string>
     <string name="_bx_persons_txt_N_friends"><![CDATA[Друзья: {0}]]></string>
     <string name="_bx_persons_txt_ntfs_timeline_post_common"><![CDATA[В профайле <a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> новая публикация от <a href="{subentry_url}">{subentry_sample}</a>]]></string>
     <string name="_bx_persons_txt_sample_single"><![CDATA[Персона]]></string>

+ 3 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -2249,6 +2249,9 @@
 	<string name="_sys_profile_sample_single"><![CDATA[профиль]]></string>
 	<string name="_sys_profile_friendship_added"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> и <a href="{entry_url}">{entry_caption}</a>]]> стали друзьями</string>
 	<string name="_sys_profile_subscription_added"><![CDATA[<a class="bx-ntfs-content-profile" href="{owner_link}">{owner_name}</a> подписался на <a href="{entry_url}">{entry_caption}</a> {entry_sample}]]></string>
+	<string name="_sys_profile_status_active"><![CDATA[Активный]]></string>
+    <string name="_sys_profile_status_pending"><![CDATA[В ожидании]]></string>
+    <string name="_sys_profile_status_suspended"><![CDATA[Заблокированный]]></string>
 	<string name="_sys_private"><![CDATA[Приватные]]></string>
     <string name="_sys_pruning_db"><![CDATA[<h3>Очистка базы данных:</h3>
         <ul>

+ 4 - 2
template/scripts/BxBaseGrid.php

@@ -16,6 +16,7 @@ class BxBaseGrid extends BxDolGrid
     protected $_oTemplate;
     protected $_aPopupOptions = false;
     protected $_aQueryAppend = false;
+    protected $_aQueryReset = false;
     protected $_aConfirmMessages = false;
     protected $_bSelectAll = false;
     protected $_isDisplayPopupOnTextOverflow = true;
@@ -28,6 +29,8 @@ class BxBaseGrid extends BxDolGrid
             $this->_oTemplate = $oTemplate;
         else
             $this->_oTemplate = BxDolTemplate::getInstance();
+
+        $this->_aQueryReset = array('filter', 'order_field', 'order_dir', $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
     }
 
     public function performActionDisplay()
@@ -248,8 +251,7 @@ class BxBaseGrid extends BxDolGrid
      */
     public function resetQueryParams()
     {
-        $aKeys = array('filter', 'order_field', 'order_dir', $this->_aOptions['paginate_get_start'], $this->_aOptions['paginate_get_per_page']);
-        foreach ($aKeys as $sKey) {
+        foreach ($this->_aQueryReset as $sKey) {
             unset($_GET[$sKey]);
             unset($_POST[$sKey]);
         }