Hello community, here is the log from the commit of package adminer for openSUSE:Factory checked in at 2020-02-03 11:14:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/adminer (Old) and /work/SRC/openSUSE:Factory/.adminer.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "adminer" Mon Feb 3 11:14:38 2020 rev:23 rq:769296 version:4.7.6 Changes: -------- --- /work/SRC/openSUSE:Factory/adminer/adminer.changes 2019-11-27 13:56:10.864278323 +0100 +++ /work/SRC/openSUSE:Factory/.adminer.new.26092/adminer.changes 2020-02-03 11:14:38.465885047 +0100 @@ -1,0 +2,17 @@ +Fri Jan 31 16:54:17 UTC 2020 - ji...@boombatower.com + +- Update to version 4.7.6: + * Release 4.7.6 + * Fix comparing IPs + * Update readme + * Add example for using SQLite with Editor + * PostgreSQL: Support exporting views + * Disallow connecting to ports > 65535 (bug #730) + * Display time of procedure execution + * Hide columns when rendering + * Speed up alter table form + * Fix clicking on non-input fields in alter table + * Editor: Fix focusing foreign key search in select + * MySQL: Always set foreign_key_checks in export + +------------------------------------------------------------------- Old: ---- adminer-4.7.5.tar.xz New: ---- adminer-4.7.6.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ adminer.spec ++++++ --- /var/tmp/diff_new_pack.9KbSW7/_old 2020-02-03 11:14:39.001885317 +0100 +++ /var/tmp/diff_new_pack.9KbSW7/_new 2020-02-03 11:14:39.005885319 +0100 @@ -1,7 +1,7 @@ # # spec file for package adminer # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2015 Jimmy Berry <ji...@boombatower.com> # # All modifications and additions to the file contributed by third parties @@ -22,13 +22,13 @@ %bcond_with mongodb %bcond_with mssql Name: adminer -Version: 4.7.5 +Version: 4.7.6 Release: 0 Summary: Database management in a single PHP file License: GPL-2.0-only OR Apache-2.0 Group: Productivity/Networking/Web/Frontends -Url: https://www.adminer.org/ +URL: https://www.adminer.org/ Source0: %{name}-%{version}.tar.xz Source1: %{name}-httpd.conf BuildArch: noarch ++++++ _service ++++++ --- /var/tmp/diff_new_pack.9KbSW7/_old 2020-02-03 11:14:39.021885327 +0100 +++ /var/tmp/diff_new_pack.9KbSW7/_new 2020-02-03 11:14:39.021885327 +0100 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">refs/tags/v4.7.5</param> + <param name="revision">refs/tags/v4.7.6</param> <param name="url">https://github.com/vrana/adminer.git</param> <param name="scm">git</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.9KbSW7/_old 2020-02-03 11:14:39.037885335 +0100 +++ /var/tmp/diff_new_pack.9KbSW7/_new 2020-02-03 11:14:39.037885335 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/vrana/adminer.git</param> - <param name="changesrevision">8706bc7c0fd23b69a882a4e073c12a260b5e54d1</param> + <param name="changesrevision">5ef2068837a89309e721a24672b8cdadbe10c179</param> </service> </servicedata> ++++++ adminer-4.7.5.tar.xz -> adminer-4.7.6.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/call.inc.php new/adminer-4.7.6/adminer/call.inc.php --- old/adminer-4.7.5/adminer/call.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/call.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -48,7 +48,9 @@ if (is_object($result)) { select($result, $connection2); } else { - echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected) . "\n"; + echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected) + . " <span class='time'>" . @date("H:i:s") . "</span>\n" // @ - time zone may be not set + ; } } while ($connection->next_result()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/create.inc.php new/adminer-4.7.6/adminer/create.inc.php --- old/adminer-4.7.5/adminer/create.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/create.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -180,6 +180,7 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys); ?> </table> +<?php echo script("editFields();"); ?> </div> <p> <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>"> @@ -220,4 +221,3 @@ ?> <input type="hidden" name="token" value="<?php echo $token; ?>"> </form> -<?php echo script("qs('#form')['defaults'].onclick();" . (support("comment") ? " editingCommentsClick(qs('#form')['comments']);" : "")); ?> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/drivers/pgsql.inc.php new/adminer-4.7.6/adminer/drivers/pgsql.inc.php --- old/adminer-4.7.5/adminer/drivers/pgsql.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/drivers/pgsql.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -711,6 +711,10 @@ $sequences = array(); $status = table_status($table); + if (is_view($status)) { + $view = view($table); + return rtrim("CREATE VIEW " . idf_escape($table) . " AS $view[select]", ";"); + } $fields = fields($table); $indexes = indexes($table); ksort($indexes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/dump.inc.php new/adminer-4.7.6/adminer/dump.inc.php --- old/adminer-4.7.5/adminer/dump.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/dump.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -18,8 +18,8 @@ if ($jush == "sql") { echo "SET NAMES utf8; SET time_zone = '+00:00'; -" . ($_POST["data_style"] ? "SET foreign_key_checks = 0; -SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; +SET foreign_key_checks = 0; +" . ($_POST["data_style"] ? "SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; " : "") . " "; $connection->query("SET time_zone = '+00:00';"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/include/auth.inc.php new/adminer-4.7.6/adminer/include/auth.inc.php --- old/adminer-4.7.5/adminer/include/auth.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/include/auth.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -162,7 +162,7 @@ if (isset($_GET["username"]) && is_string(get_password())) { list($host, $port) = explode(":", SERVER, 2); - if (is_numeric($port) && $port < 1024) { + if (is_numeric($port) && ($port < 1024 || $port > 65535)) { auth_error(lang('Connecting to privileged ports is not allowed.')); } check_invalid_login(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/include/editing.inc.php new/adminer-4.7.6/adminer/include/editing.inc.php --- old/adminer-4.7.5/adminer/include/editing.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/include/editing.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -177,9 +177,7 @@ $structured_types[lang('Foreign keys')] = $foreign_keys; } echo optionlist(array_merge($extra_types, $structured_types), $type); -?></select><?php echo on_help("getTarget(event).value", 1); ?> -<?php echo script("mixin(qsl('select'), {onfocus: function () { lastType = selectValue(this); }, onchange: editingTypeChange});", ""); ?> -<td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><?php echo script("mixin(qsl('input'), {onfocus: editingLengthFocus, oninput: editingLengthChange});", ""); ?><td class="options"><?php +?></select><td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><td class="options"><?php echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>'; echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : ''); echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "CURRENT_TIMESTAMP" : $field["on_update"])) . '</select>' : ''); @@ -265,6 +263,8 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array()) { global $inout; $fields = array_values($fields); + $default_class = (($_POST ? $_POST["defaults"] : adminer_setting("defaults")) ? "" : " class='hidden'"); + $comment_class = (($_POST ? $_POST["comments"] : adminer_setting("comments")) ? "" : " class='hidden'"); ?> <thead><tr> <?php if ($type == "PROCEDURE") { ?><td><?php } ?> @@ -281,8 +281,8 @@ 'pgsql' => "datatype.html#DATATYPE-SERIAL", 'mssql' => "ms186775.aspx", )); ?> -<td id="label-default"><?php echo lang('Default value'); ?> -<?php echo (support("comment") ? "<td id='label-comment'>" . lang('Comment') : ""); ?> +<td id="label-default"<?php echo $default_class; ?>><?php echo lang('Default value'); ?> +<?php echo (support("comment") ? "<td id='label-comment'$comment_class>" . lang('Comment') : ""); ?> <?php } ?> <td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>" . script("row_count = " . count($fields) . ";"); ?> </thead> @@ -296,13 +296,13 @@ ?> <tr<?php echo ($display ? "" : " style='display: none;'"); ?>> <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?> -<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php echo script("qsl('input').oninput = function () { editingNameChange.call(this);" . ($field["field"] != "" || count($fields) > 1 ? "" : " editingAddRow.call(this);") . " };", ""); ?><?php } ?> +<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?> <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"><?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?> <?php if ($type == "TABLE") { ?> <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?> -<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td><?php +<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td<?php echo $default_class; ?>><?php echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php - echo (support("comment") ? "<td><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' data-maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : ""); + echo (support("comment") ? "<td$comment_class><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' data-maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : ""); } echo "<td>"; echo (support("move_col") ? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/include/version.inc.php new/adminer-4.7.6/adminer/include/version.inc.php --- old/adminer-4.7.5/adminer/include/version.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/include/version.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -1,2 +1,2 @@ <?php -$VERSION = "4.7.5"; +$VERSION = "4.7.6"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/procedure.inc.php new/adminer-4.7.6/adminer/procedure.inc.php --- old/adminer-4.7.5/adminer/procedure.inc.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/procedure.inc.php 2020-01-31 11:23:04.000000000 +0100 @@ -48,6 +48,7 @@ } ?> </table> +<?php echo script("editFields();"); ?> </div> <p><?php textarea("definition", $row["definition"]); ?> <p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/static/editing.js new/adminer-4.7.6/adminer/static/editing.js --- old/adminer-4.7.5/adminer/static/editing.js 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/static/editing.js 2020-01-31 11:23:04.000000000 +0100 @@ -207,6 +207,33 @@ +/** Set up event handlers for edit_fields(). +*/ +function editFields() { + var els = qsa('[name$="[field]"]'); + for (var i = 0; i < els.length; i++) { + els[i].oninput = function () { + editingNameChange.call(this); + if (!this.defaultValue) { + editingAddRow.call(this); + } + } + } + els = qsa('[name$="[length]"]'); + for (var i = 0; i < els.length; i++) { + mixin(els[i], {onfocus: editingLengthFocus, oninput: editingLengthChange}); + } + els = qsa('[name$="[type]"]'); + for (var i = 0; i < els.length; i++) { + mixin(els[i], { + onfocus: function () { lastType = selectValue(this); }, + onchange: editingTypeChange, + onmouseover: function (event) { helpMouseover.call(this, event, getTarget(event).value, 1) }, + onmouseout: helpMouseout + }); + } +} + /** Handle clicks on fields editing * @param MouseEvent * @return boolean false to cancel action @@ -214,7 +241,7 @@ function editingClick(event) { var el = getTarget(event); if (!isTag(el, 'input')) { - el = parentTag(target, 'label'); + el = parentTag(el, 'label'); el = el && qs('input', el); } if (el) { @@ -289,7 +316,7 @@ } /** Add table row for next field -* @param boolean +* @param [boolean] * @return boolean false * @this HTMLInputElement */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/adminer/static/functions.js new/adminer-4.7.6/adminer/static/functions.js --- old/adminer-4.7.5/adminer/static/functions.js 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/adminer/static/functions.js 2020-01-31 11:23:04.000000000 +0100 @@ -444,7 +444,8 @@ var divs = qsa('div', el); for (var i=0; i < divs.length; i++) { var div = divs[i]; - if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) { + var el = qs('[name$="[col]"]', div); + if (el && selectValue(el) == name) { break; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/changes.txt new/adminer-4.7.6/changes.txt --- old/adminer-4.7.5/changes.txt 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/changes.txt 2020-01-31 11:23:04.000000000 +0100 @@ -1,3 +1,12 @@ +Adminer 4.7.6 (released 2020-01-31): +Speed up alter table form (regression from 4.4.0) +Fix clicking on non-input fields in alter table (regression from 4.6.2) +Display time of procedure execution +Disallow connecting to ports > 65535 (bug #730) +MySQL: Always set foreign_key_checks in export +PostgreSQL: Support exporting views +Editor: Fix focusing foreign key search in select + Adminer 4.7.5 (released 2019-11-13): Add id="" to cells with failed inline edit (bug #708) PostgreSQL: Fix getting default value in PostgreSQL 12 (bug #719) @@ -681,7 +690,7 @@ Click on row selects it Fix Editor date format Fix long SQL query crash (bug #2839231) -Speedup of simple alter table +Speed up simple alter table Traditional Chinese translation Adminer 2.0.0 (released 2009-08-06): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/editor/sqlite.php new/adminer-4.7.6/editor/sqlite.php --- old/adminer-4.7.5/editor/sqlite.php 1970-01-01 01:00:00.000000000 +0100 +++ new/adminer-4.7.6/editor/sqlite.php 2020-01-31 11:23:04.000000000 +0100 @@ -0,0 +1,21 @@ +<?php +function adminer_object() { + include_once "../plugins/plugin.php"; + include_once "../plugins/login-password-less.php"; + + class AdminerCustomization extends AdminerPlugin { + function loginFormField($name, $heading, $value) { + return parent::loginFormField($name, $heading, str_replace('value="server"', 'value="sqlite"', $value)); + } + function database() { + return "PATH_TO_YOUR_SQLITE_HERE"; + } + } + + return new AdminerCustomization(array( + // TODO: inline the result of password_hash() so that the password is not visible in source codes + new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)), + )); +} + +include "./index.php"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/plugins/login-ip.php new/adminer-4.7.6/plugins/login-ip.php --- old/adminer-4.7.5/plugins/login-ip.php 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/plugins/login-ip.php 2020-01-31 11:23:04.000000000 +0100 @@ -23,7 +23,7 @@ function login($login, $password) { foreach ($this->ips as $ip) { - if (strncasecmp($_SERVER["REMOTE_ADDR"], $ip, strlen($ip))) { + if (strncasecmp($_SERVER["REMOTE_ADDR"], $ip, strlen($ip)) == 0) { if (!$this->forwarded_for) { return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/adminer-4.7.5/readme.txt new/adminer-4.7.6/readme.txt --- old/adminer-4.7.5/readme.txt 2019-11-13 08:17:14.000000000 +0100 +++ new/adminer-4.7.6/readme.txt 2020-01-31 11:23:04.000000000 +0100 @@ -12,6 +12,7 @@ plugins/readme.txt - Plugins for Adminer and Adminer Editor adminer/plugin.php - Plugin demo adminer/sqlite.php - Development version of Adminer with SQLite allowed +editor/sqlite.php - Development version of Editor with SQLite allowed adminer/designs.php - Development version of Adminer with adminer.css switcher compile.php - Create a single file version lang.php - Update translations