I have made some improvements to the D7 version:
1. Made some coding style improvements to match the Drupal guidelines.
2. The filemtime() call caused a PHP warning if the CSS file didn't exist - Fixed by checking the file doesn't exist first before checking modification times
3. is_writable() returns false if the CSS file doesn't exist - Fixed by checking the directory if the file doesn't exist instead
4. Cleaned up the file_perms() function - It gave me '55' for the permissions which isn't quite right
5. Changed the message arguments to use @var instead of !var as there shouldn't be HTML in those variables and so they should be check_plain()'d.
I've attached the patch to this issue for you to check / merge / comment on.
| Comment | File | Size | Author |
|---|---|---|---|
| some_improvements.patch | 3.56 KB | mjpa |
Comments
Comment #1
azarzag commentedThanks for that, I'll make sure We all review it.
Comment #2
mjpa commentedSeems the patch has been committed - thanks :)
Comment #3
alex.pilon commentedThanks for your contribution!
Comment #4
alex.pilon commentedclosing..