diff --git a/.travis.yml b/.travis.yml index 77e5ca62dc..4c675666a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ language: php +services: + - mysql + php: - "7.1" - "7.0" @@ -29,7 +32,7 @@ install: before_script: - export PATH=~/.composer/vendor/bin/:$PATH - - mysql -uroot -e "CREATE DATABASE test" + - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test" - mysql -uroot < sql/create_tables.sql - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')" - ./test/start-local-server @@ -58,6 +61,18 @@ matrix: env: CI_MODE=release - php: "7.0" env: CI_MODE=docs + - os: osx + language: generic + env: CI_MODE=test + before_install: + - brew tap homebrew/php + - brew update + - brew install ant gettext php70 mariadb + - brew link --force gettext + - curl https://getcomposer.org/installer | php + - ln -s /Users/travis/build/phpmyadmin/phpmyadmin/composer.phar /usr/local/bin/composer + - mysql.server start + cache: directories: - $HOME/.composer/cache/ diff --git a/libraries/Util.php b/libraries/Util.php index 1333fc2069..684e8c4c58 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -1603,6 +1603,15 @@ class Util $date ); + /* Fill in AM/PM */ + $hours = (int)date('H', $timestamp); + if ($hours >= 12) { + $am_pm = _pgettext('AM/PM indication in time', 'PM'); + } else { + $am_pm = _pgettext('AM/PM indication in time', 'AM'); + } + $date = preg_replace('@%[pP]@', $am_pm, $date); + $ret = strftime($date, $timestamp); // Some OSes such as Win8.1 Traditional Chinese version did not produce UTF-8 // output here. See https://sourceforge.net/p/phpmyadmin/bugs/4207/ diff --git a/test/ci-test b/test/ci-test index 49f87891f8..da8bd65c60 100755 --- a/test/ci-test +++ b/test/ci-test @@ -4,7 +4,7 @@ ant locales export PHPUNIT_ARGS="--exclude-group selenium" -if [ $TRAVIS_PHP_VERSION = "hhvm" ] ; then +if [ "$TRAVIS_PHP_VERSION" = "hhvm" ] ; then ant phpunit-hhvm else ant phpunit diff --git a/test/install-runkit b/test/install-runkit index 7fde346b05..180d4ca139 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -6,7 +6,7 @@ if [ -n "$GATEWAY_INTERFACE" ] ; then exit 1 fi -if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" -o "$TRAVIS_PHP_VERSION" = "7.1" ] ; then +if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" -o "$TRAVIS_PHP_VERSION" = "7.1" -o "$TRAVIS_OS_NAME" = "osx" ] ; then exit 0 fi