29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-07 12:33:40 +00:00

Merge branch '4.0-dev' into spinner-nth-attempt

This commit is contained in:
dGrammatiko 2019-08-20 13:48:01 +02:00 committed by GitHub
commit bc07eede9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
123 changed files with 613 additions and 652 deletions

View File

@ -56,21 +56,21 @@ steps:
- name: php72-unit
depends_on: [ phpcs ]
image: php:7.2
image: joomlaprojects/docker-images:php7.2
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php73-unit
depends_on: [ phpcs ]
image: php:7.3
image: joomlaprojects/docker-images:php7.3
commands:
- php -v
- ./libraries/vendor/bin/phpunit --testsuite Unit
- name: php74-unit
depends_on: [ phpcs ]
image: phpdaily/php:7.4-dev
image: joomlaprojects/docker-images:php7.4
failure: ignore
commands:
- php -v
@ -78,7 +78,7 @@ steps:
- name: php80-unit
depends_on: [ phpcs ]
image: phpdaily/php:8.0-dev
image: joomlaprojects/docker-images:php8.0
failure: ignore
commands:
- php -v
@ -270,6 +270,6 @@ services:
---
kind: signature
hmac: af5f0783363fae3f8876585fff87e08dd470ee9a81599f20e4c0e8d2d0836801
hmac: 9462caf361ab517c63d66d10ba0c934ead624ecf116828ab71ddc889f1b0a137
...

View File

