diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-30 19:25:50 +1100 |
|---|---|---|
| committer | Paul Merrill <napalminc@gmail.com> | 2010-12-01 04:14:16 -0800 |
| commit | abb98de54371ffbb31819d18c5cec826298ad79d (patch) | |
| tree | f6e8169d1b8c411aa8714bb8938a3d40caa1a4a7 /post.php | |
| parent | 8107772cb722e144cbc8745ffd0fa0be8d65a644 (diff) | |
Minor bug with posts not containing files
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |
