Closed (fixed)
Project:
Mollom
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2015 at 10:57 UTC
Updated:
25 Jun 2015 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eshta commentedComment #2
eshta commentedComment #3
eshta commentedThis still needs tests adjusted and a test added to ensure that access is not available for new users.
Comment #5
eshta commentedFixed failing tests and centralized logic to determine if CMP is enabled into a helper function.
Comment #6
eshta commentedGo bots go!
Comment #7
eshta commentedTrying out a test update for the disabled state - go testbots!
Comment #9
eshta commentedThanks bots - that's what I needed to know.
Comment #10
eshta commentedChanges from manually testing and an updated automated test for form configuration option.
Comment #11
nick_vhPlease refer to www.mollom.com instead of the non www version
Really? Is Dries still maintaining it? :) If you are making changes, perhaps add me (if you let me?) and remove Dries.
a function in an if clause might not work in php versions < 5.4 (eg 5.3). Safer to set it to a variable and then do an if on that variable.
set www.mollom.com
Here you use the @ sign, and a bit further you use the % sign. Please be consistent when replacing variables in text.
two times type casting? How does this make sense? What is this doing even? I like shorthand functions but this might need some explanation
You can CAPSLOCK this thing. It will only be visible in the mysql schema anyway, but having DEPRECATED doesn't leave much to the imagination heh.
same thing as above, check if all php versions understand this syntax. When backporting to D6 you might end up with problems
Right, I can see us browsing this code somewhere end of 2016 and reading this. Should we already reference some issue queue # here to make sure it is actionable?
Comment #12
eshta commentedHeh - you have some valid points - especially for #3 and #8. #6 is actually the pre-existing code prior to this change (and pre-dates me). I'd be happy to leave it as is (not broke approach) especially given that it will be removed in a few months time anyway. #5 had to do with how much emphasis should be used... although you could argue that the date is what really deserves the emphasis over the feature name - but it makes it stand out nicely when you are listed a specific feature that is to be deprecated. Thanks for the review - changes coming up shortly.
Comment #13
eshta commentedHere are some changes in response to the review.
Comment #14
nick_vhone thing here is that you need to check if the result is an array and not empty. You will end up with errors otherwise.I don't think the db_query always gives you an array back? Might need to be checked
Aside of that it looks very good!
Comment #15
nick_vhComment #16
eshta commenteddb_query should return a DatabaseStatementInterface and fetchCol specifically says it returns an indexed array or an empty array.
https://api.drupal.org/api/drupal/includes%21database%21database.inc/fun...
In D6 it appears that db_query can return FALSE if there is a problem executing the query - so that will be something to keep in mind for the back-port.
Comment #18
eshta commentedWorking on the D6 port now.
Comment #19
eshta commentedHere's the first stab at the d6 backport. I still have some manually testing to do as well but figured I'd let the bots get at it ;-)
Comment #21
eshta commentedFix URL in test.
Comment #23
eshta commented