viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Fix display of search callout in Mobile mode, a=chris

Chris Pollett [2020-06-22 18:Jun:nd]
Fix display of search callout in Mobile mode, a=chris
Filename
src/controllers/CrawlController.php
src/css/search.css
src/views/SearchView.php
src/views/elements/AdminoptionsElement.php
src/views/elements/GroupoptionsElement.php
src/views/elements/SearchoptionsElement.php
src/views/elements/TrendingElement.php
diff --git a/src/controllers/CrawlController.php b/src/controllers/CrawlController.php
index 75ce07d26..83bd41888 100644
--- a/src/controllers/CrawlController.php
+++ b/src/controllers/CrawlController.php
@@ -319,7 +319,7 @@ class CrawlController extends Controller implements CrawlConstants
         list($crawl_params,
             $seed_info) = unserialize(L\webdecode($_REQUEST["arg"]));
         $seed_info['seed_sites']['url'] =
-            L\partitionByHash($seed_info['seed_sites']['url'],
+            L\partitionByHash(($seed_info['seed_sites']['url'] ?? ""),
             null, $num, $i, C\NS_LIB . "UrlParser::getHost");
         $this->model("crawl")->sendStartCrawlMessage($crawl_params, $seed_info,
             null, $num_fetchers);
diff --git a/src/css/search.css b/src/css/search.css
index 3529649a3..67b99527d 100755
--- a/src/css/search.css
+++ b/src/css/search.css
@@ -1442,6 +1442,13 @@ body.mobile
     margin-top: 65px;
     width:2.5in;
 }
+.mobile .search-callout
+{
+    border: 3px solid #DDD;
+    padding: 5px;
+    margin: 8px 3px 3px 3px;
+    width:320px;
+}
 .news-result
 {
     min-height:1.1in;
diff --git a/src/views/SearchView.php b/src/views/SearchView.php
index a081ff55b..cf21e9e25 100755
--- a/src/views/SearchView.php
+++ b/src/views/SearchView.php
@@ -54,8 +54,13 @@ class SearchView extends ComponentView
         $this->addContainer("top", "searchbar");
         $this->addContainer("top", "searchoptions");
         $this->addContainer("sub-top", "header");
-        $this->addContainer("opposite", "searchcallout");
+        if (!$_SERVER["MOBILE"]) {
+            $this->addContainer("opposite", "searchcallout");
+        }
         $this->addContainer("center", "displayadvertisement");
+        if ($_SERVER["MOBILE"]) {
+            $this->addContainer("center", "searchcallout");
+        }
         $this->addContainer("center", "search");
         $this->addContainer("center", "pagination");
         $this->addContainer("center", "trending");
diff --git a/src/views/elements/AdminoptionsElement.php b/src/views/elements/AdminoptionsElement.php
index 33f9609c9..56c294ce3 100644
--- a/src/views/elements/AdminoptionsElement.php
+++ b/src/views/elements/AdminoptionsElement.php
@@ -66,6 +66,9 @@ class AdminoptionsElement extends Element
         <nav id="more-options" class="more-options">
             <?php
             $first = true; ?>
+            <p class="float-opposite medium-font slight-pad">[<a
+                href="javascript:toggleOptions()"
+                >X</a>]</p>
             <h2><a href="<?=C\SHORT_BASE_URL ?><?php
                 if ($logged_in) {
                     e("?$token_string");
diff --git a/src/views/elements/GroupoptionsElement.php b/src/views/elements/GroupoptionsElement.php
index 83dfe53cb..a8bfe7f94 100644
--- a/src/views/elements/GroupoptionsElement.php
+++ b/src/views/elements/GroupoptionsElement.php
@@ -71,6 +71,9 @@ class GroupoptionsElement extends Element implements CrawlConstants
             onclick='javascript:toggleOptions()'>
         </div>
         <nav id="more-options" class="more-options">
+        <p class="float-opposite medium-font slight-pad">[<a
+            href="javascript:toggleOptions()"
+            >X</a>]</p>
         <h2><a href="<?=C\SHORT_BASE_URL ?><?php
             if ($logged_in) {
                 e("?$token_string");
diff --git a/src/views/elements/SearchoptionsElement.php b/src/views/elements/SearchoptionsElement.php
index eabc3962b..4e0d6526b 100644
--- a/src/views/elements/SearchoptionsElement.php
+++ b/src/views/elements/SearchoptionsElement.php
@@ -64,6 +64,9 @@ class SearchoptionsElement extends Element
             onclick='elt("settings-form").submitOnChange()'>
         </div>
         <nav id="more-options" class="more-options">
+        <p class="float-opposite medium-font slight-pad">[<a
+            href="javascript:elt('settings-form').submitOnChange()"
+            >X</a>]</p>
         <h2><a href="<?=C\SHORT_BASE_URL ?><?php
             if ($logged_in) {
                 e("?$token_string");
diff --git a/src/views/elements/TrendingElement.php b/src/views/elements/TrendingElement.php
index 7fe83b1d4..e704ea3df 100644
--- a/src/views/elements/TrendingElement.php
+++ b/src/views/elements/TrendingElement.php
@@ -108,7 +108,7 @@ class TrendingElement extends Element
                     <p><b><?=$date_map[$period]?></b>
                     <?php
                     if ($period !== C\ONE_HOUR) {?>
-                        <button class="right" type="submit"><?=
+                        <button class="float-opposite" type="submit"><?=
                         tl('trending_element_chart')?></button></p><?php
                     }?>
                     <table class="trending-table">
ViewGit