Only show "delete file" link on posts with files

This commit is contained in:
Savetheinternet 2010-12-17 20:05:26 +11:00
parent 68b98df6cd
commit 139514402d

View File

@ -94,7 +94,7 @@
$built .= ' <a title="Ban & Delete" href="?/b/ban&amp;delete/' . $this->id . '">' . MOD_LINK_BANDELETE . '</a>';
// Delete file (keep post)
if($mod['type'] >= MOD_DELETEFILE)
if(!empty($this->file) && $mod['type'] >= MOD_DELETEFILE)
$built .= ' <a title="Remove file" href="?/b/file/' . $this->id . '">' . MOD_LINK_DELETEFILE . '</a>';
$built .= '</span>';