当用户开启相册分类,又没有设置分类项 时
用户批量上传相片,以新建相册方式,会出现 相册分类选择为空,如图1:
从而导致相册上传停止,如图2:
经过排查问题出在相册分类上
source\include\misc\misc_swfupload.php
判断相册分类
loadcache('albumcategory');
$categorys = $_G['cache']['albumcategory'];
- $categorystat = $_G['setting']['albumcategorystat'] ? intval($_G['setting']['albumcategorystat']) : 0;
复制代码 改为这样能行:
- $categorystat = !empty($categorys) && $_G['setting']['albumcategorystat'] ? intval($_G['setting']['albumcategorystat']) : 0;
复制代码
主要原因是返回给flash的xml不对
- <!--{if $_G['setting']['albumcategorystat'] && $categorys}--> <categorys> <category catid="0">{lang select_type}</category> <!--{loop $categorys $key $value}--> <!--{if $value[level] == 0}--> <category catid="$key">$value[catname]</category> <!--{loop $value['children'] $catid}--> <category catid="$categorys[$catid][catid]">--$categorys[$catid][catname]</category> <!--{loop $categorys[$catid]['children'] $catid2}--> <category catid="$categorys[$catid2][catid]">----$categorys[$catid2][catname]</category> <!--{/loop}--> <!--{/loop}--> <!--{/if}--> <!--{/loop}--> </categorys> <!--{/if}-->
复制代码
|