From 5ce46cc9603ccc153bf26168b18afee0f3b645af Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sat, 31 Mar 2012 00:16:28 +0530 Subject: [PATCH 01/14] [feature/delete-auto-logins] User can view/delete auto logins. User has an extra option in UCP->Profile to view the auto logins and clear them. PHPBB3-9647 --- phpBB/includes/ucp/info/ucp_profile.php | 1 + phpBB/includes/ucp/ucp_profile.php | 40 +++++++++++++++++ phpBB/language/en/ucp.php | 4 ++ .../template/ucp_profile_autologin_keys.html | 45 +++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html diff --git a/phpBB/includes/ucp/info/ucp_profile.php b/phpBB/includes/ucp/info/ucp_profile.php index 09c0318de9..968538a178 100644 --- a/phpBB/includes/ucp/info/ucp_profile.php +++ b/phpBB/includes/ucp/info/ucp_profile.php @@ -23,6 +23,7 @@ class ucp_profile_info 'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => '', 'cat' => array('UCP_PROFILE')), 'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => 'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)', 'cat' => array('UCP_PROFILE')), 'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')), + 'autologin_keys'=> array('title' => 'UCP_PROFILE_AUTOLOGIN_KEYS', 'auth' => '', 'cat' => array('UCP_PROFILE')), ), ); } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 9d81503f0a..f3e0984685 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -618,6 +618,46 @@ class ucp_profile } break; + + case 'autologin_keys': + + add_form_key('ucp_autologin_keys'); + + if ($submit) + { + $keys = request_var('keys', array('')); + + if (!empty($keys)) + { + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id'] . ' + AND ' . $db->sql_in_set('key_id', $keys) ; + + $db->sql_query($sql); + + $message = $user->lang['AUTOLOGIN_SESSIONS_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + trigger_error($message); + } + } + + $sql = 'SELECT key_id, last_ip, last_login + FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id']; + + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $template->assign_block_vars('sessions', array( + 'KEY' => $row['key_id'], + 'IP' => $row['last_ip'], + 'LOGIN_TIME' => $row['last_login'], + )); + } + + $db->sql_freeresult($result); + + break; } $template->assign_vars(array( diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 2212e44628..1e36b4e9f7 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -87,6 +87,7 @@ $lang = array_merge($lang, array( 'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.', 'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.', 'ATTACHMENT_DELETED' => 'Attachment successfully deleted.', + 'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected auto-login session keys were successfully deleted.', 'AVATAR_CATEGORY' => 'Category', 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.', 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', @@ -376,6 +377,8 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The auto-login session keys can be selected and deleted.', + 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved auto-login session keys.', 'RECIPIENT' => 'Recipient', 'RECIPIENTS' => 'Recipients', @@ -465,6 +468,7 @@ $lang = array_merge($lang, array( 'UCP_PROFILE_PROFILE_INFO' => 'Edit profile', 'UCP_PROFILE_REG_DETAILS' => 'Edit account settings', 'UCP_PROFILE_SIGNATURE' => 'Edit signature', + 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Edit auto-login session keys', 'UCP_USERGROUPS' => 'Usergroups', 'UCP_USERGROUPS_MEMBER' => 'Edit memberships', diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html new file mode 100644 index 0000000000..ad7b7a920d --- /dev/null +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -0,0 +1,45 @@ + + +
+ +

{L_TITLE}

+
+
+ +
+

{ERROR}

+ +

{L_PROFILE_AUTOLOGIN_KEYS}

+ + + + + + + + + + + + + + + +
KeyIPLogin-Time
{sessions.KEY}{sessions.IP}{sessions.LOGIN_TIME}
+ +

{L_PROFILE_NO_AUTOLOGIN_KEYS}

+ +
+
+
+ + +
+ {S_HIDDEN_FIELDS}  + + {S_FORM_TOKEN} +
+ +
+ + From 79ef96043546074e19bf849e7a58279b3b463c1a Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sat, 31 Mar 2012 18:27:34 +0530 Subject: [PATCH 02/14] [feature/delete-auto-logins] Fixes language entries and redirection. The user is redirected after deleting auto login session keys. PHPBB3-9647 --- phpBB/includes/ucp/ucp_profile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index f3e0984685..2595e48fb5 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -635,7 +635,8 @@ class ucp_profile $db->sql_query($sql); - $message = $user->lang['AUTOLOGIN_SESSIONS_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + meta_refresh(3, $this->u_action); + $message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); trigger_error($message); } } From 4129711e9f9b67ea102594254434f6210cd03e81 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sun, 1 Apr 2012 16:57:46 +0530 Subject: [PATCH 03/14] [feature/delete-auto-logins] checks form key The form key is checked after submission if not correct error is returned. PHPBB3-9647 --- phpBB/includes/ucp/ucp_profile.php | 33 +++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 2595e48fb5..d4e5d75c10 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -627,18 +627,29 @@ class ucp_profile { $keys = request_var('keys', array('')); - if (!empty($keys)) + if (!check_form_key('ucp_autologin_keys')) { - $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' - WHERE user_id = ' . (int) $user->data['user_id'] . ' - AND ' . $db->sql_in_set('key_id', $keys) ; - - $db->sql_query($sql); - - meta_refresh(3, $this->u_action); - $message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); - trigger_error($message); + $error[] = 'FORM_INVALID'; } + + if (!sizeof($error)) + { + if (!empty($keys)) + { + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user->data['user_id'] . ' + AND ' . $db->sql_in_set('key_id', $keys) ; + + $db->sql_query($sql); + + meta_refresh(3, $this->u_action); + $message = $user->lang['AUTOLOGIN_SESSION_KEYS_DELETED'] . '

' . sprintf($user->lang['RETURN_UCP'], '', ''); + trigger_error($message); + } + } + + // Replace "error" strings with their real, localised form + $error = array_map(array($user, 'lang'), $error); } $sql = 'SELECT key_id, last_ip, last_login @@ -650,6 +661,8 @@ class ucp_profile while ($row = $db->sql_fetchrow($result)) { $template->assign_block_vars('sessions', array( + 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', + 'KEY' => $row['key_id'], 'IP' => $row['last_ip'], 'LOGIN_TIME' => $row['last_login'], From dfedc995ed04c777c933dc68d0da388d8214cb1b Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Tue, 10 Apr 2012 18:33:55 +0530 Subject: [PATCH 04/14] [feature/delete-auto-logins] Fixes language entries Fixed language entries so that UI shows persistent login keys instead of autologin keys. PHPBB3-9647 --- phpBB/language/en/ucp.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 1e36b4e9f7..926af99a12 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -87,7 +87,7 @@ $lang = array_merge($lang, array( 'ATTACHMENTS_EXPLAIN' => 'This is a list of attachments you have made in posts to this board.', 'ATTACHMENTS_DELETED' => 'Attachments successfully deleted.', 'ATTACHMENT_DELETED' => 'Attachment successfully deleted.', - 'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected auto-login session keys were successfully deleted.', + 'AUTOLOGIN_SESSION_KEYS_DELETED'=> 'The selected persistent login keys were successfully deleted.', 'AVATAR_CATEGORY' => 'Category', 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.', 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', @@ -377,8 +377,8 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', - 'PROFILE_AUTOLOGIN_KEYS' => 'The auto-login session keys can be selected and deleted.', - 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved auto-login session keys.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persisten login keys can be selected and deleted.', + 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', 'RECIPIENTS' => 'Recipients', @@ -468,7 +468,7 @@ $lang = array_merge($lang, array( 'UCP_PROFILE_PROFILE_INFO' => 'Edit profile', 'UCP_PROFILE_REG_DETAILS' => 'Edit account settings', 'UCP_PROFILE_SIGNATURE' => 'Edit signature', - 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Edit auto-login session keys', + 'UCP_PROFILE_AUTOLOGIN_KEYS'=> 'Edit persistent login keys', 'UCP_USERGROUPS' => 'Usergroups', 'UCP_USERGROUPS_MEMBER' => 'Edit memberships', From d5b1e108f92e7bae9a0c4afa972f85276e84df2a Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Wed, 11 Apr 2012 03:13:19 +0530 Subject: [PATCH 05/14] [feature/delete-auto-logins] fixes css corners PHPBB3-9647 --- .../styles/prosilver/template/ucp_profile_autologin_keys.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index ad7b7a920d..7767943d5c 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -4,7 +4,7 @@

{L_TITLE}

-
+

{ERROR}

@@ -30,7 +30,7 @@

{L_PROFILE_NO_AUTOLOGIN_KEYS}

-
+
From bdf66b27ab6e46cfb1978feb05b13c83c9bd9597 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Wed, 11 Apr 2012 03:34:29 +0530 Subject: [PATCH 06/14] [feature/delete-auto-logins] using loop for errors instead of hardcoding html code into ERROR variable, we use errors array and use loop in template file. PHPBB3-9647 --- phpBB/includes/ucp/ucp_profile.php | 2 +- .../prosilver/template/ucp_profile_autologin_keys.html | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index d4e5d75c10..a7b6eb29a1 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -661,7 +661,7 @@ class ucp_profile while ($row = $db->sql_fetchrow($result)) { $template->assign_block_vars('sessions', array( - 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', + 'errors' => $error, 'KEY' => $row['key_id'], 'IP' => $row['last_ip'], diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index 7767943d5c..89913d21bf 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -7,7 +7,13 @@
-

{ERROR}

+ +

+ + {errors}
+ +

+

{L_PROFILE_AUTOLOGIN_KEYS}

From 71f84164805293a2ab5c70ec49799ee8bfa5eac3 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Fri, 13 Apr 2012 21:29:31 +0530 Subject: [PATCH 07/14] [feature/delete-auto-logins] improved styling and fixes language Table ahs been styled. Date is now formatted properly instead of the unix timestamp being displayed earlier. fixes small mistake in language entry PHPBB3-9647 --- phpBB/includes/ucp/ucp_profile.php | 2 +- phpBB/language/en/ucp.php | 2 +- .../template/ucp_profile_autologin_keys.html | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a7b6eb29a1..2ac82fb52f 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -665,7 +665,7 @@ class ucp_profile 'KEY' => $row['key_id'], 'IP' => $row['last_ip'], - 'LOGIN_TIME' => $row['last_login'], + 'LOGIN_TIME' => $user->format_date($row['last_login']), )); } diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 926af99a12..44d14b2349 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -377,7 +377,7 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', - 'PROFILE_AUTOLOGIN_KEYS' => 'The persisten login keys can be selected and deleted.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys can be selected and deleted.', 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index 89913d21bf..e4dd954d39 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -16,21 +16,25 @@

{L_PROFILE_AUTOLOGIN_KEYS}

-
+
+ - + + + - - - - - + + + + + +
Mark Key IP Login-Time
{sessions.KEY}{sessions.IP}{sessions.LOGIN_TIME}
{sessions.IP}{sessions.LOGIN_TIME}

{L_PROFILE_NO_AUTOLOGIN_KEYS}

From ca0d5ebf7a289e7ba759023e6322820450e79ec7 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Fri, 13 Apr 2012 21:38:22 +0530 Subject: [PATCH 08/14] [feature/delete-auto-logins] template added for subsilver2 PHPBB3-9647 --- .../template/ucp_profile_autologin_keys.html | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html new file mode 100644 index 0000000000..cb6aac7674 --- /dev/null +++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_TITLE}
+ + {errors}
+ +
{L_PROFILE_AUTOLOGIN_KEYS}
MarkKeyIPLogin-Time
{sessions.IP}{sessions.LOGIN_TIME}
{L_PROFILE_NO_AUTOLOGIN_KEYS}
+ {S_HIDDEN_FIELDS}  + + {S_FORM_TOKEN} +
+ + From 124068b0b1c05df692a81b529e03f9a22702d270 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Fri, 20 Apr 2012 04:13:20 +0530 Subject: [PATCH 09/14] [feature/delete-auto-logins] explain persistent keys in the ucp. a short explaination of persistent keys in edit persistent keys section PHPBB3-9647 --- phpBB/language/en/ucp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 44d14b2349..398163f38a 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -377,7 +377,7 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', - 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys can be selected and deleted.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys keeps the user logged in till the user signs out. Logout does only delete the persistent key on the current machine. The persistent login keys for all machines can be viewed/deleted by the user.', 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', From 9db1ed6e804e1ebf536b81d1d68daf44d558c2e1 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sat, 21 Apr 2012 13:28:01 +0530 Subject: [PATCH 10/14] [feature/delete-auto-logins] fix language keys and styling introduction of language variables instead of hardcoded language. PHPBB3-9647 --- phpBB/language/en/ucp.php | 4 +++- .../prosilver/template/ucp_profile_autologin_keys.html | 10 +++++----- .../template/ucp_profile_autologin_keys.html | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 398163f38a..1ed978f788 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -256,6 +256,8 @@ $lang = array_merge($lang, array( 'LINK_REMOTE_SIZE' => 'Avatar dimensions', 'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.', 'LOGIN_EXPLAIN_UCP' => 'Please login in order to access the User Control Panel.', + 'LOGIN_KEY' => 'Login Key', + 'LOGIN_TIME' => 'Login Time', 'LOGIN_REDIRECT' => 'You have been successfully logged in.', 'LOGOUT_FAILED' => 'You were not logged out, as the request did not match your session. Please contact the board administrator if you continue to experience problems.', 'LOGOUT_REDIRECT' => 'You have been successfully logged out.', @@ -377,7 +379,7 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', - 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys keeps the user logged in till the user signs out. Logout does only delete the persistent key on the current machine. The persistent login keys for all machines can be viewed/deleted by the user.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys logins the user automatically on each visit until logout. Logout does only delete the persistent key on the current machine. The persistent login keys for all machines can be viewed/deleted by the user here.', 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index e4dd954d39..143cb925ec 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -15,14 +15,14 @@

-

{L_PROFILE_AUTOLOGIN_KEYS}

+

{L_PROFILE_AUTOLOGIN_KEYS}


- - - - + + + + diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html index cb6aac7674..365b6f4a52 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html @@ -18,10 +18,10 @@ - - - - + + + + From 1cfb84e61e808a50b12e4686781eb85202b4e87b Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sat, 21 Apr 2012 15:29:44 +0530 Subject: [PATCH 11/14] [feature/delete-auto-logins] fixes language entry PHPBB3-9647 --- phpBB/language/en/ucp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 1ed978f788..4c945140bb 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -379,7 +379,7 @@ $lang = array_merge($lang, array( 'PREFERENCES_UPDATED' => 'Your preferences have been updated.', 'PROFILE_INFO_NOTICE' => 'Please note that this information may be viewable to other members. Be careful when including any personal details. Any fields marked with a * must be completed.', 'PROFILE_UPDATED' => 'Your profile has been updated.', - 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys logins the user automatically on each visit until logout. Logout does only delete the persistent key on the current machine. The persistent login keys for all machines can be viewed/deleted by the user here.', + 'PROFILE_AUTOLOGIN_KEYS' => 'The persistent login keys automatically log you in when you visit the board. If you logout, the persistent login key is deleted only on the computer you are using to logout. Here you can see persistent login keys created on other computers you used to access this site.', 'PROFILE_NO_AUTOLOGIN_KEYS' => 'There are no saved persistent login keys.', 'RECIPIENT' => 'Recipient', From d612a7e647b276c33c320d75108405847df7ac1d Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sat, 21 Apr 2012 16:21:37 +0530 Subject: [PATCH 12/14] [feature/delete-auto-logins] improves styling PHPBB3-9647 --- .../template/ucp_profile_autologin_keys.html | 47 +++++++++---------- .../template/ucp_profile_autologin_keys.html | 37 +++++++-------- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index 143cb925ec..a8af932cb6 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -14,31 +14,30 @@

- -

{L_PROFILE_AUTOLOGIN_KEYS}


-
MarkKeyIPLogin-Time{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
{L_PROFILE_AUTOLOGIN_KEYS}
MarkKeyIPLogin-Time{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
- - - - - - + +

{L_PROFILE_AUTOLOGIN_KEYS}


+
{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
+ + + + + + + + + + + + + + + - - - - - - - - - - - -
{L_MARK}{L_LOGIN_KEY}{L_IP}{L_LOGIN_TIME}
{sessions.IP}{sessions.LOGIN_TIME}
{sessions.IP}{sessions.LOGIN_TIME}
- -

{L_PROFILE_NO_AUTOLOGIN_KEYS}

- + + {L_PROFILE_NO_AUTOLOGIN_KEYS} + + +
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html index 365b6f4a52..2d3b9f98f8 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html @@ -13,29 +13,28 @@ - - - {L_PROFILE_AUTOLOGIN_KEYS} + + + {L_PROFILE_AUTOLOGIN_KEYS} + + + {L_MARK} + {L_LOGIN_KEY} + {L_IP} + {L_LOGIN_TIME} + + + + + + {sessions.IP} + {sessions.LOGIN_TIME} - - {L_MARK} - {L_LOGIN_KEY} - {L_IP} - {L_LOGIN_TIME} - - - - - - {sessions.IP} - {sessions.LOGIN_TIME} - - - + {L_PROFILE_NO_AUTOLOGIN_KEYS} - + From 73ca5edb296bfe2d599e001d593cc2d952be3941 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Thu, 17 May 2012 14:08:50 +0530 Subject: [PATCH 13/14] [feature/delete-auto-logins] fixes style removes reset button and some minor style fixes in subsilver2 and prosilver. PHPBB3-9647 --- .../prosilver/template/ucp_profile_autologin_keys.html | 5 ++--- .../subsilver2/template/ucp_profile_autologin_keys.html | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html index a8af932cb6..a6c19508e2 100644 --- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html @@ -34,7 +34,7 @@ {sessions.LOGIN_TIME} - {L_PROFILE_NO_AUTOLOGIN_KEYS} + {L_PROFILE_NO_AUTOLOGIN_KEYS} @@ -44,8 +44,7 @@
- {S_HIDDEN_FIELDS}  - + {S_HIDDEN_FIELDS} {S_FORM_TOKEN}
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html index 2d3b9f98f8..1dab9acb9c 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_autologin_keys.html @@ -32,15 +32,14 @@ - {L_PROFILE_NO_AUTOLOGIN_KEYS} + {L_PROFILE_NO_AUTOLOGIN_KEYS} - {S_HIDDEN_FIELDS}  - + {S_HIDDEN_FIELDS} {S_FORM_TOKEN} From a9549cbe6ab66732fcf9c321496b74943e2972e7 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Sun, 3 Jun 2012 15:56:55 +0530 Subject: [PATCH 14/14] [feature-delete-auto-logins] adds module to database update ucp delete auto-login keys module is added to database_update.php under 3.1-dev --- phpBB/install/database_update.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 665db1f2f0..a5bd5e7bfe 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -2305,6 +2305,13 @@ function change_database_data(&$no_updates, $version) 'auth' => 'acl_a_styles', 'cat' => 'ACP_STYLE_MANAGEMENT', ), + 'autologin_keys' => array( + 'base' => 'ucp_profile', + 'class' => 'ucp', + 'title' => 'UCP_PROFILE_AUTOLOGIN_KEYS', + 'auth' => '', + 'cat' => 'UCP_PROFILE', + ), ); _add_modules($modules_to_install);