Minor bug with posts not containing files

This commit is contained in:
Savetheinternet authored and Paul Merrill committed 2010-12-01 04:14:16 -08:00
1 parent 8107772cb7
commit abb98de543
1 file changed
+4 -2
+4 -2
View File
@@ -188,8 +188,10 @@
}
// Remove DIR_* before inserting them into the database.
$post['file'] = substr_replace($post['file'], '', 0, strlen(DIR_IMG));
$post['thumb'] = substr_replace($post['thumb'], '', 0, strlen(DIR_THUMB));
if($post['has_file']) {
$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