function comment_upload_sort_files in Comment Upload 6
Sort on weight, if weights are equal compare fid.
uasort callback.
1 string reference to 'comment_upload_sort_files'
- comment_upload_alter_comment_form in ./
comment_upload.module - Alter the comment form to support AHAH uploads.
File
- ./
comment_upload.module, line 637 - Provides file attachment functionality for comments.
Code
function comment_upload_sort_files($a, $b) {
if ($a['weight'] == $b['weight']) {
return $a['fid'] < $b['fid'] ? -1 : 1;
}
return $a['weight'] < $b['weight'] ? -1 : 1;
}