Posted by ultimateboy on February 11, 2009 at 9:18pm
4 followers
| Project: | FileField |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
A pretty minor coding standards issue.. theme functions are, in their nature, going to be called from outside of the module, and therefore should not call private functions.
Comments
#1
just what are you talking about? how about write a patch...
#2
Looks like _filefield_icon_url($file) is culprit in filefield.theme.inc.
<?phpfunction theme_filefield_icon($file) {
...
if ($icon_url = _filefield_icon_url($file)) {
$icon = '<img class="field-icon-'. $dashed_mime .'" alt="'. $mime .' icon" src="'. $icon_url .'" />';
}
return '<div class="filefield-icon field-icon-'. $dashed_mime .'">'. $icon .'</div>';
}
?>
#3
I moved this function to the public namespace, unfortunately this means that sites that have overridden this function are now going to break when they upgrade to the next version. But best to get it over with now and get out a stable version as soon as possible.
#4
Oh, turns out there already was a public function for "filefield_icon_url()". Here's an update patch which renames these functions back to private, but just changes the function call in the theme function.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.