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

@@ -173,6 +173,15 @@ class IDF_Form_IssueCreate extends Pluf_Form
return $this->cleaned_data;
}
function clean_content()
{
$content = trim($this->cleaned_data['content']);
if (strlen($content) == 0) {
throw new Pluf_Form_Invalid(__('You need to provide a description of the issue.'));
}
return $content;
}
function clean_status()
{
// Check that the status is in the list of official status