Skip to content

Commit

Permalink
Merge branch 'upstream/4.0-dev' into feature/htmlhelper-for-an-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
hans2103 committed Oct 24, 2020
2 parents 62c833c + 1011c16 commit 1df96a3
Show file tree
Hide file tree
Showing 26 changed files with 89 additions and 153 deletions.
30 changes: 3 additions & 27 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
- echo $(date)

- name: npm
image: node:current-alpine
image: node:14-alpine
depends_on: [ phpcs ]
commands:
- npm ci --unsafe-perm
Expand Down Expand Up @@ -128,20 +128,8 @@ steps:
commands:
- npm run lint:js

- name: javascript-tests
depends_on: [ npm ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- npm run test

- name: system-tests-mysql
depends_on: [ javascript-tests ]
depends_on: [ javascript-cs ]
image: joomlaprojects/docker-images:systemtests
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
Expand Down Expand Up @@ -215,15 +203,9 @@ branches:
exclude: [ l10n_* ]

volumes:
- name: cache
host:
path: /tmp/cache
- name: composer-cache
host:
path: /tmp/composer-cache
- name: reference
host:
path: /tmp/reference

services:
- name: mysql
Expand All @@ -243,12 +225,6 @@ services:
MYSQL_ROOT_PASSWORD: joomla_ut
MYSQL_DATABASE: test_joomla

- name: memcached
image: memcached:alpine

- name: redis
image: redis:alpine

- name: postgres
image: postgres:11-alpine
ports:
Expand Down Expand Up @@ -293,6 +269,6 @@ steps:

---
kind: signature
hmac: 4f58d8f61573498094e990f8f9ca8dec5324e727cfaa277c8fcb2392c17e33fe
hmac: f99784b6fd6bf3707a600f262bb9e59aa7b5f97e54df8976e459096de4344ef3

...
3 changes: 3 additions & 0 deletions administrator/components/com_admin/forms/profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
name="password"
type="password"
label="JGLOBAL_PASSWORD"
description="JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS"
hiddenDescription="true"
rules="true"
autocomplete="new-password"
class="validate-password-strength"
filter="raw"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\Component\Admin\Administrator\Service\HTML\Configuration;
use Joomla\Component\Admin\Administrator\Service\HTML\Directory;
use Joomla\Component\Admin\Administrator\Service\HTML\PhpSetting;
use Joomla\Component\Admin\Administrator\Service\HTML\System;
Expand Down Expand Up @@ -46,5 +47,6 @@ public function boot(ContainerInterface $container)
$this->getRegistry()->register('system', new System);
$this->getRegistry()->register('phpsetting', new PhpSetting);
$this->getRegistry()->register('directory', new Directory);
$this->getRegistry()->register('configuration', new Configuration);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Admin\Administrator\Service\HTML;

\defined('_JEXEC') or die;

/**
* Class for rendering configuration values
*
* @since __DEPLOY_VERSION__
*/
class Configuration
{
/**
* Method to generate a string for a value
*
* @param mixed $value The configuration value
*
* @return string Formatted and escaped string
*
* @since __DEPLOY_VERSION__
*/
public function value($value): string
{
if (\is_bool($value))
{
return $value ? 'true' : 'false';
}

if (\is_array($value))
{
$value = implode(', ', $value);
}

return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/** @var \Joomla\Component\Admin\Administrator\View\Sysinfo\HtmlView $this */
Expand All @@ -35,10 +36,7 @@
<?php echo $key; ?>
</th>
<td>
<?php if (is_bool($value)) : ?>
<?php $value = $value === true ? 'true' : 'false'; ?>
<?php endif; ?>
<?php echo htmlspecialchars($value, ENT_QUOTES); ?>
<?php echo HTMLHelper::_('configuration.value', $value); ?>
</td>
</tr>
<?php endforeach; ?>
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_users/forms/user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
name="password"
type="password"
label="JGLOBAL_PASSWORD"
description="JFIELD_PASSWORD_RULES_MINIMUM_REQUIREMENTS"
hiddenDescription="true"
rules="true"
autocomplete="new-password"
class="validate-password-strength"
filter="raw"
Expand Down
69 changes: 0 additions & 69 deletions build/media_source/system/css/system.css

This file was deleted.

Binary file removed build/media_source/system/images/notice-alert.png
Binary file not shown.
Binary file removed build/media_source/system/images/notice-download.png
Binary file not shown.
Binary file removed build/media_source/system/images/notice-info.png
Binary file not shown.
Binary file removed build/media_source/system/images/notice-note.png
Binary file not shown.
2 changes: 0 additions & 2 deletions build/media_source/system/js/core.es6/form.es6
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
}
};


/**
* USED IN: all list forms.
*
Expand Down Expand Up @@ -223,7 +222,6 @@
let i = 0;
let cbx;


if (!cb) {
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions build/media_source/system/js/core.es6/message.es6
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,13 @@
Joomla.ajaxErrorsMessages = (xhr, textStatus) => {
const msg = {};


if (textStatus === 'parsererror') {
// For jQuery jqXHR
const buf = [];

// Html entity encode.
let encodedJson = xhr.responseText.trim();


// eslint-disable-next-line no-plusplus
for (let i = encodedJson.length - 1; i >= 0; i--) {
buf.unshift(['&#', encodedJson[i].charCodeAt(), ';'].join(''));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
* @returns {HTMLElement[]}
*/
getRows() {
const rows = this.containerWithRows.children;
const rows = Array.from(this.containerWithRows.children);
const result = [];

// Filter out the rows
Expand Down Expand Up @@ -352,7 +352,7 @@
let touched = false; // We have a touch events

// Find all existing rows and add draggable attributes
const rows = this.getRows();
const rows = Array.from(this.getRows());

rows.forEach((row) => {
row.setAttribute('draggable', 'false');
Expand Down
19 changes: 0 additions & 19 deletions build/media_source/system/scss/_jalert.scss

This file was deleted.

2 changes: 1 addition & 1 deletion layouts/joomla/system/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@
endforeach;
endif;
?>
<div id="system-message-container" aria-live="polite"><div id="system-message"><?php echo $msgOutput; ?></div></div>
<div id="system-message-container" aria-live="polite"><?php echo $msgOutput; ?></div>
22 changes: 20 additions & 2 deletions libraries/src/WebAsset/WebAssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ public function assetExists(string $type, string $name): bool
* @return self
*
* @since 4.0.0
*
* @throws \InvalidArgumentException
*/
public function registerAsset(string $type, $asset, string $uri = '', array $options = [], array $attributes = [], array $dependencies = [])
{
Expand All @@ -518,7 +520,14 @@ public function registerAsset(string $type, $asset, string $uri = '', array $opt
}
else
{
throw new \BadMethodCallException('The $asset variable should be either WebAssetItemInterface or a string of the asset name');
throw new \InvalidArgumentException(
sprintf(
'%s(): Argument #2 ($asset) must be a string or an instance of %s, %s given.',
__METHOD__,
WebAssetItemInterface::class,
\is_object($asset) ? \get_class($asset) : \gettype($asset)
)
);
}

return $this;
Expand Down Expand Up @@ -672,6 +681,8 @@ public function filterOutInlineAssets(array &$assets): array
* @return self
*
* @since 4.0.0
*
* @throws \InvalidArgumentException
*/
public function addInline(string $type, $content, array $options = [], array $attributes = [], array $dependencies = []): self
{
Expand All @@ -687,7 +698,14 @@ public function addInline(string $type, $content, array $options = [], array $at
}
else
{
throw new \BadMethodCallException('The $content variable should be either WebAssetItemInterface or a string');
throw new \InvalidArgumentException(
sprintf(
'%s(): Argument #2 ($content) must be a string or an instance of %s, %s given.',
__METHOD__,
WebAssetItemInterface::class,
\is_object($content) ? \get_class($content) : \gettype($content)
)
);
}

// Get the name
Expand Down

0 comments on commit 1df96a3

Please sign in to comment.