Some minor code cleanup needed to pass coder

Also fixed tests to use token, we needs extended coverage:
1) block
2) API functions
3) admin UI

Files: 
CommentFileSizeAuthor
#6 1835954-masquerade-6.patch15.7 KBandypost
FAILED: [[SimpleTest]]: [MySQL] 21 pass(es), 2 fail(s), and 0 exception(s).
[ View ]
#5 1835954-masquerade-5.patch16.19 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#5 1835954-interdiff-5.txt9.49 KBandypost
#4 1835954-masquerade-4.patch13.69 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 1835954-masquerade-4-1.patch13.53 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#4 1835954-interdiff-4.txt4.57 KBandypost
#2 1835954-masquerade-2.patch10.55 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#1 1835954-masquerade-1.patch9.32 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

StatusFileSize
new9.32 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Initial patch, fixed code-style and started tests (still not passes switch 404)

StatusFileSize
new10.55 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

A bit extended test. I can't find a proper way to build a token

Some good clean-ups here. Though do you think we could move forward with #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series first?

+++ b/masquerade.module
@@ -252,6 +252,7 @@ function masquerade_menu_access($type, $uid = NULL) {
function masquerade_admin_settings() {
+  drupal_set_message(user_access('masquerade as user') ? 'Allowed' : 'Disallowed');

?

+++ b/masquerade.module
@@ -359,14 +360,15 @@ function _masquerade_user_load($username) {
+    // @TODO Seems this useless.
     cache_clear_all($user->uid, 'cache_menu', TRUE);

Yep, also noticed those. Seem to date back to D5.

StatusFileSize
new4.57 KB
new13.53 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4-1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
new13.69 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

@sun thanx for review, this is a dubuggin staff - I'm trying to debug the session that should be fixed in #1555862: DrupalWebTestCase::drupalGetToken() does not add hash salt

patch includes additional cleanups from #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series

StatusFileSize
new9.49 KB
new16.19 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

The final patch I'm going to commit to D7

StatusFileSize
new15.7 KB
FAILED: [[SimpleTest]]: [MySQL] 21 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

Another rount to pass tests

Status:Needs review» Needs work

The last submitted patch, 1835954-masquerade-6.patch, failed testing.