Skip to content

Commit

Permalink
Merge branch 'staging' into fix-route-link-ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed May 10, 2019
2 parents 2bf9019 + 91ebd57 commit 7dba0f1
Show file tree
Hide file tree
Showing 47 changed files with 439 additions and 210 deletions.
61 changes: 37 additions & 24 deletions .appveyor.yml
Expand Up @@ -9,15 +9,30 @@ branches:

## Build matrix for lowest and highest possible targets
environment:
DLLVersion: "5.6.1"
PHPBuild: "x64"
VC: "vc15"
matrix:
- php_ver_target: 5.6
PHPBuild: "x86"
VC: "vc11"
WINCACHE: "1.3.7.12"
- php_ver_target: 7.0
DLLVersion: "5.3.0"
VC: "vc14"
WINCACHE: "2.0.0.8"
- php_ver_target: 7.1
DLLVersion: "5.3.0"
VC: "vc14"
WINCACHE: "2.0.0.8"
- php_ver_target: 7.2
DLLVersion: "5.3.0"
- php_ver_target: 7.3

init:
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1 # This var relates to caching the php install
- SET PHP=1 # This var relates to caching the php install
- SET ANSICON=121x90 (121x90)
services:
- mssql2014
Expand All @@ -31,12 +46,8 @@ install:
- ps: >-
If ($env:php_ver_target -eq "5.6") {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y --forcex86 php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
$VC = "vc11"
$PHPBuild = "x86"
} Else {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
$VC = "vc14"
$PHPBuild = "x64"
}
- appveyor-retry cinst -y sqlite
- cd C:\tools\php
Expand All @@ -53,20 +64,21 @@ install:
copy SQLSRV\php_pdo_sqlsrv_56_nts.dll ext\php_pdo_sqlsrv_nts.dll
Remove-Item C:\tools\php\* -include .zip
} Else {
$DLLVersion = "4.3.0"
cd c:\tools\php\ext
$source = "http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($env:DLLVersion)/php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
$source = "http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip"
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/sqlsrv/$($env:DLLVersion)/php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
$source = "https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php_ver_target)-nts-vc14-x64.zip > $null
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($env:DLLVersion)/php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_pdo_sqlsrv-$($env:DLLVersion)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
Remove-Item c:\tools\php\ext* -include .zip
cd c:\tools\php}}
cd c:\tools\php
}
}
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
Expand Down Expand Up @@ -94,18 +106,19 @@ install:
- IF %PHP%==1 echo extension=php_curl.dll >> php.ini
# Get the Wincache DLLs
- ps: >-
If ($env:PHP -eq "1") {
If ($env:php_ver_target -eq "5.6") {$wincache = "1.3.7.12"} Else {$wincache = "2.0.0.8"}
If ($env:PHP -eq "1" -and $env:WINCACHE) {
cd c:\tools\php\ext
$source = "http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
$destination = "c:\tools\php\ext\php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip"
$source = "https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
$destination = "c:\tools\php\ext\php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip"
Invoke-WebRequest $source -OutFile $destination
#appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/wincache/$($wincache)/php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip
7z x -y php_wincache-$($wincache)-$($env:php_ver_target)-nts-$($VC)-$($PHPBuild).zip > $null
#appveyor-retry appveyor DownloadFile https://windows.php.net/downloads/pecl/releases/wincache/$($env:WINCACHE)/php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip
7z x -y php_wincache-$($env:WINCACHE)-$($env:php_ver_target)-nts-$($env:VC)-$($env:PHPBuild).zip > $null
Remove-Item C:\tools\php\ext* -include .zip
cd c:\tools\php}
- IF %PHP%==1 echo extension=php_wincache.dll >> php.ini
- IF %PHP%==1 echo wincache.enablecli = 1 >> php.ini
cd c:\tools\php
Add-Content php.ini "`nextension=php_wincache.dll"
Add-Content php.ini "`wincache.enablecli = 1"
Add-Content php.ini "`n"
}
- IF %PHP%==1 echo zend_extension=php_opcache.dll >> php.ini
- IF %PHP%==1 echo opcache.enable_cli=1 >> php.ini
- IF %PHP%==1 echo extension=php_ldap.dll >> php.ini
Expand Down
71 changes: 48 additions & 23 deletions .drone.yml
@@ -1,16 +1,30 @@
pipeline:
clone:
image: plugins/git
depth: 1
---
kind: pipeline
name: default

phpcs:
clone:
depth: 42

steps:
- name: phpcs
image: joomlaprojects/docker-phpcs
commands:
- echo $(date)
- /root/.composer/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
- echo $(date)

javascript:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
restore: true
mount:
- ./tests/javascript/node_modules
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache

- name: javascript
image: joomlaprojects/docker-systemtests:latest
commands:
- echo $(date)
Expand All @@ -26,29 +40,40 @@ pipeline:
- tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run
- echo $(date)

analysis3x:
- name: rebuild-cache
image: drillster/drone-volume-cache
settings:
rebuild: true
mount:
- ./tests/javascript/node_modules
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache

