Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yangyang
9 years ago
Commit
4078d82cbe08fc5c8798fde6c73440938265c6fc
1 parent
84741ae3
判断condition不为空
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
4078d82
...
...
@@ -26,6 +26,7 @@ class IndexController extends WebAction
//获取品牌banner
$brandBanner
=
BrandsModel
::
getBannerByDomain
(
$domain
,
$brandId
,
$uid
=
''
);
/* 过滤请求参数 */
$condition
=
array
();
$condition
=
filter_input_array
(
INPUT_GET
,
array
(
//'query' => FILTER_SANITIZE_STRING,
'sort'
=>
FILTER_VALIDATE_INT
,
...
...
@@ -51,8 +52,10 @@ class IndexController extends WebAction
'page'
=>
FILTER_VALIDATE_INT
,),
false
);
//字符转码
foreach
(
$condition
as
&
$value
)
{
$value
=
rawurldecode
(
$value
);
if
(
!
empty
(
$condition
))
{
foreach
(
$condition
as
&
$value
)
{
$value
=
rawurldecode
(
$value
);
}
}
//传品牌ID参数
$condition
[
'brand'
]
=
$brandId
;
...
...
Please
register
or
login
to post a comment