Authored by whb

添加格式转换

... ... @@ -402,7 +402,7 @@ class WebAction extends Controller_Abstract
if (!$this->_useSession) {
$useSession = false;
}
$useSession = false;
//$useSession = false;
if (!$this->_uid) {
$cookie = $this->getCookie('_UID');
... ...
... ... @@ -95,7 +95,7 @@ class InfoData
*/
public static function getArticleInfo($id, $onlyUrl = false)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
return self::webApi(self::getUrl('getArticle'), $param, $onlyUrl);
}
... ... @@ -107,7 +107,7 @@ class InfoData
*/
public static function author($authorId, $onlyUrl = false)
{
$param['author_id'] = $authorId;
$param['author_id'] = intval($authorId);
return self::webApi(self::getUrl('author'), $param, $onlyUrl);
}
... ... @@ -121,8 +121,8 @@ class InfoData
public static function tagTop($page = 1,$limit = 10, $onlyUrl = false)
{
$param['page'] = $page;
$param['limit'] = $limit;
$param['page'] = intval($page);
$param['limit'] = intval($limit);
return self::webApi(self::getUrl('getTagTop'), $param, $onlyUrl);
}
... ... @@ -136,9 +136,9 @@ class InfoData
*/
public static function comment($articleId, $page = 1, $limit = 10, $onlyUrl = false)
{
$param['article_id'] = $articleId;
$param['page'] = $page;
$param['limit'] = $limit;
$param['article_id'] = intval($articleId);
$param['page'] = intval($page);
$param['limit'] = intval($limit);
return self::webApi(self::getUrl('commentList'), $param, $onlyUrl);
}
... ... @@ -150,7 +150,7 @@ class InfoData
*/
public static function articleContent($articleId, $onlyUrl = false)
{
$param['article_id'] = $articleId;
$param['article_id'] = intval($articleId);
return self::webApi(self::getUrl('getArticleContent'), $param, $onlyUrl);
}
... ... @@ -164,7 +164,7 @@ class InfoData
*/
public static function baseInfo($articleId, $uid, $udid, $onlyUrl = false)
{
$param['id'] = $articleId;
$param['id'] = intval($articleId);
$param['uid'] = $uid;
$param['udid'] = $udid;
return self::webApi(self::getUrl('getArticleBaseInfo'), $param, $onlyUrl);
... ... @@ -178,7 +178,7 @@ class InfoData
*/
public static function relateBrand($articleId, $onlyUrl = false)
{
$param['article_id'] = $articleId;
$param['article_id'] = intval($articleId);
return self::webApi(self::getUrl('getBrand'), $param, $onlyUrl);
}
... ... @@ -192,9 +192,9 @@ class InfoData
*/
public static function relateList($articleId, $tag, $limit = 3, $onlyUrl = false)
{
$param['article_id'] = $articleId;
$param['article_id'] = intval($articleId);
$param['tags'] = $tag;
$param['limit'] = $limit;
$param['limit'] = intval($limit);
return self::webApi(self::getUrl('getOtherArticle'), $param, $onlyUrl);
}
... ... @@ -210,8 +210,8 @@ class InfoData
public static function recommend($gender, $page = 1, $limit = 10, $onlyUrl = false)
{
$param['gender'] = $gender;
$param['page'] = $page;
$param['limit'] = $limit;
$param['page'] = intval($page);
$param['limit'] = intval($limit);
return self::webApi(self::getUrl('getArticleByViewsNum'), $param, $onlyUrl);
}
... ... @@ -224,7 +224,7 @@ class InfoData
*/
public static function addComment($id, $uid, $content)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
$param['uid'] = $uid;
$param['content'] = $content;
return self::webApi(self::getUrl('addComment'), $param);
... ... @@ -238,7 +238,7 @@ class InfoData
*/
public static function setPraise($id, $udid)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
$param['udid'] = $udid;
return self::webApi(self::getUrl('setPraise'), $param);
}
... ... @@ -251,7 +251,7 @@ class InfoData
*/
public static function cancelPraise($id, $udid)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
$param['udid'] = $udid;
return self::webApi(self::getUrl('cancelPraise'), $param);
}
... ... @@ -264,7 +264,7 @@ class InfoData
*/
public static function setFavorite($id, $uid)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
$param['uid'] = $uid;
return self::webApi(self::getUrl('setFavorite'), $param);
}
... ... @@ -277,7 +277,7 @@ class InfoData
*/
public static function cancelFavorite($id, $uid)
{
$param['article_id'] = $id;
$param['article_id'] = intval($id);
$param['uid'] = $uid;
return self::webApi(self::getUrl('cancelFavorite'), $param);
}
... ...