pub / serci

Search the web with !keywords
git clone https://https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

commit 6570e8771d6e15fcfd07a35621f53c2d498e2795
parent 414342407f97d0b2a2e874223b5bc0ff0545014a
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Thu, 17 Oct 2024 18:47:14 +0200

fix: temporarily comment unneeded mappings

Diffstat:
Mlib/generate_mappings.php | 62+++++++++++++++++++++++++++++++-------------------------------
Mlib/read_mappings.php | 18+++++++++---------
2 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/lib/generate_mappings.php b/lib/generate_mappings.php @@ -24,36 +24,36 @@ fclose($file); /* Category to Search Engine mapping ---------------------------------------- */ -$searchcats = array(); -foreach (array_keys($categories) as $category) { - - $currentcat = array(); - foreach (array_keys($searches) as $search) { - - /* Skrip, if search engine is not in current category */ - if ( - array_search($category, $searches[$search]["categories"]) - === false - ) { - continue; - } - - /* Add to current category */ - array_push($currentcat, $search); - } - - $searchcats[$category] = $currentcat; -} - -/* Export the mapping to file */ -$file = fopen( - $searchcats_file, - "w" -); -fwrite( - $file, - json_encode($searchcats) -); -fclose($file); +// $searchcats = array(); +// foreach (array_keys($categories) as $category) { + +// $currentcat = array(); +// foreach (array_keys($searches) as $search) { + +// /* Skrip, if search engine is not in current category */ +// if ( +// array_search($category, $searches[$search]["categories"]) +// === false +// ) { +// continue; +// } + +// /* Add to current category */ +// array_push($currentcat, $search); +// } + +// $searchcats[$category] = $currentcat; +// } + +// /* Export the mapping to file */ +// $file = fopen( +// $searchcats_file, +// "w" +// ); +// fwrite( +// $file, +// json_encode($searchcats) +// ); +// fclose($file); ?> diff --git a/lib/read_mappings.php b/lib/read_mappings.php @@ -14,14 +14,14 @@ fclose($file); /* Category to Search Engine mapping ---------------------------------------- */ -$file = fopen( - $searchcats_file, - "r" -); -$searchcats = json_decode( - fread($file, filesize($searchcats_file)), - true -); -fclose($file); +// $file = fopen( +// $searchcats_file, +// "r" +// ); +// $searchcats = json_decode( +// fread($file, filesize($searchcats_file)), +// true +// ); +// fclose($file); ?>