diff --git a/.travis.yml b/.travis.yml index 1cc4969027..fb0cfe14c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,84 +17,56 @@ sudo: false env: matrix: - PHPUNIT_ARGS="--exclude-group selenium" - - LINT="yes" global: - secure: "TR3s7lHkREN706g+FeNXl1S0R2fpcI1H+n8USIkl5WBd7S2/NpsZlSfkrgnC7/xRBDXzHwuYd8JQQyAZyrqPEeLqIqlKzxIcTHOiJWGeR/YO7JXsr1Slt/nFqygpIyz8yOh3QIvX6FMzPsamBlUNhRvTAkd2wXPMBpXQlhTVmX8=" - TESTSUITE_BROWSERSTACK_USER=phpMyAdmin - TESTSUITE_USER=root - TESTSUITE_PASSWORD=root + - TESTSUITE_URL=http://127.0.0.1:8000 before_script: - export PATH=~/.composer/vendor/bin/:$PATH - - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" ; - - set -e ; if [[ -z "$LINT" ]] ; then - - composer install --dev --no-interaction ; - - if [[ $TRAVIS_PHP_VERSION != "hhvm" ]] ; then - - git clone --depth=1 git://github.com/zenovich/runkit.git ; - cd runkit ; - if [[ $TRAVIS_PHP_VERSION = "5.6" ]] ; then - wget https://github.com/zenovich/runkit/pull/71.diff ; - patch -p1 < 71.diff ; - fi ; - phpize ; - ./configure ; - make ; - make install ; - cd .. ; - - phpenv config-add test/travis.php.ini ; - - wget https://scrutinizer-ci.com/ocular.phar ; - - fi ; - - if [[ ! -z "$SELENIUM" ]] ; then - - php --server 127.0.0.1:8000 & - - wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip ; - unzip BrowserStackLocal-linux-x64.zip ; - ./BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & - - mysql -uroot -p$TESTSUITE_PASSWORD < examples/create_tables.sql ; - - fi ; - fi + - mysql -uroot -e "CREATE DATABASE test" + - mysql -uroot < examples/create_tables.sql + - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" + - composer install --dev --no-interaction + - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi + - if [ -n "$SELENIUM" ] ; then ./test/install-browserstack ; fi + - if [ -n "$SELENIUM" ] ; then php --server 127.0.0.1:8000 > php.log & fi + - if [ -n "$SELENIUM" ] ; then ~/browserstack/BrowserStackLocal -localIdentifier "travis-$TRAVIS_JOB_NUMBER" -onlyAutomate "$TESTSUITE_BROWSERSTACK_KEY" 127.0.0.1,8000,0 & fi script: + - ant clean - ant locales - - set -e; if [[ -z "$LINT" ]] ; then - export TESTSUITE_URL="http://127.0.0.1:8000" ; - if [[ $TRAVIS_PHP_VERSION == "hhvm" ]] ; then + - ant lint + - set -e; + if [ $TRAVIS_PHP_VERSION == "hhvm" ] ; then ant phpunit-hhvm ; else - if [[ ! -z "$SELENIUM" ]] ; then + if [ ! -z "$SELENIUM" ] ; then ant phpunit-nocoverage ; else ant phpunit ; fi ; - fi ; - else - ant lint ; fi after_script: - - if [[ -f build/logs/clover.xml ]] ; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi - - if [[ -f vendor/bin/coveralls ]] ; then php vendor/bin/coveralls -v || true ; fi + - if [ -f build/logs/clover.xml ] ; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml || true ; fi + - if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi + - if [ -f php.log ] ; then cat php.log ; fi matrix: allow_failures: - - php: 5.5 + - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" - php: hhvm env: PHPUNIT_ARGS="--exclude-group selenium" fast_finish: true include: - - php: 5.5 + - php: 5.6 env: PHPUNIT_ARGS="--group selenium" SELENIUM="yes" cache: directories: - $HOME/.composer/cache/ + - $HOME/browserstack + - $HOME/runkit diff --git a/ChangeLog b/ChangeLog index d241e7002a..b86f0febd5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,7 +14,9 @@ phpMyAdmin - ChangeLog - bug #4614 Separator between "Show All" and "Number of rows" disappears - bug #4615 SQL highlighting in process list breaks on auto refresh - bug #4616 Warning in db structure print view page -- bug Undefined index navwork +- bug Undefined index navwork, savedsearcheswork, fields +- bug #4620 Undefined index while adding to the central columns list +- bug #4618 Page scrolls while GIS visualization is zoomed in/out with mousewheel 4.3.0.0 (not yet released) + rfe #1502 Smart sorting for int keys diff --git a/build.xml b/build.xml index cbd3e2827d..41ab34e7ec 100644 --- a/build.xml +++ b/build.xml @@ -149,7 +149,7 @@ - + diff --git a/composer.json b/composer.json index 117a2c855c..c78d034eb8 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "require-dev": { "satooshi/php-coveralls": ">=0.6", "phpunit/phpunit": "<4.2", - "phpunit/phpunit-selenium": ">=1.2" + "phpunit/phpunit-selenium": ">=1.2", + "scrutinizer/ocular": ">=1.0.0" } } diff --git a/js/tbl_gis_visualization.js b/js/tbl_gis_visualization.js index f75b3fcc74..6d5b874db5 100644 --- a/js/tbl_gis_visualization.js +++ b/js/tbl_gis_visualization.js @@ -215,6 +215,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () { }); $(document).on('mousewheel', '#placeholder', function (event, delta) { + event.preventDefault(); var relCoords = getRelativeCoords(event); if (delta > 0) { //zoom in diff --git a/libraries/Util.class.php b/libraries/Util.class.php index 2e291c1701..34f6b80d57 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -2704,20 +2704,28 @@ class PMA_Util . (! empty($class) ? ' class="' . htmlspecialchars($class) . '"' : '') . '>'; - if (!empty($placeholder)) { - $result .= ''; - } + $resultOptions = ''; + $selected = false; foreach ($choices as $one_choice_value => $one_choice_label) { - $result .= ''; } - $result .= ''; + + if (!empty($placeholder)) { + $resultOptions = '' + . $resultOptions; + } + + $result .= $resultOptions + . ''; return $result; } diff --git a/libraries/central_columns.lib.php b/libraries/central_columns.lib.php index 8544300509..792f0c383c 100644 --- a/libraries/central_columns.lib.php +++ b/libraries/central_columns.lib.php @@ -201,7 +201,7 @@ function PMA_syncUniqueColumns($field_select, $isTable=true, $table=null) if (empty($cfgCentralColumns)) { return PMA_configErrorMessage(); } - $db = $_POST['db']; + $db = $_REQUEST['db']; $pmadb = $cfgCentralColumns['db']; $central_list_table = $cfgCentralColumns['table']; $GLOBALS['dbi']->selectDb($db, $GLOBALS['userlink']); @@ -235,7 +235,7 @@ function PMA_syncUniqueColumns($field_select, $isTable=true, $table=null) } } else { if ($table == null) { - $table = $_POST['table']; + $table = $_REQUEST['table']; } foreach ($field_select as $column) { $cols .= "'" . PMA_Util::sqlAddSlashes($column) . "',"; diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php index 0969f0d3f8..0491fc783e 100644 --- a/libraries/insert_edit.lib.php +++ b/libraries/insert_edit.lib.php @@ -1742,8 +1742,10 @@ function PMA_getParamsForUpdateOrInsert() } else { // new row => use indexes $loop_array = array(); - foreach ($_REQUEST['fields']['multi_edit'] as $key => $dummy) { - $loop_array[] = $key; + if (! empty($_REQUEST['fields'])) { + foreach ($_REQUEST['fields']['multi_edit'] as $key => $dummy) { + $loop_array[] = $key; + } } $using_key = false; $is_insert = true; diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 979f2854b5..1f354fa5b3 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -349,7 +349,9 @@ function PMA_getDiagMessageForFeature($feature_name, $relation_parameter, $messages, $skip_line = true ) { $retval = ' ' . $feature_name . ': '; - if ($GLOBALS['cfgRelation'][$relation_parameter]) { + if (isset($GLOBALS['cfgRelation'][$relation_parameter]) + && $GLOBALS['cfgRelation'][$relation_parameter] + ) { $retval .= $messages['enabled']; } else { $retval .= $messages['disabled']; diff --git a/po/de.po b/po/de.po index c7d51af829..14aca78d3a 100644 --- a/po/de.po +++ b/po/de.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin-docs 4.0.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2014-11-26 08:29-0500\n" -"PO-Revision-Date: 2014-12-01 16:54+0200\n" -"Last-Translator: Jan Erik Zassenhaus \n" +"PO-Revision-Date: 2014-12-04 20:28+0200\n" +"Last-Translator: Ann + J.M. \n" "Language-Team: German " "\n" "Language: de\n" @@ -13843,7 +13843,7 @@ msgstr "Ist ein Fremdschlüssel." #: libraries/tbl_columns_definition_form.lib.php:616 msgid "Pick from Central Columns" -msgstr "Wählen Sie aus zentralen Spalten" +msgstr "Aus zentralen Spalten wählen" #: libraries/tbl_columns_definition_form.lib.php:802 msgid "first" diff --git a/po/uk.po b/po/uk.po index 97bd2cbb40..a9317d6520 100644 --- a/po/uk.po +++ b/po/uk.po @@ -4,17 +4,17 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.4.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2014-11-26 08:29-0500\n" -"PO-Revision-Date: 2014-08-20 00:51+0200\n" -"Last-Translator: Alex Smirnov \n" -"Language-Team: Ukrainian \n" +"PO-Revision-Date: 2014-12-04 23:10+0200\n" +"Last-Translator: Igor \n" +"Language-Team: Ukrainian " +"\n" +"Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: uk\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 1.10-dev\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" +"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 2.1-dev\n" #: changelog.php:36 license.php:28 #, php-format @@ -27,17 +27,17 @@ msgstr "" #: db_central_columns.php:85 msgid "The central list of columns for the current database is empty." -msgstr "" +msgstr "Центральний перелік колонок для поточної бази даних порожній." #: db_central_columns.php:109 msgid "Click to sort." msgstr "Клацніть для сортування." #: db_central_columns.php:125 -#, fuzzy, php-format +#, php-format #| msgid "Showing row(s) %1$s - %2$s" msgid "Showing rows %1$s - %2$s." -msgstr "Показано рядки %1$s - %2$s" +msgstr "Показано рядки %1$s - %2$s." #: db_create.php:61 #, php-format @@ -255,15 +255,13 @@ msgid "Database %1$s has been copied to %2$s." msgstr "Базу даних %1$s було скопійовано до %2$s." #: db_operations.php:259 -#, fuzzy, php-format +#, php-format #| msgid "" #| "The phpMyAdmin configuration storage has been deactivated. To find out " #| "why click %shere%s." msgid "" "The phpMyAdmin configuration storage has been deactivated. %sFind out why%s." -msgstr "" -"Сховище конфігурації phpMyAdmin деактивовано. Для того, щоб довідатись чому, " -"натисніть %sтут%s." +msgstr "Сховище конфігурації phpMyAdmin деактивовано. %sДовідайтесь чому%s." #: db_printview.php:48 db_tracking.php:123 db_tracking.php:263 #: libraries/Menu.class.php:241 libraries/config/messages.inc.php:756 diff --git a/test/install-browserstack b/test/install-browserstack new file mode 100755 index 0000000000..db4ab36fa8 --- /dev/null +++ b/test/install-browserstack @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +mkdir -p ~/browserstack +cd ~/browserstack +if [ ! -f BrowserStackLocal ] ; then + wget https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip + unzip BrowserStackLocal-linux-x64.zip +fi + diff --git a/test/install-runkit b/test/install-runkit new file mode 100755 index 0000000000..4789479b61 --- /dev/null +++ b/test/install-runkit @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +if [ $TRAVIS_PHP_VERSION = "5.6" ] ; then + git clone --depth=1 git://github.com/adrianguenter/runkit.git +else + git clone --depth=1 git://github.com/zenovich/runkit.git +fi +pushd runkit +phpize +./configure +make +make install +popd + +phpenv config-add test/travis.php.ini diff --git a/test/libraries/PMA_central_columns_test.php b/test/libraries/PMA_central_columns_test.php index 0acdc880e6..47c5547f1d 100644 --- a/test/libraries/PMA_central_columns_test.php +++ b/test/libraries/PMA_central_columns_test.php @@ -157,8 +157,8 @@ class PMA_Central_Columns_Test extends PHPUnit_Framework_TestCase public function testPMASyncUniqueColumns() { $field_select = array("col1"); - $_POST['db'] = 'PMA_db'; - $_POST['table'] = 'PMA_table'; + $_REQUEST['db'] = 'PMA_db'; + $_REQUEST['table'] = 'PMA_table'; $this->assertInstanceOf( 'PMA_Message', PMA_syncUniqueColumns($field_select, false) ); @@ -514,4 +514,4 @@ class PMA_Central_Columns_Test extends PHPUnit_Framework_TestCase $result ); } -} \ No newline at end of file +}