viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
diff --git a/src/controllers/AdminController.php b/src/controllers/AdminController.php index 1cb342b16..4643e461f 100755 --- a/src/controllers/AdminController.php +++ b/src/controllers/AdminController.php @@ -348,6 +348,7 @@ class AdminController extends Controller implements CrawlConstants return $data; } $allowed_argument = false; + $activity_index = 0; foreach ($allowed_activities as $allowed_activity) { if ($activity == $allowed_activity['METHOD_NAME']) { $allowed = true; @@ -379,6 +380,7 @@ class AdminController extends Controller implements CrawlConstants $allowed_argument = true; break; } + $activity_index++; } // always allow managing account if (!$allowed && $activity == "manageAccount") { @@ -389,6 +391,7 @@ class AdminController extends Controller implements CrawlConstants if (!$allowed_argument) { unset($_REQUEST['arg']); } + $data['ALLOWED_ARGUMENTS'] = ""; //for now we allow anyone to get crawlStatus if ($allowed) { $data = $this->call($activity); @@ -397,6 +400,7 @@ class AdminController extends Controller implements CrawlConstants } $data['ACTIVITY_METHOD'] = $activity; //for settings controller $data['ACTIVITIES'] = $allowed_activities; + $data['ALLOWED_ARGUMENTS'] = $allowed_activity['ALLOWED_ARGUMENTS']; } if (!in_array($activity, $this->status_activities)) { $name_activity = $activity; diff --git a/src/controllers/components/CrawlComponent.php b/src/controllers/components/CrawlComponent.php index a0676257b..a2a9347e0 100644 --- a/src/controllers/components/CrawlComponent.php +++ b/src/controllers/components/CrawlComponent.php @@ -1464,17 +1464,17 @@ class CrawlComponent extends Component implements CrawlConstants } $seed_info = $crawl_model->getSeedInfo(); $data['RECRAWL_FREQS'] = [-1 => tl('crawl_component_recrawl_never'), - 1=>tl('crawl_component_recrawl_1day'), - 2=>tl('crawl_component_recrawl_2day'), - 3=>tl('crawl_component_recrawl_3day'), - 7=>tl('crawl_component_recrawl_7day'), - 14=>tl('crawl_component_recrawl_14day')]; - $data['SIZE_VALUES'] = [10000=>10000, 50000=>50000, - 100000=>100000, 500000=>500000, 1000000=>1000000, - 5000000=>5000000, 10000000=>10000000]; - $data['LEN_VALUES'] = [2000=>2000, 5000=>5000, 10000=>10000, - 50000=>50000, 100000=>100000, 500000=>500000, 1000000=>1000000, - 5000000=>5000000, 10000000=>10000000]; + 1 => tl('crawl_component_recrawl_1day'), + 2 => tl('crawl_component_recrawl_2day'), + 3 => tl('crawl_component_recrawl_3day'), + 7 => tl('crawl_component_recrawl_7day'), + 14 => tl('crawl_component_recrawl_14day')]; + $data['SIZE_VALUES'] = [10000 => 10000, 50000 => 50000, + 100000 => 100000, 500000 => 500000, 1000000 => 1000000, + 5000000 => 5000000, 10000000 => 10000000]; + $data['LEN_VALUES'] = [2000 => 2000, 5000 => 5000, 10000 => 10000, + 50000 => 50000, 100000 => 100000, 500000 => 500000, + 1000000 => 1000000, 5000000 => 5000000, 10000000 => 10000000]; $data['available_summarizers'] = [ self::BASIC_SUMMARIZER => tl('crawl_component_basic'), self::CENTROID_SUMMARIZER => tl('crawl_component_centroid'), @@ -1583,7 +1583,6 @@ class CrawlComponent extends Component implements CrawlConstants C\MAX_DESCRIPTION_LEN; } $data['MAX_LEN'] = $seed_info["general"]["max_description_len"]; - $data['INDEXING_PLUGINS'] = []; $included_plugins = []; if (isset($_REQUEST["posted"]) && !$loaded) { @@ -1820,7 +1819,7 @@ class CrawlComponent extends Component implements CrawlConstants $data["PAGE_RANGE_REQUEST"], C\CRAWL_DIR . "/temp"); $site = $site_pages[0]; if (!empty($site[self::HTTP_CODE]) && empty($site[self::TYPE]) && - $site[self::HTTP_CODE] >=300 && $site[self::HTTP_CODE] <= 400) { + $site[self::HTTP_CODE]>= 300 && $site[self::HTTP_CODE] <= 400) { $site[self::TYPE] = "text/plain"; } $data['TESTPAGE'] = (empty($site[self::PAGE])) ? "" : diff --git a/src/library/indexing_plugins/WordfilterPlugin.php b/src/library/indexing_plugins/WordfilterPlugin.php index 48f132425..ffb8712af 100644 --- a/src/library/indexing_plugins/WordfilterPlugin.php +++ b/src/library/indexing_plugins/WordfilterPlugin.php @@ -484,7 +484,7 @@ EOD; <form method="post" action='?'> <input type="hidden" name="c" value="admin" /> <input type="hidden" name="a" value="pageOptions" /> - <input type="hidden" id='option-type' name="option_type" + <input type="hidden" name="option_type" value="crawl_time" /> <input type="hidden" name="<?= C\CSRF_TOKEN ?>" value="<?= $data[C\CSRF_TOKEN] ?>" /> diff --git a/src/views/elements/ManageusersElement.php b/src/views/elements/ManageusersElement.php index 02905aac0..67694ef5e 100644 --- a/src/views/elements/ManageusersElement.php +++ b/src/views/elements/ManageusersElement.php @@ -49,7 +49,7 @@ class ManageusersElement extends Element */ public function render($data) { - ?> + ?> <div class="current-activity"> <?= $this->renderUserTable($data); ?> <script> @@ -103,10 +103,9 @@ class ManageusersElement extends Element } ?> <th><?= tl('manageusers_element_status') ?></th> <th colspan='2'><?= tl('manageusers_element_actions') ?></th> - </tr> - <?php + </tr><?php $base_url = htmlentities(B\controllerUrl('admin', true)) . - C\CSRF_TOKEN."=".$data[C\CSRF_TOKEN]. "&a=manageUsers"; + C\CSRF_TOKEN . "=" . $data[C\CSRF_TOKEN] . "&a=manageUsers"; if (isset($data['START_ROW'])) { $base_url .= "&start_row=".$data['START_ROW']. "&end_row=".$data['END_ROW']. diff --git a/src/views/elements/PageoptionsElement.php b/src/views/elements/PageoptionsElement.php index 1366a0eb2..aa8a3ef20 100644 --- a/src/views/elements/PageoptionsElement.php +++ b/src/views/elements/PageoptionsElement.php @@ -72,7 +72,7 @@ class PageOptionsElement extends Element <div class='tab-menu-content'> <input type="hidden" name="c" value="admin" /> <input type="hidden" name="posted" value="posted" /> - <input type="hidden" name="option_type" value="<?= + <input id='option-type' type="hidden" name="option_type" value="<?= $data['option_type'] ?>" /> <input type="hidden" name="<?= C\CSRF_TOKEN ?>" value="<?= $data[C\CSRF_TOKEN] ?>" />