- name: analysis3x
image: rips/rips-cli:1.2.1
secrets: [rips_username, rips_password]
when:
branch: staging
commands:
- export RIPS_BASE_URI='https://api.rips.joomla.org'
- export RIPS_USERNAME=$RIPS_USERNAME
- export RIPS_PASSWORD=$RIPS_PASSWORD
- if [ $DRONE_REPO_OWNER != 'joomla' ]; then echo "The analysis check only run on the main repos"; exit 0; fi
- rips-cli rips:scan:start -a 1 -t 1 -p $(pwd) -t 1 -R -k -T $DRONE_REPO_OWNER-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
- if [ $DRONE_REPO_NAMESPACE != 'joomla' ]; then echo "The analysis check only run on the main repos"; exit 0; fi
- rips-cli rips:scan:start -a 1 -t 1 -p $(pwd) -t 1 -R -k -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
environment:
RIPS_USERNAME:
from_secret: RIPS_USERNAME
RIPS_PASSWORD:
from_secret: RIPS_PASSWORD

analysis4x:
image: rips/rips-cli:1.2.1
secrets: [rips_username, rips_password]
when:
branch: 4.0-dev
commands:
- export RIPS_BASE_URI='https://api.rips.joomla.org'
- export RIPS_USERNAME=$RIPS_USERNAME
- export RIPS_PASSWORD=$RIPS_PASSWORD
- if [ $DRONE_REPO_OWNER != 'joomla' ]; then echo "The analysis check only run on the main repos"; exit 0; fi
- rips-cli rips:scan:start -a 3 -t 1 -p $(pwd) -t 1 -R -k -T $DRONE_REPO_OWNER-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
volumes:
- name: cache
host:
path: /tmp/cache

branches:
exclude: [ l10n_* ]
---
kind: signature
hmac: f8aa0f7552eb7c32c5585668552afffadd07a23cbbc9c1bb41bfad4df6679b3c

...
26 changes: 14 additions & 12 deletions .travis.yml
Expand Up @@ -6,35 +6,37 @@ language: php
env:
global:
- RUN_UNIT_TESTS="yes"
- INSTALL_MEMCACHE="yes"
- INSTALL_APCU="yes"
- INSTALL_MEMCACHED="yes"
- INSTALL_REDIS="yes"

