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

Fix issue with crawlform staying open wen editing crawl options, a=chhris

Chris Pollett [2020-08-09 23:Aug:th]
Fix issue with crawlform staying open wen editing crawl options, a=chhris
Filename
src/library/UpgradeFunctions.php
src/views/elements/CrawloptionsElement.php
diff --git a/src/library/UpgradeFunctions.php b/src/library/UpgradeFunctions.php
index d4389ea89..9e8b62980 100644
--- a/src/library/UpgradeFunctions.php
+++ b/src/library/UpgradeFunctions.php
@@ -157,6 +157,7 @@ function upgradeDatabaseWorkDirectoryCheck()
                 return true;
             }
         }
+                                echo "yo" ;exit();
         sleep(3);
     }
     set_error_handler(C\NS_CONFIGS . "yioop_error_handler");
diff --git a/src/views/elements/CrawloptionsElement.php b/src/views/elements/CrawloptionsElement.php
index c1e708a6a..1c29518b5 100644
--- a/src/views/elements/CrawloptionsElement.php
+++ b/src/views/elements/CrawloptionsElement.php
@@ -52,11 +52,13 @@ class CrawloptionsElement extends Element
     public function render($data)
     {
         $admin_url = htmlentities(B\controllerUrl('admin', true));
+        $crawlform = (empty($_REQUEST['ts'])) ? "&crawlform=true" :
+            "";
         ?>
         <div class="current-activity">
         <div class="<?= $data['leftorright'] ?>">
         [<a href="<?=$admin_url ?>a=manageCrawls&amp;<?=
-            C\CSRF_TOKEN."=".$data[C\CSRF_TOKEN] ?>&amp;crawlform=true" >X</a>]
+            C\CSRF_TOKEN."=".$data[C\CSRF_TOKEN] . $crawlform ?>" >X</a>]
         </div>
         <?php if (isset($data['ts'])) { ?>
         <h2><?= tl('crawloptions_element_modify_active_crawl') ?></h2>
ViewGit