diff --git a/common_config.php b/common_config.php index 2ed71ed..649c728 100644 --- a/common_config.php +++ b/common_config.php @@ -39,10 +39,10 @@ $categories=['Unsorted', 'Adult/Porn', 'Communication/Social', 'Cryptocurrencies // Language selection -$L=array( +$L=[ 'de' => 'Deutsch', 'en' => 'English', -); +]; if(isSet($_REQUEST['lang']) && isSet($L[$_REQUEST['lang']])){ $language=$_REQUEST['lang']; if(!isSet($_COOKIE['language']) || $_COOKIE['language']!==$language){ diff --git a/lang_de.php b/lang_de.php index ae39c38..bd92384 100644 --- a/lang_de.php +++ b/lang_de.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -$T=array( +$T=[ 'all' => 'Alle', 'lastadded' => 'Zuletzt hinzugefügt', 'offline' => 'Offline > 1 Woche', @@ -93,5 +93,5 @@ $T=array( 'dateextrequired' => 'Die date Erweiterung von PHP wird benötigt. Bitte installieren Sie diese zuerst.', 'succdbcreate' => 'Die Datenbank wurde erfolgreich erstellt!', 'statusok' => 'Status: OK', -); +]; ?> diff --git a/lang_en.php b/lang_en.php index d4dbd11..f618e23 100644 --- a/lang_en.php +++ b/lang_en.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -$I=array( +$I=[ 'all' => 'All', 'lastadded' => 'Last added', 'offline' => 'Offline > 1 week', @@ -93,5 +93,5 @@ $I=array( 'dateextrequired' => 'The date extension of PHP is required. Please install it first.', 'succdbcreate' => 'The database has successfully been created!', 'statusok' => 'Status: OK', -); +]; ?> diff --git a/lang_update.php b/lang_update.php index 11691f5..9c3fada 100644 --- a/lang_update.php +++ b/lang_update.php @@ -25,7 +25,7 @@ echo "$value){ foreach($I as $id=>$value){ echo "\t'$id' => '".str_replace("'", "\'", $value)."',\n"; } -echo ");\n?>\n"; +echo "];\n?>\n"; $file=ob_get_clean(); file_put_contents("lang_$code.php", $file); ?> diff --git a/onions.php b/onions.php index c76dd5a..330332f 100644 --- a/onions.php +++ b/onions.php @@ -89,7 +89,7 @@ function send_html(){ $addr=strtolower($addr[4]); $md5=md5($addr, true); $stmt=$db->prepare('SELECT description, category FROM ' . PREFIX . 'onions WHERE md5sum=?;'); - $stmt->execute(array($md5)); + $stmt->execute([$md5]); if($desc=$stmt->fetch(PDO::FETCH_ASSOC)){ $category=$desc['category']; echo str_replace('
', "\n", $desc['description']); @@ -155,7 +155,7 @@ function send_html(){ echo "