Limit the allowed number of labels to six, otherwise our form upload view

breaks and document that limit.
This commit is contained in:
Thomas Keller
2012-01-03 16:44:41 +01:00
parent 3bec47778a
commit 6bbabaebdd
2 changed files with 12 additions and 2 deletions

View File

@@ -102,6 +102,12 @@ class IDF_Form_UploadArchiveHelper
}
}
// FIXME: remove this once we allow more than six labels everywhere
if (count($entry['labels']) > 6) {
throw new Pluf_Form_Invalid(
sprintf(__('The entry %s in the manifest has more than the six allowed labels set.'), $entry['name']));
}
$this->entries[$entry['name']] = $entry;
}