filename begins with a space
akeimou - April 5, 2006 - 20:46
| Project: | Swish-E Indexer |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
not sure why users are naming their files to start with a space but it's causing errors in swish-e. for example, if the filename is " myfile.doc" with size of 1234 then the function swish_search assigns the following:
$title = ' myfile.doc" 1234'
$file_size = 'myfile.doc" 1234'
the error shows up in swishnodelist_render with an incorrect syntax for the sql statement. did a quick fix by changing the assignment statement for $j in swish_search function to
$j = strrpos($result, '" ');
that is, the first occurence from the right.
this is probably better handled in the upload module by trimming whitespaces from the filename, but not sure.

#1
#2
filenames are now possible to be indexed when they begin with a space
#3
Automatically closed -- issue fixed for two weeks with no activity.