Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台友情链接列表无法隐藏友情链接 #22

Open
huangyuan opened this issue Feb 7, 2017 · 0 comments
Open

后台友情链接列表无法隐藏友情链接 #22

huangyuan opened this issue Feb 7, 2017 · 0 comments

Comments

@huangyuan
Copy link

代码:ThinkCMFX / application / Admin / Controller / LinkController.class.php第107行中的1更改为0
// 友情链接显示/隐藏
public function toggle(){
if(isset($_POST['ids']) && $_GET["display"]){
$ids = I('post.ids/a');
if ($this->link_model->where(array('link_id'=>array('in',$ids)))->save(array('link_status'=>1))!==false) {
$this->success("显示成功!");
} else {
$this->error("显示失败!");
}
}
if(isset($_POST['ids']) && $_GET["hide"]){
$ids = I('post.ids/a');

           //隐藏时link_status应该是0而不是1         
	if ($this->link_model->where(array('link_id'=>array('in',$ids)))->save(array('link_status'=>1))!==false) {
		$this->success("隐藏成功!");
	} else {
		$this->error("隐藏失败!");
	}
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant