Skip to content

Commit

Permalink
Missing checks for Zenpage news and/or pages being enabled on themes'…
Browse files Browse the repository at this point in the history
… search.php
  • Loading branch information
acrylian committed Nov 17, 2014
1 parent 352b31d commit 7ccc314
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions themes/effervescence_plus/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function toggleExtraElements(category, show) {
?>
<div id="efsearch">
<?php
if ($numpages > 0) {
if ($numpages > 0 && ZP_PAGES_ENABLED) {
?>
<div id="efsearchhead_pages">
<h3><?php printf(gettext('Pages (%s)'), $numpages); ?></h3>
Expand Down Expand Up @@ -175,7 +175,7 @@ function toggleExtraElements(category, show) {
</div>
<?php
}
if ($numnews > 0) {
if ($numnews > 0 && ZP_NEWS_ENABLED) {
if ($numpages > 0)
echo '<br />';
?>
Expand Down
4 changes: 2 additions & 2 deletions themes/garland/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function toggleExtraElements(category, show) {
?>
<div id="garland_search">
<?php
if ($numpages > 0) {
if ($numpages > 0 && ZP_PAGES_ENABLED) {
?>
<div id="garland_searchhead_pages">
<h3><?php printf(gettext('Pages (%s)'), $numpages); ?></h3>
Expand Down Expand Up @@ -135,7 +135,7 @@ function toggleExtraElements(category, show) {
</div>
<?php
}
if ($numnews > 0) {
if ($numnews > 0 && ZP_NEWS_ENABLED) {
if ($numpages > 0)
echo '<br />';
?>
Expand Down
6 changes: 3 additions & 3 deletions themes/zenpage/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
</h3>
<?php
}
if ($_zp_page == 1) { //test of zenpage searches
if ($numpages > 0) {
if ($zenpage && $_zp_page == 1) { //test of zenpage searches
if ($numpages > 0 && ZP_PAGES_ENABLED) {
$number_to_show = 5;
$c = 0;
?>
Expand All @@ -99,7 +99,7 @@
</ul>
<?php
}
if ($numnews > 0) {
if ($numnews > 0 && ZP_NEWS_ENABLED) {
$number_to_show = 5;
$c = 0;
?>
Expand Down
6 changes: 3 additions & 3 deletions themes/zpmobile/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
</h3>
<?php
}
if ($_zp_page == 1) { //test of zenpage searches
if ($numpages > 0) {
if ($zenpage && $_zp_page == 1) { //test of zenpage searches
if ($numpages > 0 && ZP_PAGES_ENABLED) {
$number_to_show = 5;
$c = 0;
?>
Expand All @@ -93,7 +93,7 @@
</ul>
<?php
}
if ($numnews > 0) {
if ($numnews > 0 && ZP_NEWS_ENABLED) {
$number_to_show = 5;
$c = 0;
?>
Expand Down

0 comments on commit 7ccc314

Please sign in to comment.