diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-30 19:25:50 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-30 19:25:50 +1100 |
| commit | f4ccafe1db765703c00ba7859836903247b6a4a7 (patch) | |
| tree | 81f81dda155fae45cf7232b3540d3b7febba9d8c | |
| parent | c3178f7ab468afbe478ad0415b75ed3914f2742c (diff) | |
Minor bug with posts not containing files
| -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 |
