projects
/
web
/
MichiganTrailMaps.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eed97e7
)
Update search sql for the banners
author
Steve Sutton
<steve@gaslightmedia.com>
Wed, 18 Mar 2015 20:10:51 +0000
(16:10 -0400)
committer
Steve Sutton
<steve@gaslightmedia.com>
Wed, 18 Mar 2015 20:10:51 +0000
(16:10 -0400)
Update sql for the county to be pulled in from
city table if the city is given in the search.
Toolkit/Banners/BannersIterator.php
patch
|
blob
|
history
diff --git
a/Toolkit/Banners/BannersIterator.php
b/Toolkit/Banners/BannersIterator.php
index
80ab1f8
..
555c190
100644
(file)
--- a/
Toolkit/Banners/BannersIterator.php
+++ b/
Toolkit/Banners/BannersIterator.php
@@
-361,6
+361,12
@@
class Toolkit_Banners_BannersIterator implements IteratorAggregate
WHERE county = {$countyId}";
} else {
}
+ } else if ($city = filter_var($_REQUEST['cityId'], FILTER_VALIDATE_INT)) {
+ $selectBannersAssignedToCounties = "
+ UNION
+ SELECT banner
+ FROM banners2counties
+ WHERE county = (SELECT county_id FROM city WHERE city_id = {$city})";
}
$memberCatsOnPage = $this->_getMemberCatsAvailableOnPage(