修复一处bug
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<div class="col-lg-5">
|
||||
<select name="pid" class="form-control" style="width:auto;">
|
||||
<option value="0">--一级导航--</option>
|
||||
{volist name=":parse_field_bind('Channel',$info['pid'],'')" id="item"}
|
||||
{volist name=":parse_field_bind('Channel',$info['pid'], 0)" id="item"}
|
||||
{if condition="$item['id'] neq $info['id']"}
|
||||
<option value="{$item['id']}" {if condition="$pid eq $item['id']"}selected{/if}>{$item['title_show']}</option>
|
||||
{/if}
|
||||
|
||||
@@ -598,7 +598,7 @@ function parse_field_bind($table, $selected = '', $model = 0) {
|
||||
if ($table) {
|
||||
$res = db($table)->select();
|
||||
foreach ($res as $key => $value) {
|
||||
if (($model && $value['model_id'] && $value['model_id'] == $model) || $value['model_id'] == 0) {
|
||||
if (($model && isset($value['model_id']) && $value['model_id'] == $model) || (isset($value['model_id']) && $value['model_id'] == 0)) {
|
||||
$list[] = $value;
|
||||
} elseif(!$model) {
|
||||
$list[] = $value;
|
||||
|
||||
Reference in New Issue
Block a user