Closed (fixed)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
2 Oct 2009 at 12:36 UTC
Updated:
7 Oct 2019 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Spiked commentedComment #2
avpadernoIt should be better to use placeholders, rather than concatenating strings.
The module doesn't declare its dependency from PHP 5.
There is no code.
There is another way to include PHP code; if then you are always including those files, it would be better to incorporate them into the module file.
The description should be more descriptive.
The permission string should be something more descriptive (see ,
The custom class is used just to define static methods, which are then also exposed through functions; in that case, it should be better to not define such class.
The code should use the value of the Drupal variable, not an empty string.
An empty validate function is not useful. If the form values are used to set Drupal variables, it should be better to call
system_settings_form().The strings result, and info should be translatable.
Comment #3
Spiked commentedChangelog:
- Cleaned up the code, removed the class and moved everything into functions
- Applied t() to several strings
- Removed php5 dependency (removed the (static) class)
- Removed .install file (empty hook_requirements())
- Removed require_once(), merged everything after a cleanup
- Changed several descriptions
- Changed permission to "configure directadmin api"
- Removed function around static class->static function, and made the functions directly available
- Removed empty #default_value from #password (#password doesn't support #default_value at all)
- Added validation and added system_settings_form()
- Satisfied the Coder module at highest severity level.
Comment #4
Spiked commentedI have also changed function names in comments, but after I archived it. Would be a bit overhead to post a new archive for changed comments, but I thought I'd let you know.
Comment #5
avpadernoAs the value is converted in an integer, it's probable that
is_numeric()will returnTRUE.check_plain()and similar functions are used when the value is rendered, not when it is saved in a database table.It should be better to use the same string used by Drupal; in that way, the translation people would have a string less to translate.
Why doesn't the code use simpletest.module, for the testing?
Comment #6
Spiked commented1: You're right, I've changed the if-statement (and variable) to
2: Never thought about that. Moved them from set_variable() to get_variable(), but only at the hostname. (port is checked to be numeric, and username+password may contain special characters.) Might be a (small) security issue, and needs some thought.
3: Fixed.
4: The user doesn't need to test the Drupal module/installation, but the connection to the external DirectAdmin server. I'm not completely sure SimpleTest can do this, but I will look into this. It does add a requirement, unfortunately.
Changelog:
- Fixed function names in comments.
- Fixed form validation of the DirectAdmin configuration.
- Moved check_plain from variable_set to variable_get on needed variables.
- Changed "Settings saved" message.
- Added .install file for hook_uninstall() to remove set variables.
Comment #7
avpadernoThe call to
check_plain()is not necessary, as it is already done from the form API; calling it twice creates some problems.The code can be simplified.
Comment #8
Spiked commentedChangelog:
- Removed check_plain
- Simplified the if statement.
Is there a default README.txt format, or should I base it on another README.txt? (Like drupal's)
Comment #9
avpadernoIt could be simply
Comment #12
avpaderno