فهرست منبع

Merge branch 'master' of github.com:boonex/dolphin

Alex Trofimov 11 سال پیش
والد
کامیت
e79d261899

+ 1 - 1
modules/boonex/english/data/langs/system.xml

@@ -1557,7 +1557,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_account"><![CDATA[Account]]></string>
 	<string name="_sys_form_account_input_captcha"><![CDATA[Security Image]]></string>
 	<string name="_sys_form_account_input_captcha_error"><![CDATA[Security image input failed. Please, try again.]]></string>
-	<string name="_sys_form_account_input_delete_confirm"><![CDATA[I'm sure that I want to delete my account and my content.]]></string>
+	<string name="_sys_form_account_input_delete_confirm"><![CDATA[I'm sure that I want to delete the account with content.]]></string>
 	<string name="_sys_form_account_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete your account and your content.]]></string>
 	<string name="_sys_form_account_input_delete_confirm_info"><![CDATA[This action can not be undone.]]></string>
 	<string name="_sys_form_account_input_email"><![CDATA[Email]]></string>

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

@@ -90,6 +90,8 @@
     <string name="_bx_orgs_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
     <string name="_bx_orgs_menu_item_title_system_delete_profile"><![CDATA[Delete Organization]]></string>
     <string name="_bx_orgs_menu_item_title_delete_profile"><![CDATA[Delete Profile]]></string>
+    <string name="_bx_orgs_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_orgs_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
     <string name="_bx_orgs_menu_item_title_system_profile_type"><![CDATA[Organization]]></string>
     <string name="_bx_orgs_menu_item_title_profile_type"><![CDATA[Organization]]></string>
     <string name="_bx_orgs_menu_item_title_system_create_profile"><![CDATA[Create Organization]]></string>

+ 2 - 1
modules/boonex/organizations/install/sql/enable.sql

@@ -155,7 +155,8 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_organizations_view_actions_more', 'bx_organizations', 'profile-friend-remove', '_bx_orgs_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'minus', '', 2147483647, 1, 0, 10),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'profile-subscribe-remove', '_bx_orgs_menu_item_title_system_unsubscribe', '_bx_orgs_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
 ('bx_organizations_view_actions_more', 'bx_organizations', 'edit-organization-profile', '_bx_orgs_menu_item_title_system_edit_profile', '_bx_orgs_menu_item_title_edit_profile', 'page.php?i=edit-organization-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
-('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-profile', '_bx_orgs_menu_item_title_system_delete_profile', '_bx_orgs_menu_item_title_delete_profile', 'page.php?i=delete-organization-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40);
+('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-profile', '_bx_orgs_menu_item_title_system_delete_profile', '_bx_orgs_menu_item_title_delete_profile', 'page.php?i=delete-organization-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
+('bx_organizations_view_actions_more', 'bx_organizations', 'delete-organization-account', '_bx_orgs_menu_item_title_system_delete_account', '_bx_orgs_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'remove', '', 128, 1, 0, 50);
 
 -- MENU: module sub-menu
 

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

@@ -90,6 +90,8 @@
     <string name="_bx_persons_menu_item_title_edit_profile"><![CDATA[Edit Profile]]></string>
     <string name="_bx_persons_menu_item_title_system_delete_profile"><![CDATA[Delete Person]]></string>
     <string name="_bx_persons_menu_item_title_delete_profile"><![CDATA[Delete Profile]]></string>
+    <string name="_bx_persons_menu_item_title_system_delete_account"><![CDATA[Delete Account]]></string>
+    <string name="_bx_persons_menu_item_title_delete_account"><![CDATA[Delete Account]]></string>
     <string name="_bx_persons_menu_item_title_system_profile_type"><![CDATA[Person]]></string>
     <string name="_bx_persons_menu_item_title_profile_type"><![CDATA[Person]]></string>
     <string name="_bx_persons_menu_item_title_system_create_profile"><![CDATA[Create Person]]></string>

+ 2 - 1
modules/boonex/persons/install/sql/enable.sql

@@ -155,7 +155,8 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_persons_view_actions_more', 'bx_persons', 'profile-friend-remove', '_bx_persons_menu_item_title_system_unfriend', '{title_remove_friend}', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_friends\', \'remove\', \'{profile_id}\')', '', 'minus', '', 2147483647, 1, 0, 10),
 ('bx_persons_view_actions_more', 'bx_persons', 'profile-subscribe-remove', '_bx_persons_menu_item_title_system_unsubscribe', '_bx_persons_menu_item_title_unsubscribe', 'javascript:void(0)', 'bx_conn_action(this, \'sys_profiles_subscriptions\', \'remove\', \'{profile_id}\')', '', 'check', '', 2147483647, 1, 0, 20),
 ('bx_persons_view_actions_more', 'bx_persons', 'edit-persons-profile', '_bx_persons_menu_item_title_system_edit_profile', '_bx_persons_menu_item_title_edit_profile', 'page.php?i=edit-persons-profile&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 30),
-('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-profile', '_bx_persons_menu_item_title_system_delete_profile', '_bx_persons_menu_item_title_delete_profile', 'page.php?i=delete-persons-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40);
+('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-profile', '_bx_persons_menu_item_title_system_delete_profile', '_bx_persons_menu_item_title_delete_profile', 'page.php?i=delete-persons-profile&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 40),
+('bx_persons_view_actions_more', 'bx_persons', 'delete-persons-account', '_bx_persons_menu_item_title_system_delete_account', '_bx_persons_menu_item_title_delete_account', 'page.php?i=account-settings-delete&id={account_id}', '', '', 'remove', '', 128, 1, 0, 50);
 
 -- MENU: module sub-menu
 

+ 2 - 1
template/scripts/BxBaseAccountForms.php

@@ -141,7 +141,8 @@ class BxBaseAccountForms extends BxDolProfileForms
             return MsgBox(_t('_sys_txt_error_account_delete'));
 
         // logout from deleted account
-        bx_logout();
+        if($iAccountId == getLoggedId())
+        	bx_logout();
 
         // redirect to homepage
         $this->_redirectAndExit('', false);

+ 4 - 1
template/scripts/BxBaseServiceAccount.php

@@ -54,8 +54,11 @@ class BxBaseServiceAccount extends BxDol
 
     public function serviceAccountSettingsDelAccount ($iAccountId = false)
     {
-        if (false === $iAccountId)
+        if (!$iAccountId)
+        	$iAccountId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if (!$iAccountId)
             $iAccountId = getLoggedId();
+
         return $this->_oAccountForms->deleteAccountForm($iAccountId);
     }