Skip to content

Commit

Permalink
Merge branch 'staging' into patch-81
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 committed May 18, 2019
2 parents f149a7f + f6efc5a commit dc2b303
Show file tree
Hide file tree
Showing 40 changed files with 144 additions and 143 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
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 @@
ALTER TABLE `#__session` ADD INDEX `client_id_guest` (`client_id`, `guest`);
@@ -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 @@
CREATE INDEX "#__session_idx_client_id_guest" ON "#__session" ("client_id", "guest");
@@ -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,5 @@
CREATE NONCLUSTERED INDEX [idx_client_id_guest] ON [#__session]
(
[client_id] ASC,
[guest] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);
@@ -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 @@ -135,8 +135,8 @@
?>
</div>
</td>
<td class="nowrap has-context">
<div class="pull-left">
<td class="has-context">
<div class="pull-left break-word">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'contacts.', $canCheckin); ?>
<?php endif; ?>
Expand Down
Expand Up @@ -13,7 +13,7 @@

$params = new Registry;
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params));
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params, 0));
?>

<li class="imgOutline thumbnail height-80 width-80 center">
Expand All @@ -27,4 +27,4 @@
</a>
</li>
<?php
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params));
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params, 0));
Expand Up @@ -15,7 +15,7 @@
$user = JFactory::getUser();
$params = new Registry;
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_doc, &$params, 0));
?>

<tr>
Expand All @@ -39,4 +39,4 @@
</td>
<?php endif;?>
</tr>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_doc, &$params, 0));
Expand Up @@ -17,7 +17,7 @@
?>

<?php foreach ($this->documents as $i => $doc) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$doc, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$doc, &$params, 0)); ?>
<tr>
<?php if ($this->canDelete) : ?>
<td>
Expand Down Expand Up @@ -50,5 +50,5 @@
<?php endif; ?>

</tr>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$doc, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$doc, &$params, 0)); ?>
<?php endforeach; ?>
Expand Up @@ -16,7 +16,7 @@
$user = JFactory::getUser();
$params = new Registry;
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params));
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params, 0));
?>

<tr>
Expand All @@ -39,4 +39,4 @@
</td>
<?php endif;?>
</tr>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params));
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params, 0));
Expand Up @@ -19,7 +19,7 @@
?>

<?php foreach ($this->images as $i => $image) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$image, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$image, &$params, 0)); ?>
<tr>
<?php if ($this->canDelete) : ?>
<td>
Expand Down Expand Up @@ -55,5 +55,5 @@
</td>
<?php endif; ?>
</tr>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$image, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$image, &$params, 0)); ?>
<?php endforeach; ?>
Expand Up @@ -16,7 +16,7 @@
$user = JFactory::getUser();
$params = new Registry;
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_video, &$params));
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_video, &$params, 0));

JFactory::getDocument()->addScriptDeclaration("
jQuery(document).ready(function($){
Expand Down Expand Up @@ -51,4 +51,4 @@
</tr>

<?php
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_video, &$params));
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_video, &$params, 0));
Expand Up @@ -26,7 +26,7 @@
?>

<?php foreach ($this->videos as $i => $video) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$video, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$video, &$params, 0)); ?>
<tr>
<?php if ($this->canDelete) : ?>
<td>
Expand Down Expand Up @@ -63,5 +63,5 @@
<?php endif; ?>
</tr>

<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$video, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$video, &$params, 0)); ?>
<?php endforeach; ?>
Expand Up @@ -16,7 +16,7 @@
?>

<?php foreach ($this->documents as $i => $doc) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$doc, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$doc, &$params, 0)); ?>
<li class="imgOutline thumbnail height-80 width-80 center">
<?php if ($this->canDelete) : ?>
<a class="close delete-item" target="_top" href="index.php?option=com_media&amp;task=file.delete&amp;tmpl=index&amp;<?php echo JSession::getFormToken(); ?>=1&amp;folder=<?php echo rawurlencode($this->state->folder); ?>&amp;rm[]=<?php echo $this->escape($doc->name); ?>" rel="<?php echo $this->escape($doc->name); ?>" title="<?php echo JText::_('JACTION_DELETE'); ?>">&#215;</a>
Expand All @@ -36,5 +36,5 @@
<?php echo JHtml::_('string.truncate', $this->escape($doc->name), 10, false); ?>
</div>
</li>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$doc, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$doc, &$params, 0)); ?>
<?php endforeach; ?>
Expand Up @@ -16,7 +16,7 @@
?>

<?php foreach ($this->images as $i => $img) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$img, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$img, &$params, 0)); ?>
<li class="imgOutline thumbnail height-80 width-80 center">
<?php if ($this->canDelete) : ?>
<a class="close delete-item" target="_top"
Expand All @@ -40,5 +40,5 @@
</a>
</div>
</li>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$img, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$img, &$params, 0)); ?>
<?php endforeach; ?>
Expand Up @@ -23,7 +23,7 @@
");
?>
<?php foreach ($this->videos as $i => $video) : ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$video, &$params)); ?>
<?php $dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$video, &$params, 0)); ?>
<li class="imgOutline thumbnail height-80 width-80 center">
<?php if ($this->canDelete) : ?>
<a class="close delete-item" target="_top" href="index.php?option=com_media&amp;task=file.delete&amp;tmpl=index&amp;<?php echo JSession::getFormToken(); ?>=1&amp;folder=<?php echo rawurlencode($this->state->folder); ?>&amp;rm[]=<?php echo $this->escape($video->name); ?>" rel="<?php echo $this->escape($video->name); ?>" title="<?php echo JText::_('JACTION_DELETE'); ?>">&#215;</a>
Expand All @@ -43,5 +43,5 @@
</a>
</div>
</li>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$video, &$params)); ?>
<?php $dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$video, &$params, 0)); ?>
<?php endforeach; ?>

0 comments on commit dc2b303

Please sign in to comment.