mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
PHP: Use namespace
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
add_driver("clickhouse", "ClickHouse (alpha)");
|
||||
|
||||
if (isset($_GET["clickhouse"])) {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
add_driver("elastic", "Elasticsearch 7 (beta)");
|
||||
|
||||
if (isset($_GET["elastic"])) {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
add_driver("elastic5", "Elasticsearch 5 (beta)");
|
||||
|
||||
if (isset($_GET["elastic5"])) {
|
||||
|
@@ -3,6 +3,8 @@
|
||||
* @author Steve Krämer
|
||||
*/
|
||||
|
||||
namespace Adminer;
|
||||
|
||||
add_driver('firebird', 'Firebird (alpha)');
|
||||
|
||||
if (isset($_GET["firebird"])) {
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
namespace Adminer;
|
||||
|
||||
add_driver("simpledb", "SimpleDB");
|
||||
|
||||
if (isset($_GET["simpledb"])) {
|
||||
|
@@ -30,7 +30,7 @@ class AdminerEditCalendar {
|
||||
|
||||
function head() {
|
||||
echo $this->prepend;
|
||||
if ($this->langPath && function_exists('get_lang')) { // since Adminer 3.2.0
|
||||
if ($this->langPath) {
|
||||
$lang = get_lang();
|
||||
$lang = ($lang == "zh" ? "zh-CN" : ($lang == "zh-tw" ? "zh-TW" : $lang));
|
||||
if ($lang != "en" && file_exists(sprintf($this->langPath, $lang))) {
|
||||
|
@@ -19,13 +19,10 @@ class AdminerTinymce {
|
||||
}
|
||||
|
||||
function head() {
|
||||
$lang = "en";
|
||||
if (function_exists('get_lang')) { // since Adminer 3.2.0
|
||||
$lang = get_lang();
|
||||
$lang = ($lang == "zh" ? "zh-cn" : ($lang == "zh-tw" ? "zh" : $lang));
|
||||
if (!file_exists(dirname($this->path) . "/langs/$lang.js")) {
|
||||
$lang = "en";
|
||||
}
|
||||
$lang = get_lang();
|
||||
$lang = ($lang == "zh" ? "zh-cn" : ($lang == "zh-tw" ? "zh" : $lang));
|
||||
if (!file_exists(dirname($this->path) . "/langs/$lang.js")) {
|
||||
$lang = "en";
|
||||
}
|
||||
echo script_src($this->path);
|
||||
?>
|
||||
|
@@ -52,11 +52,8 @@ class AdminerWymeditor {
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
static $lang = "";
|
||||
if (!$lang && preg_match("~text~", $field["type"]) && preg_match("~_html~", $field["field"])) {
|
||||
$lang = "en";
|
||||
if (function_exists('get_lang')) { // since Adminer 3.2.0
|
||||
$lang = get_lang();
|
||||
$lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
|
||||
}
|
||||
$lang = get_lang();
|
||||
$lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
|
||||
return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea>" . script("
|
||||
jQuery('#fields-" . js_escape($field["field"]) . "').wymeditor({ updateSelector: '#form [type=\"submit\"]', lang: '$lang'" . ($this->options ? ", $this->options" : "") . " });
|
||||
");
|
||||
|
Reference in New Issue
Block a user