phpcms/modules/admin/linkage.php
/**
* 生成联动菜单缓存
* @param init $linkageid
*/
private function _cache($linkageid) {
$linkageid = intval($linkageid);
$info = array();
$r = $this->db->get_one(array('linkageid'=>$linkageid),'name,siteid,style,keyid,setting');
$info['title'] = $r['name'];
$info['style'] = $r['style'];
$info['setting'] = string2array($r['setting']);
$info['siteid'] = $r['siteid'];
$info['data'] = $this->submenulist($linkageid);
setcache($linkageid, $info,'linkage');
return $info;
}
phpcms/modules/admin/classes/cache_api.class.php
/**
* 更新联动菜单缓存方法
*/
public function linkage() {
$infos = $this->db->select(array('keyid'=>0));
foreach ($infos as $r) {
$linkageid = intval($r['linkageid']);
$r = $this->db->get_one(array('linkageid'=>$linkageid),'name,siteid,style');
$info['title'] = $r['name'];
$info['style'] = $r['style'];
$info['siteid'] = $r['siteid'];
$info['data'] = $this->submenulist($linkageid);
setcache($linkageid, $info,'linkage');
}
return true;
}
一对照就看出来问题
把ache_api.class.php 的代码照着linkage.php 的修改下就行了
新闻热点
疑难解答