@ -426,7 +426,7 @@ class ActionlogsModel extends ListModel
// Add ip sort options to sort dropdown
if ($form && $ipLogging)
{
/* @var JFormFieldList $field */
/* @var \Joomla\CMS\Form\Field\ListField $field */
$field = $form->getField('fullordering', 'list');
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_ASC'), array('value' => 'a.ip_address ASC'));
$field->addOption(Text::_('COM_ACTIONLOGS_IP_ADDRESS_DESC'), array('value' => 'a.ip_address DESC'));

View File

@ -11,18 +11,16 @@ namespace Joomla\Component\Associations\Administrator\Field;
defined('JPATH_BASE') or die;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Form\Field\GroupedlistField;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
FormHelper::loadFieldClass('groupedlist');
/**
* A drop down containing all component item types that implement associations.
*
* @since 3.7.0
*/
class ItemtypeField extends \JFormFieldGroupedList
class ItemtypeField extends GroupedlistField
{
/**
* The form field type.

View File

@ -31,7 +31,7 @@ class BannerTable extends Table
* Indicates that columns fully support the NULL value in the database
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected $_supportNullValue = true;

View File

@ -384,7 +384,7 @@ class CategoryModel extends AdminModel
*
* @return mixed
*
* @see \JFormField
* @see \Joomla\CMS\Form\FormField
* @since 1.6
* @throws \Exception if there is an error in the form event.
*/

View File

@ -78,7 +78,7 @@ class DisplayController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -14,6 +14,6 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
$this->fieldsname = 'filters';
$this->formclass = 'options-grid-form options-grid-form-half';
$this->formclass = 'options-grid-form options-grid-form-full';
echo LayoutHelper::render('joomla.content.text_filters', $this);

View File

@ -15,7 +15,7 @@ defined('_JEXEC') or die;
$this->name = Text::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'permissions';
$this->formclass = 'form-no-margin options-grid-form options-grid-form-half';
$this->formclass = 'form-no-margin options-grid-form options-grid-form-full';
$this->showlabel = false;
echo LayoutHelper::render('joomla.content.options_default', $this);

View File

@ -85,7 +85,7 @@ $xml = $this->form->getXml();
?>
<?php if (!$isGrandchild && $hasParent) : ?>
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-half">
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<?php elseif (!$hasParent) : ?>
@ -106,7 +106,7 @@ $xml = $this->form->getXml();
<?php if (!$hasChildren) : ?>
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-half">
<fieldset id="fieldset-<?php echo $this->escape($name); ?>" class="options-grid-form options-grid-form-full">
<legend><?php echo Text::_($fieldSet->label); ?></legend>
<div>
<?php $opentab = 2; ?>

View File

@ -11,17 +11,15 @@ namespace Joomla\Component\Content\Administrator\Field;
defined('_JEXEC') or die;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Form\Field\RadioField;
use Joomla\CMS\Plugin\PluginHelper;
FormHelper::loadFieldClass('radio');
/**
* Voteradio Field class.
*
* @since 3.8.0
*/
class VoteradioField extends \JFormFieldRadio
class VoteradioField extends RadioField
{
/**
* The form field type.

View File

@ -724,7 +724,7 @@ class ArticleModel extends AdminModel
*
* @return array|boolean Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see \Joomla\CMS\Form\FormRule
* @see JFilterInput
* @since 3.7.0
*/

View File

@ -56,7 +56,7 @@
type="accesslevel"
label="JOPTION_SELECT_ACCESS"
multiple="true"
layout="joomla.form.field.accesslevel-fancy-select"
layout="joomla.form.field.list-fancy-select"
hint="JOPTION_SELECT_ACCESS"
onchange="this.form.submit();"
/>

View File

@ -46,7 +46,7 @@
type="accesslevel"
label="JOPTION_SELECT_ACCESS"
multiple="true"
layout="joomla.form.field.accesslevel-fancy-select"
layout="joomla.form.field.list-fancy-select"
hint="JOPTION_SELECT_ACCESS"
onchange="this.form.submit();"
/>

View File

@ -904,7 +904,7 @@ class FieldModel extends AdminModel
*
* @return void
*
* @see \JFormField
* @see \Joomla\CMS\Form\FormField
* @since 3.7.0
* @throws \Exception if there is an error in the form event.
*/

View File

@ -74,7 +74,7 @@ class DatabaseController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -79,7 +79,7 @@ class DiscoverController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -70,7 +70,7 @@ class DisplayController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -212,7 +212,7 @@ class UpdateController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -82,7 +82,7 @@ class DisplayController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -140,7 +140,7 @@ class MenuItemByTypeField extends GroupedlistField
*
* @return boolean True on success.
*
* @see JFormField::setup()
* @see \Joomla\CMS\Form\FormField::setup()
* @since 3.8.0
*/
public function setup(\SimpleXMLElement $element, $value, $group = null)

View File

@ -19,6 +19,7 @@
<fieldset
name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
class="options-grid-form-half"
>
<field
@ -28,9 +29,10 @@
/>
<field
name="menu-anchor_css"
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
/>
<field
@ -39,9 +41,9 @@
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
/>
<field
<field
name="menu_image_css"
type="text"
type="text"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_CSS_LABEL"
/>
@ -50,7 +52,7 @@
type="radio"
label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
class="switcher"
default="1"
default="1"
filter="integer"
>
<option value="0">JNO</option>

View File

@ -3,38 +3,40 @@
<fields name="params" label="COM_MENUS_LINKTYPE_OPTIONS_LABEL">
<fieldset name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
class="options-grid-form-half"
>
<field
name="menu-anchor_title"
<field
name="menu-anchor_title"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_TITLE_LABEL"
/>
<field
name="menu-anchor_css"
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
/>
<field
name="menu_image"
<field
name="menu_image"
type="media"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
/>
<field
name="menu_image_css"
type="text"
type="text"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_CSS_LABEL"
/>
<field
<field
name="menu_text"
type="radio"
label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
class="switcher"
default="1"
default="1"
filter="integer"
>
<option value="0">JNO</option>

View File

@ -15,7 +15,10 @@
</fieldset>
<fields name="params">
<fieldset name="menu-options" label="COM_MENUS_LINKTYPE_OPTIONS_LABEL">
<fieldset name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
class="options-grid-form-half"
>
<field
name="menu-anchor_title"
type="text"
@ -23,9 +26,10 @@
/>
<field
name="menu-anchor_css"
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
/>
<field
@ -34,9 +38,9 @@
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
/>
<field
<field
name="menu_image_css"
type="text"
type="text"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_CSS_LABEL"
/>

View File

@ -15,7 +15,10 @@
</fieldset>
<fields name="params">
<fieldset name="menu-options" label="COM_MENUS_LINKTYPE_OPTIONS_LABEL">
<fieldset name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
class="options-grid-form-half"
>
<field
name="menu-anchor_title"
type="text"
@ -23,9 +26,10 @@
/>
<field
name="menu-anchor_css"
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
/>
<field

View File

@ -1,21 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="params">
<fieldset name="menu-options" label="COM_MENUS_LINKTYPE_OPTIONS_LABEL">
<field
<fieldset name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
class="options-grid-form-half"
>
<field
name="menu-anchor_title"
type="text"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_TITLE_LABEL"
/>
<field
name="menu-anchor_css"
type="text"
label="COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL"
/>
<field
name="menu-anchor_rel"
<field
name="menu-anchor_rel"
type="list"
label="COM_MENUS_ITEM_FIELD_ANCHOR_REL_LABEL"
default=""
@ -35,19 +32,30 @@
<option value="tag"/>
</field>
<field
name="menu_image"
<field
name="menu_icon"
type="text"
label="COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL"
description="COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC"
/>
<field
type="spacer"
/>
<field
name="menu_image"
type="media"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
/>
<field
name="menu_image_css"
type="text"
type="text"
label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_CSS_LABEL"
/>
<field
<field
name="menu_text"
type="radio"
label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"

View File

@ -134,11 +134,11 @@
type="separator"
title="JSITE"
hidden="false"
sql_select="a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:mod_languages/', l.image, '.gif') END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_from="#__menu_types AS a"
sql_where="a.client_id = 0"
sql_leftjoin="#__menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN #__languages AS l ON l.lang_code = m.language"
sql_group="a.id, a.title, a.menutype, m.language, l.image"
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
sql_order="a.id DESC"
>
<menuitem

View File

@ -36,11 +36,11 @@
title="JSITE"
icon="desktop"
hidden="false"
sql_select="a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:mod_languages/', l.image, '.gif') END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_from="#__menu_types AS a"
sql_where="a.client_id = 0"
sql_leftjoin="#__menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN #__languages AS l ON l.lang_code = m.language"
sql_group="a.id, a.title, a.menutype, m.language, l.image"
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
sql_order="a.id DESC"
sql_target="self"
>

View File

@ -191,11 +191,11 @@
type="separator"
title="JSITE"
hidden="false"
sql_select="a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:mod_languages/', l.image, '.gif') END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
sql_from="#__menu_types AS a"
sql_where="a.client_id = 0"
sql_leftjoin="#__menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN #__languages AS l ON l.lang_code = m.language"
sql_group="a.id, a.title, a.menutype, m.language, l.image"
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
sql_order="a.id DESC">
<menuitem
title="{sql:title} "

View File

@ -13,16 +13,14 @@ defined('_JEXEC') or die;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
FormHelper::loadFieldClass('user');
use Joomla\CMS\Form\Field\UserField;
/**
* Supports a modal select of users that have access to com_messages
*
* @since 1.6
*/
class UserMessagesField extends \JFormFieldUser
class UserMessagesField extends UserField
{
/**
* The form field type.

View File

@ -30,7 +30,7 @@ class NewsfeedTable extends Table
* Indicates that columns fully support the NULL value in the database
*
* @var boolean
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected $_supportNullValue = true;

View File

@ -12,16 +12,14 @@ namespace Joomla\Component\Plugins\Administrator\Field;
defined('JPATH_BASE') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
FormHelper::loadFieldClass('ordering');
use Joomla\CMS\Form\Field\OrderingField;
/**
* Supports an HTML select list of plugins.
*
* @since 1.6
*/
class PluginorderingField extends \JFormFieldOrdering
class PluginorderingField extends OrderingField
{
/**
* The form field type.

View File

@ -124,24 +124,6 @@ $tmpl = $isModal || $input->get('tmpl', '', 'cmd') === 'component' ? '&tmpl=
'note',
); ?>
<?php echo LayoutHelper::render('joomla.edit.global', $this); ?>
<div class="form-vertical form-no-margin">
<div class="form-group">
<?php echo $this->form->getLabel('ordering'); ?>
<?php echo $this->form->getInput('ordering'); ?>
</div>
<div class="form-group">
<?php echo $this->form->getLabel('folder'); ?>
<?php echo $this->form->getInput('folder'); ?>
</div>
<div class="form-group">
<?php echo $this->form->getLabel('element'); ?>
<?php echo $this->form->getInput('element'); ?>
</div>
<div class="control-group">
<?php echo $this->form->getLabel('note'); ?>
<?php echo $this->form->getInput('note'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -34,7 +34,7 @@ class DisplayController extends BaseController
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getMenuBadgeData()
{

View File

@ -409,7 +409,7 @@ class RequestModel extends AdminModel
*
* @return array|boolean Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see \Joomla\CMS\Form\FormRule
* @see JFilterInput
* @since 3.9.0
*/

View File

@ -241,7 +241,7 @@ class LevelModel extends AdminModel
*
* @return array|boolean Array of filtered data if valid, false otherwise.
*
* @see \JFormRule
* @see \Joomla\CMS\Form\FormRule
* @see \JFilterInput
* @since 3.8.8
*/

View File

@ -86,6 +86,8 @@ COM_MENUS_ITEM_FIELD_HIDE_UNASSIGNED_LABEL="Unassigned Modules"
COM_MENUS_ITEM_FIELD_HIDE_UNPUBLISHED="Hide Unpublished Modules"
COM_MENUS_ITEM_FIELD_HIDE_UNPUBLISHED_LABEL="Unpublished Modules"
COM_MENUS_ITEM_FIELD_HOME_LABEL="Default Page"
COM_MENUS_ITEM_FIELD_ICON_TITLE_DESC="If an icon class is entered, it takes precedence over the link image."
COM_MENUS_ITEM_FIELD_ICON_TITLE_LABEL="Link Icon Class"
COM_MENUS_ITEM_FIELD_LINK_LABEL="Link"
COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL="Link Image"
COM_MENUS_ITEM_FIELD_MENU_IMAGE_CSS_LABEL="Image Class"

View File

@ -1,5 +1,5 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

View File

@ -1,5 +1,5 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

View File

@ -2,7 +2,7 @@
<metafile version="3.9" client="administrator">
<name>English (en-GB)</name>
<version>4.0.0</version>
<creationDate>June 2019</creationDate>
<creationDate>August 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -3,7 +3,7 @@
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>4.0.0</version>
<creationDate>June 2019</creationDate>
<creationDate>August 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -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>4.0.0-alpha11-dev</version>
<creationDate>June 2019</creationDate>
<version>4.0.0-alpha12-dev</version>
<creationDate>August 2019</creationDate>
<description>FILES_JOOMLA_XML_DESCRIPTION</description>
<scriptfile>administrator/components/com_admin/script.php</scriptfile>

View File

@ -3,7 +3,7 @@
<name>English (en-GB) Language Pack</name>
<packagename>en-GB</packagename>
<version>4.0.0.1</version>
<creationDate>June 2019</creationDate>
<creationDate>August 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -25,7 +25,7 @@ $class = $enabled ? 'nav flex-column main-nav ' . $direction : 'nav flex-col
if ($root->hasChildren())
{
echo '<nav class="main-nav-container" aria-label="' . Text::_('MOD_MENU_ARIA_MAIN_MENU') . '">';
echo '<ul id="menu" class="' . $class . '" role="menu">' . "\n";
echo '<ul id="menu" class="' . $class . '">' . "\n";
// WARNING: Do not use direct 'include' or 'require' as it is important to isolate the scope for each call
$menu->renderSubmenu(ModuleHelper::getLayoutPath('mod_menu', 'default_submenu'), $root);

View File

@ -9,7 +9,10 @@
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
/**
* =========================================================================================================
@ -50,13 +53,15 @@ if ($current->type == 'separator')
}
else
{
echo '<li' . $class . ' role="menuitem">';
echo '<li' . $class . '>';
}
// Print a link if it exists
$linkClass = [];
$dataToggle = '';
$iconClass = '';
$itemIconClass = '';
$itemImage = '';
if ($current->hasChildren())
{
@ -76,30 +81,65 @@ else
$linkClass = ' class="' . implode(' ', $linkClass) . '" ';
// Get the menu link
$link = $current->get('link');
$link = $current->get('link');
// Get the menu image class
$itemIconClass = $current->get('params')['menu_icon'];
// Get the menu image
$itemImage = $current->get('params')['menu_image'];
// Get the menu icon
$icon = $this->getIconClass($current);
$iconClass = ($icon != '' && $current->level == 1) ? '<span class="' . $icon . '" aria-hidden="true"></span>' : '';
$ajax = $current->ajaxbadge ? '<span class="menu-badge"><span class="fa fa-spin fa-spinner mt-1 system-counter" data-url="' . $current->ajaxbadge . '"></span></span>' : '';
$iconImage = $current->get('icon');
$homeImage = '';
if ($iconClass === '' && $itemIconClass)
{
$iconClass = '<span class="' . $itemIconClass . '" aria-hidden="true"></span>';
}
if ($iconImage)
{
if (substr($iconImage, 0, 6) == 'class:' && substr($iconImage, 6) == 'icon-home')
{
$iconImage = '<span class="home-image icon-featured"></span>';
}
elseif (substr($iconImage, 0, 6) == 'image:')
{
$iconImage = '&nbsp;<span class="badge badge-secondary">' . substr($iconImage, 6) . '</span>';
}
else
{
$iconImage = '<span>' . HTMLHelper::_('image', $iconImage, null) . '</span>';
}
}
$itemImage = (empty($itemIconClass) && $itemImage) ? '&nbsp;<img src="' . Uri::root() . $itemImage . '" alt="">&nbsp;' : '';
if ($link != '' && $current->target != '')
{
echo "<a" . $linkClass . $dataToggle . " href=\"" . $link . "\" target=\"" . $current->target . "\">"
. $iconClass
. '<span class="sidebar-item-title">' . Text::_($current->title) . '</span>' . $ajax . '</a>';
. '<span class="sidebar-item-title">' . $itemImage . Text::_($current->title) . '</span>' . $ajax . '</a>';
}
elseif ($link != '')
elseif ($link != '' && $current->type !== 'separator')
{
echo "<a" . $linkClass . $dataToggle . " href=\"" . $link . "\">"
. $iconClass
. '<span class="sidebar-item-title">' . Text::_($current->title) . '</span>' . $ajax . '</a>';
. '<span class="sidebar-item-title">' . $itemImage . Text::_($current->title) . '</span>' . $iconImage . '</a>';
}
elseif ($current->title != '' && $current->get('class') !== 'separator')
elseif ($current->title != '' && $current->type !== 'separator')
{
echo "<a" . $linkClass . $dataToggle . ">"
. $iconClass
. '<span class="sidebar-item-title">' . Text::_($current->title) . '</span>' . $ajax . '</a>';
. '<span class="sidebar-item-title">'. $itemImage . Text::_($current->title) . '</span>' . $ajax . '</a>';
}
elseif ($current->title != '' && $current->type === 'separator')
{
echo '<span class="sidebar-item-title">' . Text::_($current->title) . '</span>' . $ajax;
}
else
{
@ -129,7 +169,7 @@ if ($current->dashboard)
{
$titleDashboard = Text::sprintf('MOD_MENU_DASHBOARD_LINK', Text::_($current->title));
echo '<span class="menu-dashboard"><a href="'
. JRoute::_('index.php?option=com_cpanel&view=cpanel&dashboard=' . $current->dashboard) . '">'
. Route::_('index.php?option=com_cpanel&view=cpanel&dashboard=' . $current->dashboard) . '">'
. '<span class="fa fa-th-large" title="' . $titleDashboard . '" aria-hidden="true"></span>'
. '<span class="sr-only">' . $titleDashboard . '</span>'
. '</a></span>';
@ -146,7 +186,7 @@ if ($this->enabled && $current->hasChildren())
}
else
{
echo '<ul id="collapse' . $this->getCounter() . '" class="collapse-level-1 collapse" role="menu" aria-haspopup="true">' . "\n";
echo '<ul id="collapse' . $this->getCounter() . '" class="collapse-level-1 collapse">' . "\n";
}
// WARNING: Do not use direct 'include' or 'require' as it is important to isolate the scope for each call

View File

@ -18,7 +18,7 @@ use Joomla\CMS\Router\Route;
/**
* Helper class for admin privacy status module
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class ModPrivacyStatusHelper
{
@ -27,7 +27,7 @@ class ModPrivacyStatusHelper
*
* @return array Array containing a status of whether a privacy policy is set and a link to the policy document for editing
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public static function getPrivacyPolicyInfo()
{
@ -54,7 +54,7 @@ class ModPrivacyStatusHelper
*
* @return array Array containing a status of whether a menu is published for the request form and its current link
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public static function getRequestFormPublished()
{
@ -138,7 +138,7 @@ class ModPrivacyStatusHelper
*
* @return integer
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public static function getNumberUrgentRequests()
{

View File

@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage mod_submenu
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -22,7 +22,7 @@ use Joomla\Utilities\ArrayHelper;
/**
* Helper class to handle permissions in mod_submenu
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
abstract class Menu
{
@ -33,7 +33,7 @@ abstract class Menu
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public static function preprocess($parent)
{

View File

@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage mod_submenu
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -3,7 +3,7 @@
<name>mod_submenu</name>
<author>Joomla! Project</author>
<creationDate>February 2019</creationDate>
<copyright>Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.</copyright>
<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>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage mod_submenu
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -36,7 +36,6 @@ $canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $id) &
<?php foreach ($root->getChildren() as $child) : ?>
<?php if ($child->hasChildren()) : ?>
<div class="card">
<h2 class="card-header">
<?php if ($canEdit || $canChange) : ?>
<?php $dropdownPosition = Factory::getLanguage()->isRTL() ? 'left' : 'right'; ?>
<div class="module-actions dropdown">
@ -56,6 +55,7 @@ $canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $id) &
</div>
</div>
<?php endif; ?>
<h2 class="card-header">
<?php if ($child->icon) : ?><span class="fa fa-<?php echo $child->icon; ?>" aria-hidden="true"></span><?php endif; ?>
<?php echo Text::_($child->title); ?>
</h2>

View File

@ -101,7 +101,7 @@ HTMLHelper::_('atum.rootcolors', $this->params);
<div class="header-title d-flex">
<div class="d-flex">
<a class="logo" href="<?php echo Route::_('index.php'); ?>"
aria-label="<?php echo Text::_('TPL_BACK_TO_CONTROL_PANEL'); ?>">
aria-label="<?php echo Text::_('TPL_ATUM_BACK_TO_CONTROL_PANEL'); ?>">
<img src="<?php echo $siteLogo; ?>" alt="">
<img class="logo-small" src="<?php echo $smallLogo; ?>" alt="">
</a>

View File

@ -108,7 +108,7 @@ HTMLHelper::_('atum.rootcolors', $this->params);
</div>
<?php else : ?>
<a class="logo" href="<?php echo Route::_('index.php'); ?>"
aria-label="<?php echo Text::_('TPL_BACK_TO_CONTROL_PANEL'); ?>">
aria-label="<?php echo Text::_('TPL_ATUM_BACK_TO_CONTROL_PANEL'); ?>">
<img src="<?php echo $siteLogo; ?>" alt="">
<img class="logo-small" src="<?php echo $smallLogo; ?>" alt="">
</a>

View File

@ -8,6 +8,7 @@ TPL_ATUM_ALTTEXT_LOGIN_LOGO_LABEL="Alt Text Login Logo"
TPL_ATUM_ALTTEXT_SITE_LOGO_LABEL="Alt Text Site Logo"
TPL_ATUM_ALTTEXT_SMALL_LOGO_LABEL="Alt Text Small Site Logo"
TPL_ATUM_BACKEND_LOGIN="Joomla Administrator Login"
TPL_ATUM_BACK_TO_CONTROL_PANEL="Back to Dashboard"
TPL_ATUM_COLORS_HUE="Choose your hue value for the dark template colour"
TPL_ATUM_COLORS_SETTINGS_BG_DARK_LABEL="Dark Background"
TPL_ATUM_COLORS_SETTINGS_BG_LIGHT_LABEL="Light Background"

View File

@ -102,7 +102,7 @@ $header-height: 3.5rem;
$atum-toolbar-line-height: 2.45rem;
// Sidebar
$sidebar-width: 15.625rem;
$sidebar-width: 18rem;
$sidebar-width-login: 28.75rem;
$sidebar-width-closed: 3rem;
$main-brand-height: 3rem;

View File

@ -53,7 +53,7 @@
svg, img {
margin-left: 0.8rem;
max-height: 1.3rem;
max-width: calc(15.625rem - 0.8rem);
max-width: calc(18rem - 0.8rem);
&.logo-small {
display: none;
@ -112,6 +112,8 @@
background-color: transparent;
color: var(--atum-special-color);
box-shadow: none;
opacity: 0.3;
pointer-events: none;
}
}
.dropdown-toggle {
@ -192,6 +194,9 @@
box-shadow: $atum-box-shadow;
font-size: inherit;
padding: 1rem 0.75rem;
[dir=rtl] & {
text-align: right;
}
}
}
@ -211,6 +216,12 @@
text-decoration: none;
background: var(--atum-bg-dark);
}
[dir=rtl] & {
text-align: right;
padding-right: .75rem;
padding-left: 0;
}
}
.fa {

View File

@ -104,10 +104,6 @@
.form-group {
label {
display: flex;
align-items: flex-end;
justify-content: space-between;
span {
font-size: .9rem;

View File

@ -101,6 +101,7 @@
border-color: rgba($gray-500, 0.8);
opacity:1;
color:var(--atum-text-dark);
cursor: not-allowed;
}
}
.js-stools-btn-filter{

View File

@ -350,6 +350,15 @@
margin-top: 0.65rem;
font-size: .75rem;
letter-spacing: 2px;
padding-left: 2.4rem;
[dir=rtl] & {
padding-left: 0;
padding-right: 2.4rem;
}
}
.home-image {
padding: 0 0.4rem 0;
}
.collapse {

View File

@ -57,6 +57,9 @@ body {
.switcher {
float: right;
}
.form-no-margin .control-group .controls .switcher__legend {
text-align: right;
}
// Alerts
.notify-alerts {
margin-left: 0;
@ -129,16 +132,16 @@ body {
transform: rotate(180deg) translate(0, -180%);
}
ul a::before {
right: 18px;
ul a {
padding: 0 1.4rem 0 0;
}
.active .no-dropdown .sidebar-item-title {
margin-right: 28px;
margin-right: 1rem;
}
.dropdown-submenu .sidebar-item-title {
margin-right: 28px;
margin-right: 1rem;
}
.dropdown-submenu .no-dropdown .sidebar-item-title {
@ -182,7 +185,7 @@ body {
[class*=' icon-'],
[class^='#{$fa-css-prefix}-'],
[class*=' #{$fa-css-prefix}-'] {
margin: 0 -22px 0 22px;
margin: 0 -27px 0 27px;
}
}

View File

@ -15,7 +15,9 @@
const content = window.Joomla.editors.instances[editor].getValue();
if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
if (!content) {
Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
} else if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
} else {
// TODO replace with joomla-alert

View File

@ -1,5 +1,5 @@
/**
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
((document, Joomla) => {

View File

@ -26,7 +26,7 @@
folder.addEventListener('click', (event) => {
event.preventDefault();
const list = event.target.parentNode.querySelector('ul');
const list = folder.parentNode.querySelector('ul');
if (list.style.display !== 'none') {
list.style.display = 'none';

View File

@ -87,6 +87,12 @@ $switcher-height: 28px;
.col-md-9 .switcher__legend,
.col-md-12 .switcher__legend {
margin-left: -220px;
[dir=rtl] & {
margin-left: 0;
float: right;
text-align: right;
}
}
.col-md-3 .switcher__legend {

View File

@ -1,5 +1,5 @@
/**
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -22,8 +22,8 @@ use Joomla\Utilities\ArrayHelper;
* Prototype form model.
*
* @see JForm
* @see JFormField
* @see JFormRule
* @see \Joomla\CMS\Form\FormField
* @see \Joomla\CMS\Form\FormRule
* @since 3.2
*/
abstract class FormModel extends BaseForm
@ -239,7 +239,7 @@ abstract class FormModel extends BaseForm
*
* @return void
*
* @see JFormField
* @see \Joomla\CMS\Form\FormField
* @since 3.2
* @throws \Exception if there is an error in the form event.
*/
@ -261,7 +261,7 @@ abstract class FormModel extends BaseForm
*
* @return mixed Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see \Joomla\CMS\Form\FormRule
* @see JFilterInput
* @since 3.2
*/

View File

@ -50,7 +50,7 @@ class FeedView extends AbstractView
foreach ($rows as $row)
{
// Strip html from feed item title
$title = $this->escape($row->title);
$title = htmlspecialchars($row->title, ENT_QUOTES, 'UTF-8');
$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');
// Compute the article slug

View File

@ -109,7 +109,7 @@
"squizlabs/php_codesniffer": "~3.0",
"joomla-projects/joomla-browser": "~4.0@dev",
"joomla-projects/robo-joomla": "dev-develop",
"joomla-projects/selenium-server-standalone": "~v3",
"joomla-projects/selenium-server-standalone": "3.14.0",
"codeception/codeception": "~3.0",
"consolidation/robo": "^1.0.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0"

138
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "39c8799e419972e3e435d22eeeb0e6d6",
"content-hash": "d553659408e6a1e479a4fb22cbf671c1",
"packages": [
{
"name": "algo26-matthias/idna-convert",
@ -300,16 +300,16 @@
},
{
"name": "google/recaptcha",
"version": "1.2.2",
"version": "1.2.3",
"source": {
"type": "git",
"url": "https://github.com/google/recaptcha.git",
"reference": "c4a17d6af648d4f3814430cd103cba50b75b571c"
"reference": "98c4a6573b27e8b0990ea8789c74ea378795134c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/google/recaptcha/zipball/c4a17d6af648d4f3814430cd103cba50b75b571c",
"reference": "c4a17d6af648d4f3814430cd103cba50b75b571c",
"url": "https://api.github.com/repos/google/recaptcha/zipball/98c4a6573b27e8b0990ea8789c74ea378795134c",
"reference": "98c4a6573b27e8b0990ea8789c74ea378795134c",
"shasum": ""
},
"require": {
@ -343,7 +343,7 @@
"recaptcha",
"spam"
],
"time": "2019-05-24T12:44:03+00:00"
"time": "2019-08-16T15:48:25+00:00"
},
{
"name": "jakeasmith/http_build_url",
@ -758,12 +758,12 @@
"source": {
"type": "git",
"url": "https://github.com/joomla-framework/database.git",
"reference": "60a7df9e4df83c2269fbc229a396cb6a324e417f"
"reference": "b90d2c2ea4a4768fb6647431b304c3e58ea2fe5f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-framework/database/zipball/60a7df9e4df83c2269fbc229a396cb6a324e417f",
"reference": "60a7df9e4df83c2269fbc229a396cb6a324e417f",
"url": "https://api.github.com/repos/joomla-framework/database/zipball/b90d2c2ea4a4768fb6647431b304c3e58ea2fe5f",
"reference": "b90d2c2ea4a4768fb6647431b304c3e58ea2fe5f",
"shasum": ""
},
"require": {
@ -815,7 +815,7 @@
"framework",
"joomla"
],
"time": "2019-07-22T20:04:16+00:00"
"time": "2019-08-19T18:53:33+00:00"
},
{
"name": "joomla/di",
@ -3311,22 +3311,22 @@
},
{
"name": "codeception/codeception",
"version": "3.0.3",
"version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
"reference": "feb566a9dc26993611602011ae3834d8e3c1dd7f"
"reference": "9ed9146567770e564fdd2b656edb385330f7fae7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/feb566a9dc26993611602011ae3834d8e3c1dd7f",
"reference": "feb566a9dc26993611602011ae3834d8e3c1dd7f",
"url": "https://api.github.com/repos/Codeception/Codeception/zipball/9ed9146567770e564fdd2b656edb385330f7fae7",
"reference": "9ed9146567770e564fdd2b656edb385330f7fae7",
"shasum": ""
},
"require": {
"behat/gherkin": "^4.4.0",
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3",
"codeception/stub": "^2.0",
"codeception/stub": "^2.0 | ^3.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
@ -3346,6 +3346,7 @@
"require-dev": {
"codeception/specify": "~0.3",
"doctrine/annotations": "^1",
"doctrine/data-fixtures": "^1",
"doctrine/orm": "^2",
"flow/jsonpath": "~0.2",
"monolog/monolog": "~1.8",
@ -3401,7 +3402,7 @@
"functional testing",
"unit testing"
],
"time": "2019-07-18T16:21:08+00:00"
"time": "2019-08-18T16:44:20+00:00"
},
{
"name": "codeception/phpunit-wrapper",
@ -3449,20 +3450,21 @@
},
{
"name": "codeception/stub",
"version": "2.1.0",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Stub.git",
"reference": "853657f988942f7afb69becf3fd0059f192c705a"
"reference": "eea518711d736eab838c1274593c4568ec06b23d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeception/Stub/zipball/853657f988942f7afb69becf3fd0059f192c705a",
"reference": "853657f988942f7afb69becf3fd0059f192c705a",
"url": "https://api.github.com/repos/Codeception/Stub/zipball/eea518711d736eab838c1274593c4568ec06b23d",
"reference": "eea518711d736eab838c1274593c4568ec06b23d",
"shasum": ""
},
"require": {
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3"
"codeception/phpunit-wrapper": "^6.6.1 | ^7.7.1 | ^8.0.3",
"phpunit/phpunit": ">=6.5 <9.0"
},
"type": "library",
"autoload": {
@ -3475,7 +3477,7 @@
"MIT"
],
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
"time": "2019-03-02T15:35:10+00:00"
"time": "2019-08-10T16:20:53+00:00"
},
{
"name": "composer/semver",
@ -4180,9 +4182,9 @@
"authors": [
{
"name": "Franck Nijhof",
"role": "Developer / IT Manager",
"email": "franck.nijhof@dealerdirect.com",
"homepage": "http://www.frenck.nl"
"homepage": "http://www.frenck.nl",
"role": "Developer / IT Manager"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
@ -4267,16 +4269,16 @@
},
{
"name": "doctrine/annotations",
"version": "v1.6.1",
"version": "v1.7.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24"
"reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24",
"reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/fa4c4e861e809d6a1103bd620cce63ed91aedfeb",
"reference": "fa4c4e861e809d6a1103bd620cce63ed91aedfeb",
"shasum": ""
},
"require": {
@ -4285,12 +4287,12 @@
},
"require-dev": {
"doctrine/cache": "1.*",
"phpunit/phpunit": "^6.4"
"phpunit/phpunit": "^7.5@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6.x-dev"
"dev-master": "1.7.x-dev"
}
},
"autoload": {
@ -4303,6 +4305,10 @@
"MIT"
],
"authors": [
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
@ -4311,10 +4317,6 @@
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com"
},
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com"
@ -4331,7 +4333,7 @@
"docblock",
"parser"
],
"time": "2019-03-25T19:12:02+00:00"
"time": "2019-08-08T18:11:40+00:00"
},
{
"name": "doctrine/instantiator",
@ -5520,16 +5522,16 @@
},
{
"name": "joomla-projects/selenium-server-standalone",
"version": "3.141.59",
"version": "v3.14.0",
"source": {
"type": "git",
"url": "https://github.com/joomla-projects/selenium-server-standalone.git",
"reference": "2a2310b540344169d52e3d517d3f1d1b4d0b9f4f"
"reference": "2939723f470918b6b72b0c05ba1978a41f0ef49d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/2a2310b540344169d52e3d517d3f1d1b4d0b9f4f",
"reference": "2a2310b540344169d52e3d517d3f1d1b4d0b9f4f",
"url": "https://api.github.com/repos/joomla-projects/selenium-server-standalone/zipball/2939723f470918b6b72b0c05ba1978a41f0ef49d",
"reference": "2939723f470918b6b72b0c05ba1978a41f0ef49d",
"shasum": ""
},
"bin": [
@ -5546,16 +5548,16 @@
"Apache-2.0"
],
"authors": [
{
"name": "Puneet Kala",
"email": "puneet.kala@community.joomla.org"
},
{
"name": "Sven Eisenschmidt",
"email": "sven.eisenschmidt@gmail.com"
},
{
"name": "Javier Gómez",
"name": "Puneet Kala",
"email": "puneet.kala@community.joomla.org"
},
{
"name": "Javier Gomez",
"email": "javier.gomez@community.joomla.org"
}
],
@ -5565,7 +5567,7 @@
"selenium",
"testing"
],
"time": "2019-07-31T05:15:24+00:00"
"time": "2018-08-19T04:08:16+00:00"
},
{
"name": "joomla/cms-coding-standards",
@ -5785,16 +5787,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.9.1",
"version": "1.9.3",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
"reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
"reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
"shasum": ""
},
"require": {
@ -5829,7 +5831,7 @@
"object",
"object graph"
],
"time": "2019-04-07T13:18:21+00:00"
"time": "2019-08-09T12:45:53+00:00"
},
{
"name": "phar-io/manifest",
@ -6453,16 +6455,16 @@
},
{
"name": "phpunit/phpunit",
"version": "8.3.3",
"version": "8.3.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c319d08ebd31e137034c84ad7339054709491485"
"reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c319d08ebd31e137034c84ad7339054709491485",
"reference": "c319d08ebd31e137034c84ad7339054709491485",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e31cce0cf4499c0ccdbbb211a3280d36ab341e36",
"reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36",
"shasum": ""
},
"require": {
@ -6532,7 +6534,7 @@
"testing",
"xunit"
],
"time": "2019-08-03T15:41:47+00:00"
"time": "2019-08-11T06:56:55+00:00"
},
{
"name": "ralouphie/getallheaders",
@ -6794,16 +6796,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.0",
"version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
"reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687",
"reference": "06a9a5947f47b3029d76118eb5c22802e5869687",
"shasum": ""
},
"require": {
@ -6830,6 +6832,10 @@
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Jeff Welch",
"email": "whatthejeff@gmail.com"
@ -6838,17 +6844,13 @@
"name": "Volker Dusch",
"email": "github@wallbash.com"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@2bepublished.at"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
"name": "Adam Harvey",
"email": "aharvey@php.net"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "Provides the functionality to export PHP variables for visualization",
@ -6857,7 +6859,7 @@
"export",
"exporter"
],
"time": "2017-04-03T13:19:02+00:00"
"time": "2019-08-11T12:43:14+00:00"
},
{
"name": "sebastian/global-state",

View File

@ -4,7 +4,7 @@
client="installation">
<name>English (United Kingdom)</name>
<version>4.0.0</version>
<creationDate>June 2019</creationDate>
<creationDate>August 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>

View File

@ -929,7 +929,7 @@ class DatabaseModel extends BaseInstallationModel
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function checkTestingSampledata($db)
{
@ -941,6 +941,7 @@ class DatabaseModel extends BaseInstallationModel
}
$testingPlugin = new \stdClass;
$testingPlugin->extension_id = null;
$testingPlugin->name = 'plg_sampledata_testing';
$testingPlugin->type = 'plugin';
$testingPlugin->element = 'testing';
@ -951,7 +952,17 @@ class DatabaseModel extends BaseInstallationModel
$testingPlugin->manifest_cache = '';
$testingPlugin->params = '{}';
$db->insertObject('#__extensions', $testingPlugin);
$db->insertObject('#__extensions', $testingPlugin, 'extension_id');
$installer = new Installer;
if (!$installer->refreshManifestCache($testingPlugin->extension_id))
{
Factory::getApplication()->enqueueMessage(
Text::sprintf('INSTL_DATABASE_COULD_NOT_REFRESH_MANIFEST_CACHE', $testingPlugin->name),
'error'
);
}
}
/**

View File

@ -16,56 +16,24 @@ if (document.getElementById('installAddFeatures')) {
}
if (document.getElementById('skipLanguages')) {
document.getElementById('skipLanguages').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}
if (document.getElementById('installSampleData')) {
document.getElementById('installSampleData').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}
if (document.getElementById('skipSampleData')) {
document.getElementById('skipSampleData').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.toggle('active');
document.getElementById('installSampleData').style.display = 'none';
document.getElementById('installFinal').classList.add('active');
})
document.getElementById('skipLanguages').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installFinal').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}
if (document.getElementById('installLanguagesButton')) {
document.getElementById('installLanguagesButton').addEventListener('click', function(e) {
e.preventDefault();
var form = document.getElementById('languagesForm');
if (form) {
// Install the extra languages
if (Joomla.install(['languages'], form)) {
document.getElementById('installLanguages').classList.remove('active');
document.getElementById('installSampleData').classList.add('active');
}
}
})
}
if (document.getElementById('installSampleDataButton')) {
document.getElementById('installSampleDataButton').addEventListener('click', function(e) {
e.preventDefault();
var form = document.getElementById('sampleDataForm');
if (form) {
// Install the extra languages
Joomla.install(['sample'], form);
document.getElementById('installSampleData').classList.toggle('active');
document.getElementById('installSampleData').style.display = 'none';
document.getElementById('installFinal').classList.add('active');
}
})
document.getElementById('installLanguagesButton').addEventListener('click', function(e) {
e.preventDefault();
var form = document.getElementById('languagesForm');
if (form) {
// Install the extra languages
if (Joomla.install(['languages'], form)) {
document.getElementById('installLanguages').classList.remove('active');
document.getElementById('installFinal').classList.add('active');
}
}
})
}

View File

@ -187,28 +187,6 @@ use Joomla\CMS\Uri\Uri;
</div>
</fieldset>
<fieldset id="installSampleData" class="j-install-step">
<legend class="j-install-step-header">
<span class="fa fa-cog" aria-hidden="true"></span> <?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE'); ?>
</legend>
<div class="j-install-step-form">
<h2><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE_LABEL'); ?></h2>
<p><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE_DESC'); ?></p>
<form action="index.php" method="post" id="sampleDataForm" class="form-validate">
<div class="form-group">
<input type="hidden" name="sample_file" value="sample_testing.sql">
<?php echo HTMLHelper::_('form.token'); ?>
<button id="installSampleDataButton" class="btn btn-primary btn-block"><?php echo Text::_('INSTL_SITE_INSTALL_SAMPLE'); ?> <span class="fa fa-chevron-right" aria-hidden="true"></span></button>
<button id="skipSampleData" class="btn btn-block btn-secondary">
<?php echo Text::_('JSKIP'); ?>
</button>
</div>
</form>
</div>
</fieldset>
<fieldset id="installFinal" class="j-install-step">
<legend class="j-install-step-header">
<span class="fab fa-joomla" aria-hidden="true"></span> <?php echo Text::_('INSTL_COMPLETE_FINAL'); ?>

View File

@ -2,7 +2,7 @@
<metafile version="3.9" client="site">
<name>English (en-GB)</name>
<version>4.0.0</version>
<creationDate>June 2019</creationDate>
<creationDate>August 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -3,7 +3,7 @@
<name>English (en-GB)</name>
<tag>en-GB</tag>
<version>4.0.0</version>
<creationDate>June 2019</creationDate>
<creationDate>August 2019</creationDate>
<author>Joomla! Project</author>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>

View File

@ -1,79 +0,0 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields> section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellcheck Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $checkedOptions Options that will be set as checked.
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $inputType Options available for this field.
*/
$attr = '';
// Initialize some field attributes.
$attr .= $disabled ? ' disabled' : '';
$attr .= !empty($size) ? ' size="' . $size . '"' : '';
$attr .= $multiple ? ' multiple' : '';
$attr .= $autofocus ? ' autofocus' : '';
$attr .= $onchange ? ' onchange="' . $onchange . '"' : '';
$attr2 = '';
$attr2 .= !empty($class) ? ' class="' . $class . '"' : '';
$attr2 .= ' placeholder="' . $this->escape($hint ?: Text::_('JGLOBAL_TYPE_OR_SELECT_SOME_OPTIONS')) . '" ';
if ($required)
{
$attr .= ' required class="required"';
$attr2 .= ' required';
}
Text::script('JGLOBAL_SELECT_NO_RESULTS_MATCH');
Text::script('JGLOBAL_SELECT_PRESS_TO_SELECT');
Factory::getDocument()->getWebAssetManager()->enableAsset('choicesjs');
HTMLHelper::_('webcomponent', 'system/fields/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);
?>
<joomla-field-fancy-select <?php echo $attr2; ?>><?php
echo HTMLHelper::_('access.level', $name, $value, $attr, $options, $id);
?></joomla-field-fancy-select>

View File

@ -1,60 +0,0 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
use Joomla\CMS\HTML\HTMLHelper;
extract($displayData);
/**
* Layout variables
* -----------------
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields> section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellcheck Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $checkedOptions Options that will be set as checked.
* @var boolean $hasValue Has this field a value assigned?
* @var array $options Options available for this field.
* @var array $inputType Options available for this field.
*/
$attr = '';
// Initialize some field attributes.
$attr .= !empty($class) ? ' class="custom-select ' . $class . '"' : ' class="custom-select"';
$attr .= $disabled ? ' disabled' : '';
$attr .= !empty($size) ? ' size="' . $size . '"' : '';
$attr .= $multiple ? ' multiple' : '';
$attr .= $required ? ' required' : '';
$attr .= $autofocus ? ' autofocus' : '';
$attr .= $onchange ? ' onchange="' . $onchange . '"' : '';
$attr .= !empty($description) ? ' aria-describedby="' . $name . '-desc"' : '';
echo HTMLHelper::_('access.level', $name, $value, $attr, $options, $id);

View File

@ -42,7 +42,7 @@ abstract class JHtmlAccess
*
* @return string The required HTML for the SELECT tag.
*
* @see JFormFieldAccessLevel
* @see \Joomla\CMS\Form\Field\AccesslevelField
* @since 1.6
*/
public static function level($name, $selected, $attribs = '', $params = true, $id = false)
@ -94,7 +94,7 @@ abstract class JHtmlAccess
*
* @return string The required HTML for the SELECT tag.
*
* @see JFormFieldUsergroup
* @see \Joomla\CMS\Form\Field\UsergrouplistField
* @since 1.6
*/
public static function usergroup($name, $selected, $attribs = '', $allowAll = true, $id = false)

View File

@ -36,7 +36,7 @@ abstract class JHtmlContentLanguage
*
* @return string
*
* @see JFormFieldContentLanguage
* @see \Joomla\CMS\Form\Field\ContentlanguageField
* @since 1.6
*/
public static function existing($all = false, $translate = false)

View File

@ -55,7 +55,7 @@ abstract class JHtmlSelect
* @return string HTML for the radio list
*
* @since 1.5
* @see JFormFieldRadio
* @see \Joomla\CMS\Form\Field\RadioField
*/
public static function booleanlist($name, $attribs = array(), $selected = null, $yes = 'JYES', $no = 'JNO', $id = false)
{

View File

@ -28,7 +28,7 @@ abstract class JHtmlTel
*
* @return string The formatted telephone number.
*
* @see JFormRuleTel
* @see \Joomla\CMS\Form\Rule\TelRule
* @since 1.6
*/
public static function tel($number, $displayplan)

View File

@ -17,6 +17,7 @@ use Joomla\CMS\Log\Log;
use Joomla\CMS\Profiler\Profiler;
use Joomla\CMS\Table\Asset;
use Joomla\CMS\User\User;
use Joomla\Database\ParameterType;
use Joomla\Utilities\ArrayHelper;
/**
@ -286,14 +287,23 @@ class Access
!JDEBUG ?: Profiler::getInstance('Application')->mark('Before Access::preloadPermissions (' . $extensionName . ')');
// Get the database connection object.
$db = Factory::getDbo();
$extraQuery = $db->quoteName('name') . ' = ' . $db->quote($extensionName) . ' OR ' . $db->quoteName('parent_id') . ' = 0';
$db = Factory::getDbo();
$assetKey = $extensionName . '.%';
// Get a fresh query object.
$query = $db->getQuery(true)
->select($db->quoteName(array('id', 'name', 'rules', 'parent_id')))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' LIKE ' . $db->quote($extensionName . '.%') . ' OR ' . $extraQuery);
->where(
[
$db->quoteName('name') . ' LIKE :asset',
$db->quoteName('name') . ' = :extension',
$db->quoteName('parent_id') . ' = 0',
],
'OR'
)
->bind(':extension', $extensionName)
->bind(':asset', $assetKey);
// Get the permission map for all assets in the asset extension.
$assets = $db->setQuery($query)->loadObjectList();
@ -353,7 +363,7 @@ class Access
$query = $db->getQuery(true)
->select($db->quoteName(array('id', 'name', 'rules', 'parent_id')))
->from($db->quoteName('#__assets'))
->where($db->quoteName('name') . ' IN (' . implode(',', $db->quote($components)) . ')');
->whereIn($db->quoteName('name'), $components, ParameterType::STRING);
// Get the Name Permission Map List
$assets = $db->setQuery($query)->loadObjectList();
@ -587,56 +597,59 @@ class Access
// Build the database query to get the rules for the asset.
$query = $db->getQuery(true)
->select($db->quoteName(($recursive ? 'b.rules' : 'a.rules'), 'rules'))
->select($db->quoteName(($recursive ? array('b.id', 'b.name', 'b.parent_id') : array('a.id', 'a.name', 'a.parent_id'))))
->select($db->quoteName($recursive ? 'b.rules' : 'a.rules', 'rules'))
->from($db->quoteName('#__assets', 'a'));
// If the asset identifier is numeric assume it is a primary key, else lookup by name.
$assetString = is_numeric($assetKey) ? $db->quoteName('a.id') . ' = ' . $assetKey : $db->quoteName('a.name') . ' = ' . $db->quote($assetKey);
$extensionString = '';
if (is_numeric($assetKey))
{
$query->where($db->quoteName('a.id') . ' = :asset', 'OR')
->bind(':asset', $assetKey, ParameterType::INTEGER);
}
else
{
$query->where($db->quoteName('a.name') . ' = :asset', 'OR')
->bind(':asset', $assetKey);
}
if ($recursiveParentAsset && ($extensionName !== $assetKey || is_numeric($assetKey)))
{
$extensionString = ' OR ' . $db->quoteName('a.name') . ' = ' . $db->quote($extensionName);
$query->where($db->quoteName('a.name') . ' = :extension')
->bind(':extension', $extensionName);
}
$recursiveString = $recursive ? ' OR ' . $db->quoteName('a.parent_id') . ' = 0' : '';
$query->where('(' . $assetString . $extensionString . $recursiveString . ')');
// If we want the rules cascading up to the global asset node we need a self-join.
if ($recursive)
{
$query->join('LEFT', $db->quoteName('#__assets', 'b') . ' ON b.lft <= a.lft AND b.rgt >= a.rgt')
$query->where($db->quoteName('a.parent_id') . ' = 0')
->join(
'LEFT',
$db->quoteName('#__assets', 'b'),
$db->quoteName('b.lft') . ' <= ' . $db->quoteName('a.lft') . ' AND ' . $db->quoteName('b.rgt') . ' >= ' . $db->quoteName('a.rgt')
)
->order($db->quoteName('b.lft'));
}
// Execute the query and load the rules from the result.
$result = $db->setQuery($query)->loadObjectList();
$result = $db->setQuery($query)->loadColumn();
// Get the root even if the asset is not found and in recursive mode
if (empty($result))
{
$assets = new Asset($db);
$rootId = (new Asset($db))->getRootId();
$query->clear()
->select($db->quoteName(array('id', 'name', 'parent_id', 'rules')))
->select($db->quoteName('rules'))
->from($db->quoteName('#__assets'))
->where($db->quoteName('id') . ' = ' . $db->quote($assets->getRootId()));
->where($db->quoteName('id') . ' = :rootId')
->bind(':rootId', $rootId, ParameterType::INTEGER);
$result = $db->setQuery($query)->loadObjectList();
}
$collected = array();
foreach ($result as $asset)
{
$collected[] = $asset->rules;
$result = $db->setQuery($query)->loadColumn();
}
// Instantiate and return the Rules object for the asset rules.
$rules = new Rules;
$rules->mergeCollection($collected);
$rules->mergeCollection($result);
!JDEBUG ?: Profiler::getInstance('Application')->mark('Before Access::getAssetRules <strong>Slower</strong> (assetKey:' . $assetKey . ')');
@ -833,12 +846,16 @@ class Access
*/
public static function getGroupTitle($groupId)
{
// Cast as integer until method is typehinted.
$groupId = (int) $groupId;
// Fetch the group title from the database
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select('title')
->from('#__usergroups')
->where('id = ' . $db->quote($groupId));
$query->select($db->quoteName('title'))
->from($db->quoteName('#__usergroups'))
->where($db->quoteName('id') . ' = :groupId')
->bind(':groupId', $groupId, ParameterType::INTEGER);
$db->setQuery($query);
return $db->loadResult();
@ -858,13 +875,16 @@ class Access
*/
public static function getGroupsByUser($userId, $recursive = true)
{
// Cast as integer until method is typehinted.
$userId = (int) $userId;
// Creates a simple unique string for each parameter combination:
$storeId = $userId . ':' . (int) $recursive;
if (!isset(self::$groupsByUser[$storeId]))
{
// TODO: Uncouple this from ComponentHelper and allow for a configuration setting or value injection.
$guestUsergroup = ComponentHelper::getParams('com_users')->get('guest_usergroup', 1);
$guestUsergroup = (int) ComponentHelper::getParams('com_users')->get('guest_usergroup', 1);
// Guest user (if only the actually assigned group is requested)
if (empty($userId) && !$recursive)
@ -878,24 +898,30 @@ class Access
// Build the database query to get the rules for the asset.
$query = $db->getQuery(true)
->select($recursive ? 'b.id' : 'a.id');
->select($db->quoteName($recursive ? 'b.id' : 'a.id'));
if (empty($userId))
{
$query->from('#__usergroups AS a')
->where('a.id = ' . (int) $guestUsergroup);
$query->from($db->quoteName('#__usergroups', 'a'))
->where($db->quoteName('a.id') . ' = :guest')
->bind(':guest', $guestUsergroup, ParameterType::INTEGER);
}
else
{
$query->from('#__user_usergroup_map AS map')
->where('map.user_id = ' . (int) $userId)
->join('LEFT', '#__usergroups AS a ON a.id = map.group_id');
$query->from($db->quoteName('#__user_usergroup_map', 'map'))
->where($db->quoteName('map.user_id') . ' = :userId')
->join('LEFT', $db->quoteName('#__usergroups', 'a'), $db->quoteName('a.id') . ' = ' . $db->quoteName('map.group_id'))
->bind(':userId', $userId, ParameterType::INTEGER);
}
// If we want the rules cascading up to the global asset node we need a self-join.
if ($recursive)
{
$query->join('LEFT', '#__usergroups AS b ON b.lft <= a.lft AND b.rgt >= a.rgt');
$query->join(
'LEFT',
$db->quoteName('#__usergroups', 'b'),
$db->quoteName('b.lft') . ' <= ' . $db->quoteName('a.lft') . ' AND ' . $db->quoteName('b.rgt') . ' >= ' . $db->quoteName('a.rgt')
);
}
// Execute the query and load the rules from the result.
@ -907,7 +933,7 @@ class Access
if (empty($result))
{
$result = array('1');
$result = array(1);
}
else
{
@ -934,18 +960,26 @@ class Access
*/
public static function getUsersByGroup($groupId, $recursive = false)
{
// Cast as integer until method is typehinted.
$groupId = (int) $groupId;
// Get a database object.
$db = Factory::getDbo();
$test = $recursive ? '>=' : '=';
$test = $recursive ? ' >= ' : ' = ';
// First find the users contained in the group
$query = $db->getQuery(true)
->select('DISTINCT(user_id)')
->from('#__usergroups as ug1')
->join('INNER', '#__usergroups AS ug2 ON ug2.lft' . $test . 'ug1.lft AND ug1.rgt' . $test . 'ug2.rgt')
->join('INNER', '#__user_usergroup_map AS m ON ug2.id=m.group_id')
->where('ug1.id=' . $db->quote($groupId));
->select('DISTINCT(' . $db->quoteName('user_id') . ')')
->from($db->quoteName('#__usergroups', 'ug1'))
->join(
'INNER',
$db->quoteName('#__usergroups', 'ug2'),
$db->quoteName('ug2.lft') . $test . $db->quoteName('ug1.lft') . ' AND ' . $db->quoteName('ug1.rgt') . $test . $db->quoteName('ug2.rgt')
)
->join('INNER', $db->quoteName('#__user_usergroup_map', 'm'), $db->quoteName('ug2.id') . ' = ' . $db->quoteName('m.group_id'))
->where($db->quoteName('ug1.id') . ' = :groupId')
->bind(':groupId', $groupId, ParameterType::INTEGER);
$db->setQuery($query);
@ -976,7 +1010,7 @@ class Access
// Build the base query.
$query = $db->getQuery(true)
->select('id, rules')
->select($db->quoteName(['id', 'rules']))
->from($db->quoteName('#__viewlevels'));
// Set the query for execution.

View File

@ -20,6 +20,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\Database\ParameterType;
use Joomla\DI\Container;
use Joomla\Registry\Registry;
@ -199,22 +200,41 @@ class AdministratorApplication extends CMSApplication
return $this->template->template;
}
$admin_style = Factory::getUser()->getParam('admin_style');
$admin_style = (int) Factory::getUser()->getParam('admin_style');
// Load the template name from the database
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('template, s.params')
->from('#__template_styles as s')
->join('LEFT', '#__extensions as e ON e.type=' . $db->quote('template') . ' AND e.element=s.template AND e.client_id=s.client_id');
->select($db->quoteName(['s.template', 's.params']))
->from($db->quoteName('#__template_styles', 's'))
->join(
'LEFT',
$db->quoteName('#__extensions', 'e'),
$db->quoteName('e.type') . ' = ' . $db->quote('template')
. ' AND ' . $db->quoteName('e.element') . ' = ' . $db->quoteName('s.template')
. ' AND ' . $db->quoteName('e.client_id') . ' = ' . $db->quoteName('s.client_id')
)
->where(
[
$db->quoteName('s.client_id') . ' = 1',
$db->quoteName('s.home') . ' = ' . $db->quote('1'),
]
);
if ($admin_style)
{
$query->where('s.client_id = 1 AND id = ' . (int) $admin_style . ' AND e.enabled = 1', 'OR');
$query->extendWhere(
'OR',
[
$db->quoteName('s.client_id') . ' = 1',
$db->quoteName('s.id') . ' = :style',
$db->quoteName('e.enabled') . ' = 1',
]
)
->bind(':style', $admin_style, ParameterType::INTEGER);
}
$query->where('s.client_id = 1 AND home = ' . $db->quote('1'), 'OR')
->order('home');
$query->order($db->quoteName('s.home'));
$db->setQuery($query);
$template = $db->loadObject();
@ -355,15 +375,20 @@ class AdministratorApplication extends CMSApplication
*/
public static function purgeMessages()
{
$user = Factory::getUser();
$userid = $user->get('id');
$userId = Factory::getUser()->id;
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('*')
->select($db->quoteName(['cfg_name', 'cfg_value']))
->from($db->quoteName('#__messages_cfg'))
->where($db->quoteName('user_id') . ' = ' . (int) $userid, 'AND')
->where($db->quoteName('cfg_name') . ' = ' . $db->quote('auto_purge'), 'AND');
->where(
[
$db->quoteName('user_id') . ' = :userId',
$db->quoteName('cfg_name') . ' = ' . $db->quote('auto_purge'),
]
)
->bind(':userId', $userId, ParameterType::INTEGER);
$db->setQuery($query);
$config = $db->loadObject();
@ -382,13 +407,19 @@ class AdministratorApplication extends CMSApplication
if ($purge > 0)
{
// Purge old messages at day set in message configuration
$past = Factory::getDate(time() - $purge * 86400);
$pastStamp = $past->toSql();
$past = Factory::getDate(time() - $purge * 86400)->toSql();
$query->clear()
$query = $db->getQuery(true)
->delete($db->quoteName('#__messages'))
->where($db->quoteName('date_time') . ' < ' . $db->quote($pastStamp), 'AND')
->where($db->quoteName('user_id_to') . ' = ' . (int) $userid, 'AND');
->where(
[
$db->quoteName('date_time') . ' < :past',
$db->quoteName('user_id_to') . ' = :userId',
]
)
->bind(':past', $past)
->bind(':userId', $userId, ParameterType::INTEGER);
$db->setQuery($query);
$db->execute();
}

View File

@ -160,7 +160,7 @@ interface CMSApplicationInterface extends ExtensionManagerInterface
*
* @return string The name of the application.
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getName();

View File

@ -37,7 +37,7 @@ class ConsoleApplication extends Application implements DispatcherAwareInterface
* The name of the application.
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected $name = null;
@ -194,7 +194,7 @@ class ConsoleApplication extends Application implements DispatcherAwareInterface
*
* @return string The name of the application.
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getName(): string
{

View File

@ -458,11 +458,21 @@ final class SiteApplication extends CMSApplication
// Load styles
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('id, home, template, s.params')
->from('#__template_styles as s')
->where('s.client_id = 0')
->where('e.enabled = 1')
->join('LEFT', '#__extensions as e ON e.element=s.template AND e.type=' . $db->quote('template') . ' AND e.client_id=s.client_id');
->select($db->quoteName(['id', 'home', 'template', 's.params']))
->from($db->quoteName('#__template_styles', 's'))
->where(
[
$db->quoteName('s.client_id') . ' = 0',
$db->quoteName('e.enabled') . ' = 1',
]
)
->join(
'LEFT',
$db->quoteName('#__extensions', 'e'),
$db->quoteName('e.element') . ' = ' . $db->quoteName('s.template')
. ' AND ' . $db->quoteName('e.type') . ' = ' . $db->quote('template')
. ' AND ' . $db->quoteName('e.client_id') . ' = ' . $db->quoteName('s.client_id')
);
$db->setQuery($query);
$templates = $db->loadObjectList('id');

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -24,7 +24,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Console command for adding a user
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class AddUserCommand extends AbstractCommand
{
@ -32,21 +32,21 @@ class AddUserCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:add';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
/**
* Stores the Input Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $cliInput;
@ -55,7 +55,7 @@ class AddUserCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $user;
@ -64,7 +64,7 @@ class AddUserCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $password;
@ -73,7 +73,7 @@ class AddUserCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $name;
@ -82,7 +82,7 @@ class AddUserCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $email;
@ -91,7 +91,7 @@ class AddUserCommand extends AbstractCommand
*
* @var array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $userGroups = [];
@ -103,7 +103,7 @@ class AddUserCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -164,7 +164,7 @@ class AddUserCommand extends AbstractCommand
*
* @return integer
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getGroupId($groupName)
{
@ -187,7 +187,7 @@ class AddUserCommand extends AbstractCommand
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
public function getStringFromOption($option, $question): string
{
@ -213,7 +213,7 @@ class AddUserCommand extends AbstractCommand
*
* @return array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getUserGroups(): array
{
@ -276,7 +276,7 @@ class AddUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -289,7 +289,7 @@ class AddUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -26,7 +26,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Console command to add a user to group
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class AddUserToGroupCommand extends AbstractCommand
{
@ -34,21 +34,21 @@ class AddUserToGroupCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:addtogroup';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
/**
* Stores the Input Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $cliInput;
@ -57,7 +57,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $username;
@ -66,7 +66,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @var array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $userGroups = [];
@ -78,7 +78,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -136,7 +136,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getGroups($user): array
{
@ -202,7 +202,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return integer
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getGroupId($groupName)
{
@ -225,7 +225,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return object
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getUserId($username)
{
@ -250,7 +250,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getStringFromOption($option, $question): string
{
@ -272,7 +272,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -285,7 +285,7 @@ class AddUserToGroupCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -21,7 +21,7 @@ use Joomla\CMS\User\User;
/**
* Console command to change a user's password
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class ChangeUserPasswordCommand extends AbstractCommand
{
@ -29,21 +29,21 @@ class ChangeUserPasswordCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:reset-password';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
/**
* Stores the Input Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $cliInput;
@ -52,7 +52,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $username;
@ -61,7 +61,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $password;
@ -73,7 +73,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -116,7 +116,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getStringFromOption($option, $question): string
{
@ -145,7 +145,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -158,7 +158,7 @@ class ChangeUserPasswordCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -25,7 +25,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Console command for deleting a user
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class DeleteUserCommand extends AbstractCommand
{
@ -33,21 +33,21 @@ class DeleteUserCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:delete';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
/**
* Stores the Input Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $cliInput;
@ -56,7 +56,7 @@ class DeleteUserCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $username;
@ -68,7 +68,7 @@ class DeleteUserCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -143,7 +143,7 @@ class DeleteUserCommand extends AbstractCommand
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getStringFromOption($option, $question): string
{
@ -165,7 +165,7 @@ class DeleteUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -178,7 +178,7 @@ class DeleteUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -19,7 +19,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Console command to list existing users
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class ListUserCommand extends AbstractCommand
{
@ -27,14 +27,14 @@ class ListUserCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:list';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
@ -46,7 +46,7 @@ class ListUserCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -97,7 +97,7 @@ class ListUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -109,7 +109,7 @@ class ListUserCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -2,7 +2,7 @@
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
@ -26,7 +26,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Console command to remove a user from a group
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class RemoveUserFromGroupCommand extends AbstractCommand
{
@ -34,21 +34,21 @@ class RemoveUserFromGroupCommand extends AbstractCommand
* The default command name
*
* @var string
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected static $defaultName = 'user:removefromgroup';
/**
* SymfonyStyle Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $ioStyle;
/**
* Stores the Input Object
* @var object
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $cliInput;
@ -57,7 +57,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @var string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $username;
@ -66,7 +66,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @var array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private $userGroups = array();
@ -78,7 +78,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return integer The command exit code
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function doExecute(InputInterface $input, OutputInterface $output): int
{
@ -165,7 +165,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return array
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getGroups($user): array
{
@ -227,7 +227,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return integer
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getGroupId($groupName)
{
@ -251,7 +251,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function getStringFromOption($option, $question): string
{
@ -273,7 +273,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
private function configureIO(InputInterface $input, OutputInterface $output)
{
@ -286,7 +286,7 @@ class RemoveUserFromGroupCommand extends AbstractCommand
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
protected function configure(): void
{

View File

@ -13,7 +13,7 @@ defined('JPATH_PLATFORM') or die;
/**
* Abstract AES encryption class
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
abstract class AbstractAES
{

View File

@ -13,7 +13,7 @@ defined('JPATH_PLATFORM') or die;
/**
* Interface for AES encryption adapters
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
interface AesInterface
{

View File

@ -15,7 +15,7 @@ defined('JPATH_PLATFORM') or die;
/**
* Mcrypt implementation
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class Mcrypt extends AbstractAES implements AesInterface
{

View File

@ -15,7 +15,7 @@ defined('JPATH_PLATFORM') or die;
/**
* OpenSSL encryption class
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class OpenSSL extends AbstractAES implements AesInterface
{

View File

@ -82,7 +82,7 @@ class Aes
* @param string $password The password (either user-provided password or binary encryption key) to use
* @param bool $legacyMode True to use the legacy key expansion. We recommend against using it.
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
* @return void
*/
public function setPassword($password, $legacyMode = false)

View File

@ -13,7 +13,7 @@ defined('JPATH_PLATFORM') or die;
/**
* Interface RandValInterface
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
interface RandValInterface
{

View File

@ -13,7 +13,7 @@ defined('JPATH_PLATFORM') or die;
/**
* Generates cryptographically-secure random values.
*
* @since __DEPLOY_VERSION__
* @since 4.0.0
*/
class Randval implements RandValInterface
{

View File

@ -279,7 +279,6 @@ class ExtensionHelper
array('plugin', 'sessiongc', 'system', 0),
array('plugin', 'skipto', 'system', 0),
array('plugin', 'stats', 'system', 0),
array('plugin', 'sessiongc', 'system', 0),
array('plugin', 'updatenotification', 'system', 0),
// Core plugin extensions - two factor authentication

View File

@ -10,6 +10,8 @@ namespace Joomla\CMS\Form\Field;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\HTML\HTMLHelper;
/**
* Form Field class for the Joomla Platform.
* Provides a list of access levels. Access levels control what users in specific
@ -29,10 +31,14 @@ class AccesslevelField extends ListField
protected $type = 'Accesslevel';
/**
* Name of the layout being used to render the field
* Method to get the field options.
*
* @var string
* @since 4.0.0
* @return array The field option objects.
*
* @since __DEPLOY_VERSION__
*/
protected $layout = 'joomla.form.field.accesslevel';
protected function getOptions()
{
return array_merge(parent::getOptions(), HTMLHelper::_('access.assetgroups'));
}
}

View File

@ -15,7 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper;
/**
* Provides a list of content languages
*
* @see JFormFieldLanguage for a select list of application languages.
* @see \Joomla\CMS\Form\Field\LanguageField for a select list of application languages.
* @since 1.6
*/
class ContentlanguageField extends ListField

Some files were not shown because too many files have changed in this diff Show More