<dd>
<select id="categoryID" name="categoryID">
<option value="0">{lang}wcf.media.category.choose{/lang}</option>
+ <option value="-1"{if $categoryID == -1} selected="selected"{/if}>
+ {lang}wcf.media.category.choose.noCategory{/lang}
+ </option>
{content}
{foreach from=$categoryList item=categoryItem}
}
if ($this->categoryID) {
- $this->objectList->getConditionBuilder()->add('media.categoryID = ?', [$this->categoryID]);
+ if ($this->categoryID === -1) {
+ $this->objectList->getConditionBuilder()->add('media.categoryID IS NULL');
+ } else {
+ $this->objectList->getConditionBuilder()->add('media.categoryID = ?', [$this->categoryID]);
+ }
}
if ($this->query) {
$this->objectList->addSearchConditions($this->query);
<item name="wcf.media.caption"><![CDATA[Bildunterschrift]]></item>
<item name="wcf.media.caption.enableHtml"><![CDATA[HTML in der Bildunterschrift verwenden]]></item>
<item name="wcf.media.category.choose"><![CDATA[Kategorien]]></item>
+ <item name="wcf.media.category.choose.noCategory"><![CDATA[(keine Kategorie)]]></item>
<item name="wcf.media.categoryID"><![CDATA[Kategorie]]></item>
<item name="wcf.media.chooseFile"><![CDATA[Datei auswählen]]></item>
<item name="wcf.media.chooseImage"><![CDATA[Bild auswählen]]></item>
<item name="wcf.media.caption"><![CDATA[Caption]]></item>
<item name="wcf.media.caption.enableHtml"><![CDATA[Enable HTML code in caption]]></item>
<item name="wcf.media.category.choose"><![CDATA[Categories]]></item>
+ <item name="wcf.media.category.choose.noCategory"><![CDATA[(no category)]]></item>
<item name="wcf.media.categoryID"><![CDATA[Category]]></item>
<item name="wcf.media.chooseFile"><![CDATA[Select File]]></item>
<item name="wcf.media.chooseImage"><![CDATA[Select Image]]></item>