1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00

Minor bug with posts not containing files

This commit is contained in:
Savetheinternet 2010-11-30 19:25:50 +11:00
parent c3178f7ab4
commit f4ccafe1db

View File

@ -188,8 +188,10 @@
} }
// Remove DIR_* before inserting them into the database. // Remove DIR_* before inserting them into the database.
$post['file'] = substr_replace($post['file'], '', 0, strlen(DIR_IMG)); if($post['has_file']) {
$post['thumb'] = substr_replace($post['thumb'], '', 0, strlen(DIR_THUMB)); $post['file'] = substr_replace($post['file'], '', 0, strlen(DIR_IMG));
$post['thumb'] = substr_replace($post['thumb'], '', 0, strlen(DIR_THUMB));
}
// Todo: Validate some more, remove messy code, allow more specific configuration // Todo: Validate some more, remove messy code, allow more specific configuration