File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,14 @@ public function displayAjaxSearchCron()
565
565
// Considering the indexing task can be really long, we ask the PHP process to not stop before 2 hours.
566
566
ini_set ('max_execution_time ' , '7200 ' );
567
567
Search::indexation (Tools::getValue ('full ' ));
568
- if (Tools::getValue ('redirect ' )) {
568
+
569
+ /*
570
+ * If redirect parameter was specified in the URL and we have the URL the user came from,
571
+ * we will redirect him back. This is used in backoffice so the user lands back to the config form.
572
+ *
573
+ * In CRON or CLI (referer is missing), it will die here. Even if redirect is in the URL.
574
+ */
575
+ if (Tools::getValue ('redirect ' ) && !empty ($ _SERVER ['HTTP_REFERER ' ])) {
569
576
Tools::redirectAdmin ($ _SERVER ['HTTP_REFERER ' ] . '&conf=4 ' );
570
577
}
571
578
}
You can’t perform that action at this time.
0 commit comments