Skip to content

Commit

Permalink
api
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.liu committed Mar 6, 2016
1 parent 0d50f08 commit 57c33c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion api/api_news.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
C::t('news_viewer')->insert($addviewer);
}
}
$news['dateline'] = dgmdate($news[dateline],'u');
$data = $news;
$message = 'success';
break;
Expand All @@ -112,7 +113,7 @@ function catList($catid = 0,$sql,$param)
$params = array('news');
$params[] = 'news_viewer';
$params[] = $_G['uid'];
$params = array_merge_recursive($params,$param);
$params = $param ? array_merge_recursive($params, $param) : $params;
foreach (C::t('news_cat')->fetch_all_by_pid($catid) as $value) {
$catids = $common='';
$result[$value['catid']] = $value;
Expand Down
2 changes: 1 addition & 1 deletion data/cache/smilies_var.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion user/class/class_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function api_login()
if (empty($_GET['handlekey']) || !empty($_GET['lssubmit'])) {
if (defined('IN_MOBILE')) {
json_success(lang($loginmessage),$data);
} else {echo 2;
} else {
if (!empty($_GET['lssubmit'])) {

json_success(lang($loginmessage),$data);
Expand Down Expand Up @@ -376,6 +376,8 @@ function api_logout()
}

function api_userInfo(){
global $_G;
$uid = $_GET['uid'];
json_success('success',array('uid'=>2,'username'=>'test','token'=>111));
}
}
Expand Down

0 comments on commit 57c33c5

Please sign in to comment.