phpcms新增二级栏目后 一级栏目不可录入数据

在modules/content/content.php 的public_categorys方法里


if (!empty($categorys)) {

}
里面的代码改为以下的:

$tree->init($categorys);
            switch ($from) {
                case 'block':
                    $strs = "<span class='\$icon_type'>\$add_icon<a href='?m=block&c=block_admin&a=public_visualization&menuid=" . $_GET['menuid'] . "&catid=\$catid&type=list' target='right'>\$catname</a> \$vs_show</span>";
                    $strs2 = "<img src='" . IMG_PATH . "folder.gif'> <a href='?m=block&c=block_admin&a=public_visualization&menuid=" . $_GET['menuid'] . "&catid=\$catid&type=category' target='right'>\$catname</a>";
                    break;

                default:
                    $strs = "<span class='\$icon_type'>\$add_icon<a href='?m=content&c=content&a=\$type&menuid=" . $_GET['menuid'] . "&catid=\$catid' target='right' onclick='open_list(this)'>\$catname</a></span>";
                    $strs2 = "<span class='folder'><a href='?m=content&c=content&a=\$type&menuid=" . $_GET['menuid'] . "&catid=\$catid' target='right' onclick='open_list(this)'>\$catname</a></span>";
                    break;
            }
            $categorys = $tree->get_treeview(0, 'category_tree', $strs, $strs2, $ajax_show);

 

posted @ 2016-10-11 13:56  _DongGe  阅读(161)  评论(0编辑  收藏  举报