I was curious about this module, so to learn about it I did a little code cleanup, adding missing @file declarations and also changed the .info file, I think it's roughly correct. Patch coming here...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HongPong’s picture

Status: Active » Needs review
FileSize
15.16 KB

Patch attached. Neat module! Not sure if I have the patch formatted right, it's been a little while.

scor’s picture

Status: Needs review » Needs work

Great! thanks @HongPong and welcome to the WebId project! The coding standards fixes in the your patch look good for the most part.

+++ b/webidauth.info
@@ -4,3 +4,11 @@ package = Authentication
+files[] = webidauth.module
+files[] = webidauth.parser.inc
+files[] = webidauth.pages.inc
+scripts[] = webidauth.js
+scripts[] = tls_logout.js
+stylesheets[all][] = webidauth.css
+stylesheets[all][] = webidauth-rtl.css

the file directive in the .info file is only for files which include classes, like typically .test files. I'm not sure all these files actually contain classes.
the script and stylesheet directives will force the .js and .css files to be included in all pages when the module is enabled, I'm not sure we want that. I believe right now they are only included when need. Needs more investogation on whether it's best to include them systematically or not.

+++ b/webidauth.module
@@ -333,7 +332,8 @@ function webidauth_admin_user_register_validate(&$form, &$form_state) {
-        } else {
+        } ¶
+        else {

make sure there are no white spaces. http://drupal.org/project/dreditor can help you to find these very quickly.

HongPong’s picture

Ah thanks for the feedback. i will try to roll another this weekend. I am wondering if you have heard about the OStatus & Federated General Assembly project (projects.occupy.net) which is looking to implement WebID and OStatus - figured this might be good place to start looking into it!

scor’s picture

@HongPong yeah, actually I joined the FGA group a few weeks ago. Keep up the great work! By the way, have you tried any of the WebID modules?

HongPong’s picture

Status: Needs work » Needs review
FileSize
51.79 KB

I haven't tried any of the modules yet. I think after getting a little more handle on what's out there I will start trying to build it.

I took out the .info changes except for referencing the .module file. I also cleaned up the indents and adjusted the comments around the function declarations a tiny bit.

scor’s picture

Thanks @HongPong for providing this patch, and sorry for the delay in committing it. Some hunks didn't work but I've committed what worked.

patching file rsapublickey/rsapublickey.module
patching file rsapublickey/rsapublickey.test
patching file webidauth.info
patching file webidauth.install
patching file webidauth.module
Hunk #1 FAILED at 38.
Hunk #2 succeeded at 315 (offset 45 lines).
Hunk #3 FAILED at 384.
Hunk #4 succeeded at 449 (offset 44 lines).
Hunk #5 succeeded at 524 (offset 44 lines).
2 out of 5 hunks FAILED -- saving rejects to file webidauth.module.rej
patching file webidauth.pages.inc
Hunk #2 FAILED at 54.
Hunk #3 FAILED at 66.
Hunk #4 FAILED at 107.
Hunk #5 FAILED at 136.
Hunk #6 succeeded at 162 (offset -4 lines).
Hunk #7 succeeded at 188 (offset -4 lines).
Hunk #8 succeeded at 198 (offset -4 lines).
Hunk #9 succeeded at 209 (offset -4 lines).
Hunk #10 succeeded at 233 (offset -4 lines).
4 out of 10 hunks FAILED -- saving rejects to file webidauth.pages.inc.rej
patching file webidauth.parser.inc
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file webidauth.parser.inc.rej