1、内核更新
2、后台bug修复(获取参数的bug)
This commit is contained in:
@@ -63,7 +63,7 @@ class Ad extends Admin {
|
||||
public function edit($id = null){
|
||||
$place = model('AdPlace');
|
||||
if (IS_POST) {
|
||||
$data = input('post.','');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = $place->save($data,array('id'=>$data['id']));
|
||||
if ($result) {
|
||||
@@ -122,7 +122,7 @@ class Ad extends Admin {
|
||||
public function addad($id){
|
||||
$ad = model('ad');
|
||||
if (IS_POST) {
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = $ad->save($data);
|
||||
if ($result) {
|
||||
@@ -148,7 +148,7 @@ class Ad extends Admin {
|
||||
public function editad($id = null){
|
||||
$ad = model('ad');
|
||||
if (IS_POST) {
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = $ad->save($data,array('id'=>$data['id']));
|
||||
if ($result) {
|
||||
|
||||
@@ -69,7 +69,7 @@ class Attribute extends Admin {
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function add(){
|
||||
$model_id = input('get.model_id','','trim,intval');
|
||||
$model_id = input('model_id','','trim,intval');
|
||||
if(IS_POST){
|
||||
$result = $this->model->change();
|
||||
if ($result) {
|
||||
@@ -104,7 +104,7 @@ class Attribute extends Admin {
|
||||
return $this->error($this->model->getError(),'');
|
||||
}
|
||||
}else{
|
||||
$id = input('get.id','','trim,intval');
|
||||
$id = input('id','','trim,intval');
|
||||
$info = db('Attribute')->find($id);
|
||||
$data = array(
|
||||
'info' => $info,
|
||||
|
||||
@@ -17,7 +17,7 @@ class Channel extends Admin{
|
||||
}
|
||||
|
||||
public function index(){
|
||||
$pid = input('get.pid', 0);
|
||||
$pid = input('pid', 0);
|
||||
/* 获取频道列表 */
|
||||
//$map = array('status' => array('gt', -1), 'pid'=>$pid);
|
||||
$map = array('status' => array('gt', -1));
|
||||
@@ -50,7 +50,7 @@ class Channel extends Admin{
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
$Channel = model('Channel');
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$id = $Channel->save($data);
|
||||
if ($id) {
|
||||
@@ -64,7 +64,7 @@ class Channel extends Admin{
|
||||
$this->error($Channel->getError());
|
||||
}
|
||||
} else {
|
||||
$pid = input('get.pid', 0);
|
||||
$pid = input('pid', 0);
|
||||
//获取父导航
|
||||
if (!empty($pid)) {
|
||||
$parent = db('Channel')->where(array('id' => $pid))->field('title')->find();
|
||||
@@ -86,7 +86,7 @@ class Channel extends Admin{
|
||||
public function edit($id = 0) {
|
||||
if (IS_POST) {
|
||||
$Channel = model('Channel');
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
if (false !== $Channel->save($data,array('id'=>$data['id']))) {
|
||||
//记录行为
|
||||
@@ -107,7 +107,7 @@ class Channel extends Admin{
|
||||
return $this->error('获取配置信息错误');
|
||||
}
|
||||
|
||||
$pid = input('get.pid', 0);
|
||||
$pid = input('pid', 0);
|
||||
//获取父导航
|
||||
if (!empty($pid)) {
|
||||
$parent = db('Channel')->where(array('id' => $pid))->field('title')->find();
|
||||
@@ -148,8 +148,8 @@ class Channel extends Admin{
|
||||
*/
|
||||
public function sort() {
|
||||
if (IS_GET) {
|
||||
$ids = input('get.ids');
|
||||
$pid = input('get.pid');
|
||||
$ids = input('ids');
|
||||
$pid = input('pid');
|
||||
//获取排序的数据
|
||||
$map = array('status' => array('gt', -1));
|
||||
if (!empty($ids)) {
|
||||
|
||||
@@ -77,10 +77,10 @@ class Config extends Admin{
|
||||
*/
|
||||
public function add() {
|
||||
if (IS_POST) {
|
||||
$Config = model('Config');
|
||||
$data = input('post.');
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$id = $Config->validate(true)->save($data);
|
||||
$id = $config->validate(true)->save($data);
|
||||
if ($id) {
|
||||
cache('db_config_data', null);
|
||||
//记录行为
|
||||
@@ -92,7 +92,7 @@ class Config extends Admin{
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $this->error($Config->getError());
|
||||
return $this->error($config->getError());
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -109,20 +109,20 @@ class Config extends Admin{
|
||||
*/
|
||||
public function edit($id = 0) {
|
||||
if (IS_POST) {
|
||||
$Config = model('Config');
|
||||
$data = input('post.');
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = $Config->validate('Config.edit')->save($data,array('id'=>$data['id']));
|
||||
$result = $config->validate('Config.edit')->save($data,array('id'=>$data['id']));
|
||||
if (false !== $result) {
|
||||
cache('db_config_data', null);
|
||||
//记录行为
|
||||
action_log('update_config', 'config', $data['id'], session('user_auth.uid'));
|
||||
return $this->success('更新成功', Cookie('__forward__'));
|
||||
} else {
|
||||
return $this->error($Config->getError(), '');
|
||||
return $this->error($config->getError(), '');
|
||||
}
|
||||
}else {
|
||||
return $this->error($Config->getError());
|
||||
return $this->error($config->getError());
|
||||
}
|
||||
}else{
|
||||
$info = array();
|
||||
@@ -181,7 +181,7 @@ class Config extends Admin{
|
||||
*/
|
||||
public function sort() {
|
||||
if (IS_GET) {
|
||||
$ids = input('get.ids');
|
||||
$ids = input('ids');
|
||||
//获取排序的数据
|
||||
$map = array('status' => array('gt', -1));
|
||||
if (!empty($ids)) {
|
||||
|
||||
@@ -145,7 +145,7 @@ class Content extends Admin{
|
||||
* @author molong <ycgpp@126.com>
|
||||
*/
|
||||
public function del(){
|
||||
$id = input('get.id','','trim');
|
||||
$id = input('id','','trim');
|
||||
$ids = input('post.ids',array());
|
||||
array_push($ids, $id);
|
||||
if (empty($ids)) {
|
||||
|
||||
@@ -56,7 +56,7 @@ class Link extends Admin{
|
||||
//修改
|
||||
public function edit(){
|
||||
$link = model('Link');
|
||||
$id = input('get.id','','trim,intval');
|
||||
$id = input('id','','trim,intval');
|
||||
if(IS_POST){
|
||||
$data = input('post.');
|
||||
if ($data) {
|
||||
|
||||
@@ -226,8 +226,8 @@ class Menu extends Admin{
|
||||
*/
|
||||
public function sort(){
|
||||
if(IS_GET){
|
||||
$ids = input('get.ids');
|
||||
$pid = input('get.pid');
|
||||
$ids = input('ids');
|
||||
$pid = input('pid');
|
||||
|
||||
//获取排序的数据
|
||||
$map = array('status'=>array('gt',-1));
|
||||
|
||||
@@ -148,7 +148,7 @@ class Model extends Admin{
|
||||
* @author colin <colin@tensent.cn>
|
||||
*/
|
||||
public function status(){
|
||||
$map['id'] = input('post.ids/a') ? input('post.ids/a') : input('get.ids/a');
|
||||
$map['id'] = $this->request->param('ids');
|
||||
if(null == $map['id'])return $this->error('参数不正确!');
|
||||
|
||||
$data['status'] = input('get.status');
|
||||
|
||||
@@ -49,7 +49,7 @@ class Seo extends Admin{
|
||||
|
||||
public function add(){
|
||||
if (IS_POST) {
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = model('SeoRule')->save($data);
|
||||
if ($result) {
|
||||
@@ -72,7 +72,7 @@ class Seo extends Admin{
|
||||
|
||||
public function edit($id = null){
|
||||
if (IS_POST) {
|
||||
$data = input('post.');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = model('SeoRule')->save($data,array('id'=>$data['id']));
|
||||
if (false !== $result) {
|
||||
|
||||
@@ -172,7 +172,7 @@ class User extends Admin{
|
||||
*/
|
||||
private function getUserinfo($uid = null,$pass = null,$errormsg = null){
|
||||
$user = model('User');
|
||||
$uid = $uid ? $uid : input('get.id');
|
||||
$uid = $uid ? $uid : input('id');
|
||||
//如果无UID则修改当前用户
|
||||
$uid = $uid ? $uid : session('user_auth.uid');
|
||||
$map['uid'] = $uid;
|
||||
|
||||
Reference in New Issue
Block a user