首页 > 网站 > 建站经验 > 正文

phpcms v9更新全站缓存后联动菜单不能正常显示问题

2024-04-25 20:34:43
字体:
来源:转载
供稿:网友

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 的修改下就行了

 

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表