Skip to content

Commit

Permalink
Merge branch '4.0-dev' into 4.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BrainforgeUK committed Jun 2, 2019
2 parents 1888f69 + f463d55 commit 6aed933
Show file tree
Hide file tree
Showing 265 changed files with 1,612 additions and 860 deletions.
3 changes: 1 addition & 2 deletions .appveyor.yml
Expand Up @@ -10,9 +10,8 @@ branches:
## Build matrix for lowest and highest possible targets
environment:
matrix:
- php_ver_target: 7.0
- php_ver_target: 7.1
- php_ver_target: 7.2
- php_ver_target: 7.3

init:
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
Expand Down
64 changes: 40 additions & 24 deletions .drone.yml
Expand Up @@ -6,16 +6,8 @@ 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)

- name: restore-cache
image: drillster/drone-volume-cache
depends_on: [ phpcs ]
settings:
restore: true
mount:
Expand All @@ -27,16 +19,29 @@ steps:
- name: cache
path: /cache

- name: prepare
- name: composer
image: joomlaprojects/docker-tools:develop
depends_on: [ restore-cache ]
commands:
- composer install --no-progress --no-suggest

- name: phpcs
image: php:7.2
depends_on: [ composer ]
commands:
- echo $(date)
- ./libraries/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
- echo $(date)

- name: npm
image: joomlaprojects/docker-tools:develop
depends_on: [ phpcs ]
commands:
- npm install --unsafe-perm

- name: rebuild-cache
image: drillster/drone-volume-cache
depends_on: [ prepare ]
depends_on: [ npm ]
settings:
rebuild: true
mount:
Expand All @@ -49,37 +54,37 @@ steps:
path: /cache

- name: php72-unit
depends_on: [ rebuild-cache ]
depends_on: [ phpcs ]
image: php:7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit

- name: php73-unit
depends_on: [ rebuild-cache ]
depends_on: [ phpcs ]
image: php:7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit

- name: php74-unit
depends_on: [ rebuild-cache ]
depends_on: [ phpcs ]
image: phpdaily/php:7.4-dev
errignore: true
commands:
- php -v
- ./libraries/vendor/bin/phpunit

- name: php80-unit
depends_on: [ rebuild-cache ]
depends_on: [ phpcs ]
image: phpdaily/php:8.0-dev
errignore: true
commands:
- php -v
- ./libraries/vendor/bin/phpunit

- name: javascript-cs
depends_on: [ rebuild-cache ]
depends_on: [ npm ]
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
Expand All @@ -89,7 +94,7 @@ steps:
- npm run lint:js

- name: javascript-tests
depends_on: [ rebuild-cache ]
depends_on: [ npm ]
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
Expand All @@ -98,15 +103,20 @@ steps:
- fluxbox > /dev/null 2>&1 &
- npm run test

- name: system-tests
- name: system-tests-mysql
depends_on: [ javascript-tests ]
image: joomlaprojects/docker-systemtests:develop
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql

- name: system-tests-postgres
depends_on: [ system-tests-mysql ]
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)"
shm_size: 1024000000
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres

- name: api-tests
depends_on: [ system-tests ]
depends_on: [ system-tests-postgres ]
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)"
Expand All @@ -117,7 +127,7 @@ steps:
when:
repo:
- joomla/joomla-cms
branch:
branch:
- 4.0-dev
commands:
- export RIPS_BASE_URI='https://api.rips.joomla.org'
Expand Down Expand Up @@ -153,10 +163,16 @@ services:
image: redis:alpine

- name: postgres
image: postgres
image: postgres:9-alpine
ports:
- 5432
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: joomla_ut
POSTGRES_DB: test_joomla

---
kind: signature
hmac: 95c208fa999c1f2f00b942b4c5cade9b5bcd2a87695eff53a6f189c2e554c509
hmac: fe0f4efe905e680da49bd332d26fd3fe68e43f392747b1ceb821693d26459bb8

...
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/config.xml
Expand Up @@ -29,7 +29,7 @@
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
description="COM_ACTIONLOGS_LOG_EXTENSIONS_DESC"
multiple="true"
default="com_banners,com_cache,com_categories,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_tags,com_templates,com_users"
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_tags,com_templates,com_users"
/>
</fieldset>
</config>
Expand Up @@ -9,6 +9,11 @@

defined('JPATH_BASE') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

/**
* Information field.
*
Expand All @@ -33,7 +38,7 @@ class JFormFieldPluginInfo extends JFormField
*/
protected function getInput()
{
$db = JFactory::getDbo();
$db = Factory::getDbo();
$result = null;
$query = $db->getQuery(true)
->select($db->quoteName('extension_id'))
Expand All @@ -51,15 +56,15 @@ protected function getInput()
JError::raiseWarning(500, $e->getMessage());
}

