Fixed to prevent entering empty bug reports.

This commit is contained in:
Loic d'Anterroches
2008-12-23 11:20:08 +01:00
parent d292678759
commit 4f682c2e93
2 changed files with 18 additions and 0 deletions

View File

@@ -140,6 +140,15 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
}
}
function clean_content()
{
$content = trim($this->cleaned_data['content']);
if (!$this->show_full and strlen($content) == 0) {
throw new Pluf_Form_Invalid(__('You need to provide a description of the issue.'));
}
return $content;
}
/**
* We check that something is really changed.
*/