<div class="mediaManagerCategoryList">
<select name="categoryID" class="fullWidth">
<option value="0">{lang}wcf.media.category.choose{/lang}</option>
+ <option value="-1">{lang}wcf.media.category.choose.noCategory{/lang}</option>
{content}
{foreach from=$categoryList item=categoryItem}
<div class="mediaManagerCategoryList">
<select name="categoryID" class="fullWidth">
<option value="0">{lang}wcf.media.category.choose{/lang}</option>
+ <option value="-1">{lang}wcf.media.category.choose.noCategory{/lang}</option>
{content}
{foreach from=$categoryList item=categoryItem}
$mediaList->getConditionBuilder()->add('media.isImage = ?', [1]);
}
if ($this->parameters['categoryID']) {
- $mediaList->getConditionBuilder()->add('media.categoryID = ?', [$this->parameters['categoryID']]);
+ if ($this->parameters['categoryID'] == -1) {
+ $mediaList->getConditionBuilder()->add('media.categoryID IS NULL');
+ } else {
+ $mediaList->getConditionBuilder()->add('media.categoryID = ?', [$this->parameters['categoryID']]);
+ }
}
$mediaList->sqlOrderBy = 'media.uploadTime DESC, media.mediaID DESC';
$mediaList->sqlLimit = static::ITEMS_PER_MANAGER_DIALOG_PAGE;