diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php
index 5f2f2e76..7fd52fe0 100644
--- a/adminer/include/connect.inc.php
+++ b/adminer/include/connect.inc.php
@@ -48,8 +48,7 @@ if (
echo "
" . lang('Loaded plugins') . ":\n
\n";
foreach ($adminer->plugins as $plugin) {
$reflection = new \ReflectionObject($plugin);
- preg_match('~^/[\s*]+(.+)\n~', $reflection->getDocComment(), $match);
- echo "- " . get_class($plugin) . "" . h($match ? ": $match[1]" : "") . "\n";
+ echo "
- " . get_class($plugin) . "" . h(preg_match('~^/[\s*]+(.+)~', $reflection->getDocComment(), $match) ? ": $match[1]" : "") . "\n";
}
echo "
\n";
}
diff --git a/plugins/edit-calendar.php b/plugins/edit-calendar.php
index 466e7a58..00b93a6d 100644
--- a/plugins/edit-calendar.php
+++ b/plugins/edit-calendar.php
@@ -16,19 +16,17 @@ class AdminerEditCalendar {
* @param string path to language file, %s stands for language code
*/
function __construct($prepend = null, $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
- if ($prepend === null) {
- $prepend = "\n"
- . Adminer\script_src("jquery-ui/jquery.js")
- . Adminer\script_src("jquery-ui/jquery-ui.js")
- . Adminer\script_src("jquery-ui/jquery-ui-timepicker-addon.js")
- ;
- }
$this->prepend = $prepend;
$this->langPath = $langPath;
}
function head($dark = null) {
- echo $this->prepend;
+ echo ($this->prepend !== null ? $this->prepend :
+ "\n"
+ . Adminer\script_src("jquery-ui/jquery.js")
+ . Adminer\script_src("jquery-ui/jquery-ui.js")
+ . Adminer\script_src("jquery-ui/jquery-ui-timepicker-addon.js")
+ );
if ($this->langPath) {
$lang = Adminer\get_lang();
$lang = ($lang == "zh" ? "zh-CN" : ($lang == "zh-tw" ? "zh-TW" : $lang));