matrix:
fast_finish: true
include:
- php: 7.0
env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
- php: 7.1
env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
# Requires older Precise image
- php: 5.3
env: INSTALL_APC="yes"
env:
- INSTALL_APC="yes"
- INSTALL_APCU="no"
- INSTALL_MEMCACHE="yes"
sudo: true
dist: precise
# The new Trusty image has issues with running APC, do not enable it here
- php: 5.4
env: INSTALL_APC="no"
env:
- INSTALL_APCU="no"
- INSTALL_MEMCACHE="yes"
- php: 5.5
env: INSTALL_APCU="yes"
env:
- INSTALL_MEMCACHE="yes"
- php: 5.6
env: INSTALL_APCU="yes"
env:
- INSTALL_MEMCACHE="yes"
- php: 7.0
- php: 7.1
- php: 7.2
env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no"
- php: 7.3
env: INSTALL_APCU="yes" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no"
- php: nightly
env: INSTALL_APCU="no" INSTALL_MEMCACHE="no" INSTALL_MEMCACHED="no"
allow_failures:
- php: 7.3
- php: nightly
Expand Down
@@ -0,0 +1 @@
UPDATE `#__content_types` SET `content_history_options` = REPLACE(`content_history_options`, '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\"]', '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\", \"ordering\"]');
@@ -0,0 +1 @@
UPDATE "#__content_types" SET "content_history_options" = REPLACE("content_history_options", '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\"]', '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\", \"ordering\"]');
@@ -0,0 +1 @@
UPDATE [#__content_types] SET [content_history_options] = REPLACE([content_history_options], '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\"]', '\"ignoreChanges\":[\"modified_by\", \"modified\", \"checked_out\", \"checked_out_time\", \"version\", \"hits\", \"ordering\"]');
Expand Up @@ -23,20 +23,11 @@
<?php $name = $this->escape($item->name); ?>
<?php $desc = JHtml::_('string.truncate', $this->escape(strip_tags($item->desc)), 200); ?>
<?php $short_desc = JHtml::_('string.truncate', $this->escape(strip_tags($item->desc)), 90); ?>

<?php if ($document->direction != 'rtl') : ?>
<li>
<a href="<?php echo JRoute::_($link); ?>">
<strong><?php echo $name; ?></strong></a>
<small class="hasPopover" data-placement="right" title="<?php echo $name; ?>" data-content="<?php echo $desc; ?>"><?php echo $short_desc; ?></small>
</li>
<?php else : ?>
<li>
<small rel="popover" data-placement="left" title="<?php echo $name; ?>" data-content="<?php echo $desc; ?>"><?php echo $short_desc; ?></small>
<a href="<?php echo JRoute::_($link); ?>">
<strong><?php echo $name; ?></strong></a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
Expand Up @@ -92,7 +92,7 @@ protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_users');

JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_GROUP_TITLE', $this->group->id, $this->group->title), 'users groups');
JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_GROUP_TITLE', $this->group->id, $this->escape($this->group->title)), 'users groups');
JToolbarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');

if ($canDo->get('core.admin') || $canDo->get('core.options'))
Expand Down
Expand Up @@ -92,7 +92,7 @@ protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_users');

JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_USER_TITLE', $this->user->id, $this->user->name), 'users user');
JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_USER_TITLE', $this->user->id, $this->escape($this->user->name)), 'users user');
JToolbarHelper::cancel('user.cancel', 'JTOOLBAR_CLOSE');

if ($canDo->get('core.admin') || $canDo->get('core.options'))
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/en-GB.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<metafile version="3.8" client="administrator">
<name>English (en-GB)</name>
<version>3.9.6</version>
<creationDate>April 2019</creationDate>
<version>3.9.7</version>
<creationDate>May 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/install.xml
Expand Up @@ -2,8 +2,8 @@
<extension version="3.8" client="administrator" type="language" method="upgrade">
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>3.9.6</version>
<creationDate>April 2019</creationDate>
<version>3.9.7</version>
<creationDate>May 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/files/joomla.xml
Expand Up @@ -6,8 +6,8 @@
<authorUrl>www.joomla.org</authorUrl>
<copyright>(C) 2005 - 2019 Open Source Matters. All rights reserved</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>3.9.6-dev</version>
<creationDate>April 2019</creationDate>
<version>3.9.7-dev</version>
<creationDate>May 2019</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>

<scriptfile>administrator/components/com_admin/script.php</scriptfile>
Expand Down
4 changes: 2 additions & 2 deletions administrator/manifests/packages/pkg_en-GB.xml
Expand Up @@ -2,8 +2,8 @@
<extension type="package" version="3.8" method="upgrade">
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>3.9.6.1</version>
<creationDate>April 2019</creationDate>
<version>3.9.7.1</version>
<creationDate>May 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/templates/isis/error.php
Expand Up @@ -160,7 +160,7 @@
<li>
<span>
<span class="icon-user"></span>
<strong><?php echo $user->name; ?></strong>
<strong><?php echo htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8'); ?></strong>
</span>
</li>
<li class="divider"></li>
Expand Down
2 changes: 1 addition & 1 deletion administrator/templates/isis/index.php
Expand Up @@ -218,7 +218,7 @@ function colorIsLight($color)
<li>
<span>
<span class="icon-user"></span>
<strong><?php echo $user->name; ?></strong>
<strong><?php echo htmlspecialchars($user->name, ENT_QUOTES, 'UTF-8'); ?></strong>
</span>
</li>
<li class="divider"></li>
Expand Down
2 changes: 2 additions & 0 deletions build/travis/phpenv/apcu-7.4.ini
@@ -0,0 +1,2 @@
apc.enabled=true
apc.enable_cli=true
3 changes: 3 additions & 0 deletions components/com_search/views/search/tmpl/default_form.php
Expand Up @@ -18,6 +18,9 @@
<form id="searchForm" action="<?php echo JRoute::_('index.php?option=com_search'); ?>" method="post">
<div class="btn-toolbar">
<div class="btn-group pull-left">
<label for="search-searchword" class="element-invisible">
<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>
</label>
<input type="text" name="searchword" title="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" placeholder="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" id="search-searchword" size="30" maxlength="<?php echo $upper_limit; ?>" value="<?php echo $this->escape($this->origkeyword); ?>" class="inputbox" />
</div>
<div class="btn-group pull-left">
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/helpers/legacyrouter.php
Expand Up @@ -106,7 +106,7 @@ public function build(&$query, &$segments)
}

// Check to see if we have found the login menu item.
if (empty($login) && $item->query['view'] === 'login')
if (empty($login) && $item->query['view'] === 'login' && (empty($item->query['layout']) || $item->query['layout'] === 'default'))
{
$login = $item->id;

Expand Down
2 changes: 1 addition & 1 deletion components/com_users/helpers/route.php
Expand Up @@ -61,7 +61,7 @@ public static function getLoginRoute()
// Search for a suitable menu id.
foreach ($items as $item)
{
if (isset($item->query['view']) && $item->query['view'] === 'login')
if (isset($item->query['view']) && $item->query['view'] === 'login' && (empty($item->query['layout']) || $item->query['layout'] === 'default'))
{
return $item->id;
}
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-GB/en-GB.xml
Expand Up @@ -3,8 +3,8 @@
version="3.8"
client="installation">
<name>English (United Kingdom)</name>
<version>3.9.6</version>
<creationDate>April 2019</creationDate>
<version>3.9.7</version>
<creationDate>May 2019</creationDate>
<author>Joomla! Project</author>
<copyright>Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
Expand Down

0 comments on commit 7dba0f1

Please sign in to comment.