$link = JHtml::_(
$link = HTMLHelper::_(
'link',
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $result),
JText::_('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED'),
Route::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . $result),
Text::_('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED'),
array('class' => 'alert-link')
);

return '<div class="alert alert-info">'
. JText::sprintf('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED_REDIRECT', $link)
. Text::sprintf('PLG_SYSTEM_ACTIONLOGS_JOOMLA_ACTIONLOG_DISABLED_REDIRECT', $link)
. '</div>';
}
}
Expand Up @@ -59,7 +59,7 @@
<div id="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_admin/script.php
Expand Up @@ -16,6 +16,7 @@
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Table\Table;
use Joomla\Database\UTF8MB4SupportInterface;

/**
Expand Down Expand Up @@ -3985,7 +3986,7 @@ public function updateAssets($installer)
foreach ($newComponents as $component)
{
/** @var JTableAsset $asset */
$asset = JTable::getInstance('Asset');
$asset = Table::getInstance('Asset');

if ($asset->loadByName($component))
{
Expand Down
@@ -0,0 +1,6 @@
UPDATE `#__extensions`
SET `params` = REPLACE(`params`, '"com_categories",', '"com_categories","com_checkin",')
WHERE `name` = 'com_actionlogs';

INSERT INTO `#__action_logs_extensions` (`extension`) VALUES
('com_checkin');
@@ -0,0 +1,8 @@
UPDATE "#__extensions"
SET "params" = REPLACE("params", '"com_categories",', '"com_categories","com_checkin",')
WHERE "name" = 'com_actionlogs';

INSERT INTO "#__action_logs_extensions" ("extension") VALUES
('com_checkin');

SELECT setval('#__action_logs_extensions_id_seq', max(id)) FROM "#__action_logs_extensions";
Expand Up @@ -38,7 +38,7 @@
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down
Expand Up @@ -54,7 +54,7 @@
<?php endif; ?>
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down
Expand Up @@ -85,8 +85,6 @@ public function display($tpl = null)

$this->addToolbar();

$this->sidebar = \JHtmlSidebar::render();

// We do not need to filter by language when multilingual is disabled
if (!Multilanguage::isEnabled())
{
Expand Down
Expand Up @@ -71,7 +71,6 @@ public function display($tpl = null)
BannersHelper::addSubmenu('clients');

$this->addToolbar();
$this->sidebar = \JHtmlSidebar::render();

return parent::display($tpl);
}
Expand Down
4 changes: 0 additions & 4 deletions administrator/components/com_banners/View/Tracks/HtmlView.php
Expand Up @@ -74,8 +74,6 @@ public function display($tpl = null)

$this->addToolbar();

$this->sidebar = \JHtmlSidebar::render();

return parent::display($tpl);
}

Expand Down Expand Up @@ -119,8 +117,6 @@ protected function addToolbar()
}

ToolbarHelper::help('JHELP_COMPONENTS_BANNERS_TRACKS');

\JHtmlSidebar::setAction('index.php?option=com_banners&view=tracks');
}

/**
Expand Down
9 changes: 2 additions & 7 deletions administrator/components/com_banners/tmpl/banners/default.php
Expand Up @@ -34,19 +34,14 @@
?>
<form action="<?php echo Route::_('index.php?option=com_banners&view=banners'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="col-md-2">
<?php echo $this->sidebar; ?>
</div>
<?php endif; ?>
<div class="<?php if (!empty($this->sidebar)) {echo 'col-md-10'; } else { echo 'col-md-12'; } ?>">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php
// Search tools bar
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down
12 changes: 4 additions & 8 deletions administrator/components/com_banners/tmpl/clients/default.php
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Router\Route;

HTMLHelper::_('behavior.multiselect');
Expand All @@ -29,23 +30,18 @@
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$params = $this->state->params ?? new JObject;
$params = $this->state->params ?? new CMSObject;
?>
<form action="<?php echo Route::_('index.php?option=com_banners&view=clients'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="col-md-2">
<?php echo $this->sidebar; ?>
</div>
<?php endif; ?>
<div class="<?php if (!empty($this->sidebar)) {echo 'col-md-10'; } else { echo 'col-md-12'; } ?>">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php
// Search tools bar
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down
9 changes: 2 additions & 7 deletions administrator/components/com_banners/tmpl/tracks/default.php
Expand Up @@ -19,16 +19,11 @@
?>
<form action="<?php echo Route::_('index.php?option=com_banners&view=tracks'); ?>" method="post" name="adminForm" id="adminForm">
<div class="row">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="col-md-2">
<?php echo $this->sidebar; ?>
</div>
<?php endif; ?>
<div class="<?php if (!empty($this->sidebar)) {echo 'col-md-10'; } else { echo 'col-md-12'; } ?>">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<div class="alert alert-info">
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
Expand Down

0 comments on commit 6aed933

Please sign in to comment.