Commit cc6bddc6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

removed deprecated starts_with calls

parent b955a013
......@@ -149,7 +149,7 @@ class MetaGer
$focusPages = [];
foreach ($this->request->all() as $key => $value) {
if (starts_with($key, 'engine_') && $value === 'on') {
if (stripos($key, 'engine_') === 0 && $value === 'on') {
$focusPages[] = $key;
}
}
......@@ -1684,7 +1684,7 @@ class MetaGer
$foki = array_keys($sumaFile['foki']);
foreach ($cookies as $key => $value) {
if (starts_with($key, [$this->getFokus() . "_setting_", $this->getFokus() . "_engine_", $this->getFokus() . "_blpage"])) {
if (in_array($key, [$this->getFokus() . "_setting_", $this->getFokus() . "_engine_", $this->getFokus() . "_blpage"])) {
$count++;
continue;
}
......
......@@ -2,6 +2,7 @@
namespace App\Models;
/* Die Klasse Result sammelt alle Informationen über ein einzelnes Suchergebnis.
* Die Results werden von den Suchmaschinenspezifischen Parser-Skripten erstellt.
*/
......@@ -424,7 +425,7 @@ class Result
*/
public function getUrlElements($url)
{
if (!starts_with($url, "http")) {
if (stripos($url, "http") !== 0) {
$url = "http://" . $url;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment