Skip to content

Commit

Permalink
Merge branch '4.0-dev' of https://github.com/joomla/joomla-cms into r…
Browse files Browse the repository at this point in the history
…elease

# Conflicts:
#	administrator/components/com_finder/tmpl/index/default.php
  • Loading branch information
Hackwar committed Jul 24, 2019
2 parents f6970da + ba2c285 commit 0b2cb2c
Show file tree
Hide file tree
Showing 113 changed files with 819 additions and 764 deletions.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Joomla Contributor Covenant Code of Conduct

This document outlines the Code of Conduct for all persons volunteering their service to the Joomla Project and/or Open Source Matters. It covers your behaviour as a member of the Joomla community, in any forum, mailing list, Wiki, Web site, IRC channel, install-fest, public meeting or private correspondence.
This document outlines the Code of Conduct for all persons volunteering their service to the Joomla Project and/or Open Source Matters. It covers your behaviour as a member of the Joomla community, in any forum, mailing list, Wiki, website, IRC channel, install-fest, public meeting or private correspondence.

If you cannot agree to any of these principles, then volunteering in the Joomla Project is not for you. Contributing to our community assumes acceptance of these principles:
## Be Considerate
Expand Down Expand Up @@ -35,7 +35,7 @@ Check your e-mails regularly and answer them promptly—even if it's "I'll get b
Sometimes the hardest thing to say is "no" or admit you've forgotten do something. Be honest with each other and yourself with regards to what you say and what you can realistically commit to.
## Follow the Rules

Volunteers are expected to uphold Joomla's licensing and trademark requirements including, but not limited to, compliance on their own or affiliate Web sites and extensions. Make sure you have sought the appropriate approvals for domain name, name and logo usage prior to volunteering and that any extensions you distribute comply with the Joomla license.
Volunteers are expected to uphold Joomla's licensing and trademark requirements including, but not limited to, compliance on their own or affiliate websites and extensions. Make sure you have sought the appropriate approvals for domain name, name and logo usage prior to volunteering and that any extensions you distribute comply with the Joomla license.

All work contributed to the Project, whether code, documentation or other material, must observe the appropriate licenses as set down by the Core Team and Open Source Matters.

Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/4.0-dev

2- What is Joomla?
* Joomla! is a Content Management System (CMS) which enables you to build Web sites and powerful online applications.
* Joomla! is a Content Management System (CMS) which enables you to build websites and powerful online applications.
* It's a free and Open Source software, distributed under the GNU General Public License version 2 or later.
* This is a simple and powerful web server application and it requires a server with PHP and either MySQL, PostgreSQL or SQL Server to run.
You can find full technical requirements here: https://downloads.joomla.org/technical-requirements.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE `#__newsfeeds` MODIFY `publish_up` datetime NULL DEFAULT NULL;
ALTER TABLE `#__newsfeeds` MODIFY `publish_down` datetime NULL DEFAULT NULL;
ALTER TABLE `#__newsfeeds` MODIFY `checked_out_time` datetime NULL DEFAULT NULL;

UPDATE `#__newsfeeds` SET
`publish_up` = CASE WHEN `publish_up` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_up` END,
`publish_down` = CASE WHEN `publish_down` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `publish_down` END,
`checked_out_time` = CASE WHEN `checked_out_time` IN ('0000-00-00 00:00:00', '1000-01-01 00:00:00') THEN NULL ELSE `checked_out_time` END;
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "
('cassiopeia', 'template', 'cassiopeia', '', 0, 1, 1, 0, '{}', '{}', '', '', 0, '1970-01-01 00:00:00', 0, 0);

INSERT INTO "#__template_styles" ("template", "client_id", "home", "title", "params") VALUES
('atum', 1, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = 1 AND client_id = 1 AND "template" IN ('isis', 'hathor')) as c) = 0 THEN 0 ELSE 1 END), 'atum - Default', '{}'),
('cassiopeia', 0, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = 1 AND client_id = 0 AND "template" IN ('protostar', 'beez3')) as c) = 0 THEN 0 ELSE 1 END), 'cassiopeia - Default', '{}');
('atum', 1, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = '1' AND client_id = 1 AND "template" IN ('isis', 'hathor')) as c) = 0 THEN '0' ELSE '1' END), 'atum - Default', '{}'),
('cassiopeia', 0, (CASE WHEN (SELECT count FROM (SELECT count("id") AS count FROM "#__template_styles" WHERE home = '1' AND client_id = 0 AND "template" IN ('protostar', 'beez3')) as c) = 0 THEN '0' ELSE '1' END), 'cassiopeia - Default', '{}');

--
-- Now we can clean up the old templates
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_up" DROP NOT NULL;
ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_up" DROP DEFAULT;

ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_down" DROP NOT NULL;
ALTER TABLE "#__newsfeeds" ALTER COLUMN "publish_down" DROP DEFAULT;

ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out_time" DROP NOT NULL;
ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out_time" DROP DEFAULT;

UPDATE "#__newsfeeds" SET
"publish_up" = CASE WHEN "publish_up" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_up" END,
"publish_down" = CASE WHEN "publish_down" = '1970-01-01 00:00:00' THEN NULL ELSE "publish_down" END,
"checked_out_time" = CASE WHEN "checked_out_time" = '1970-01-01 00:00:00' THEN NULL ELSE "checked_out_time" END;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<field
name="itemtype"
type="itemtype"
label="COM_ASSOCIATIONS_FILTER_SELECT_ITEM_TYPE"
label="COM_ASSOCIATIONS_FILTER_SELECT_ITEM"
filtermode="selector"
onchange="Joomla.resetFilters(this)"
>
Expand All @@ -13,7 +13,7 @@
<field
name="language"
type="contentlanguage"
label="JOPTION_SELECT_LANGUAGE"
label="COM_ASSOCIATIONS_FILTER_SELECT_LANGUAGE"
filtermode="selector"
onchange="this.form.submit();"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
?>
<tr class="row<?php echo $i % 2; ?>">
<?php if (!empty($this->typeSupports['state'])) : ?>
<td class="center">
<td class="text-center tbody-icon">
<span class="<?php echo $iconStates[$this->escape($item->state)]; ?>" aria-hidden="true"></span>
</td>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . HTMLHelper::_('tooltipText', 'JORDERINGDISABLED');
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler <?php echo $iconClass ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
if ($allowSelect)
{
$html .= '<button'
. ' class="btn btn-primary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-primary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_select"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -166,7 +166,7 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
if ($allowNew)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-secondary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_new"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -179,7 +179,7 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
if ($allowEdit)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? '' : ' hidden') . '"'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' id="' . $this->id . '_edit"'
. ' data-toggle="modal"'
. ' type="button"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . HTMLHelper::_('tooltipText', 'JORDERINGDISABLED');
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<td class="text-center tbody-icon">
<span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span>
</td>
<th scope="row">
Expand Down
20 changes: 13 additions & 7 deletions administrator/components/com_config/Model/ApplicationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\UserHelper;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -829,10 +830,11 @@ public function storePermissions($permission = null)
try
{
// Get the asset id by the name of the component.
$query = $this->getDbo()->getQuery(true)
->select($this->getDbo()->quoteName('id'))
->from($this->getDbo()->quoteName('#__assets'))
->where($this->getDbo()->quoteName('name') . ' = ' . $this->getDbo()->quote($permission['component']));
$query = $this->_db->getQuery(true)
->select($this->_db->quoteName('id'))
->from($this->_db->quoteName('#__assets'))
->where($this->_db->quoteName('name') . ' = :component')
->bind(':component', $permission['component']);

$this->_db->setQuery($query);

Expand All @@ -855,18 +857,21 @@ public function storePermissions($permission = null)
$query->clear()
->select($this->_db->quoteName('parent_id'))
->from($this->_db->quoteName('#__assets'))
->where($this->_db->quoteName('id') . ' = ' . $assetId);
->where($this->_db->quoteName('id') . ' = :assetid')
->bind(':assetid', $assetId, ParameterType::INTEGER);

$this->_db->setQuery($query);

$parentAssetId = (int) $this->_db->loadResult();
}

// Get the group parent id of the current group.
$rule = (int) $permission['rule'];
$query->clear()
->select($this->_db->quoteName('parent_id'))
->from($this->_db->quoteName('#__usergroups'))
->where($this->_db->quoteName('id') . ' = ' . (int) $permission['rule']);
->where($this->_db->quoteName('id') . ' = :rule')
->bind(':rule', $rule, ParameterType::INTEGER);

$this->_db->setQuery($query);

Expand All @@ -876,7 +881,8 @@ public function storePermissions($permission = null)
$query->clear()
->select('COUNT(' . $this->_db->quoteName('id') . ')')
->from($this->_db->quoteName('#__usergroups'))
->where($this->_db->quoteName('parent_id') . ' = ' . (int) $permission['rule']);
->where($this->_db->quoteName('parent_id') . ' = :rule')
->bind(':rule', $rule, ParameterType::INTEGER);

$this->_db->setQuery($query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function jSelectContact_" . $this->id . "(id, title, object) {
if ($allowSelect)
{
$html .= '<button'
. ' class="btn btn-primary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-primary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_select"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -157,7 +157,7 @@ function jSelectContact_" . $this->id . "(id, title, object) {
if ($allowNew)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-secondary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_new"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -170,7 +170,7 @@ function jSelectContact_" . $this->id . "(id, title, object) {
if ($allowEdit)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? '' : ' hidden') . '"'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' id="' . $this->id . '_edit"'
. ' data-toggle="modal"'
. ' type="button"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ public function association($contactid)
*
* @since 1.6
*/
public function featured($value = 0, $i = 0, $canChange = true)
public function featured($value, $i, $canChange = true)
{
if ($i === 0)
{
throw new \InvalidArgumentException('$i is not allowed to be 0');
}

// Array of image, task, title, action
$states = array(
0 => array('unfeatured', 'contacts.featured', 'COM_CONTACT_UNFEATURED', 'JGLOBAL_TOGGLE_FEATURED'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . HTMLHelper::_('tooltipText', 'JORDERINGDISABLED');
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass; ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<td class="text-center tbody-icon">
<span class="<?php echo $iconStates[$this->escape($item->published)]; ?>" aria-hidden="true"></span>
</td>
<th scope="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function jSelectArticle_" . $this->id . "(id, title, catid, object, url, languag
if ($allowSelect)
{
$html .= '<button'
. ' class="btn btn-primary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-primary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_select"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -158,7 +158,7 @@ function jSelectArticle_" . $this->id . "(id, title, catid, object, url, languag
if ($allowNew)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? ' hidden' : '') . '"'
. ' class="btn btn-secondary' . ($value ? ' hidden' : '') . '"'
. ' id="' . $this->id . '_new"'
. ' data-toggle="modal"'
. ' type="button"'
Expand All @@ -171,7 +171,7 @@ function jSelectArticle_" . $this->id . "(id, title, catid, object, url, languag
if ($allowEdit)
{
$html .= '<button'
. ' class="btn btn-secondary hasTooltip' . ($value ? '' : ' hidden') . '"'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' id="' . $this->id . '_edit"'
. ' data-toggle="modal"'
. ' type="button"'
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/Model/ArticlesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public function __construct($config = array())
'level',
'tag',
'rating_count', 'rating',
'condition',
'stage',
);

if (Associations::isEnabled())
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/Model/FeaturedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function __construct($config = array())
'level',
'tag',
'rating_count', 'rating',
'condition',
'stage',
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,8 @@ public function association($articleid)
*
* @return string HTML code
*/
public function featured($value = 0, $i = 0, $canChange = true)
public function featured($value, $i, $canChange = true)
{
if ($i === 0)
{
throw new \InvalidArgumentException('$i is not allowed to be 0');
}

// Array of image, task, title, action
$states = array(
0 => array('unfeatured', 'articles.featured', 'COM_CONTENT_UNFEATURED', 'JGLOBAL_TOGGLE_FEATURED'),
Expand Down
6 changes: 6 additions & 0 deletions administrator/components/com_content/tmpl/article/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@

<?php echo HTMLHelper::_('uitab.endTabSet'); ?>

<?php // Creating 'id' hiddenField to cope with com_associations sidebyside loop ?>
<?php if ($params->get('show_publishing_options', 1) == 0) : ?>
<?php $hidden_fields = $this->form->getInput('id'); ?>
<div class="hidden"><?php echo $hidden_fields; ?></div>
<?php endif; ?>

<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo $input->getCmd('return'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . HTMLHelper::_('tooltipText', 'JORDERINGDISABLED');
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

HTMLHelper::_('script', 'com_content/admin-articles-default-stage-footer.js', ['version' => 'auto', 'relative' => true]);
?>
<a class="btn btn-secondary" type="button" data-dismiss="modal">
<button class="btn btn-secondary" type="button" data-dismiss="modal">
<?php echo Text::_('JCANCEL'); ?>
</a>
</button>
<button id="stage-submit-button-id" class="btn btn-success" type="button" data-submit-task="">
<?php echo Text::_('JGLOBAL_STAGE_PROCESS'); ?>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="text-center">
<td class="text-center tbody-icon">
<span class="<?php echo $iconStates[$this->escape($item->state)]; ?>" aria-hidden="true"></span>
</td>
<th scope="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . HTMLHelper::_('tooltipText', 'JORDERINGDISABLED');
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

HTMLHelper::_('script', 'com_content/admin-articles-default-stage-footer.js', ['version' => 'auto', 'relative' => true]);
?>
<a class="btn btn-secondary" type="button" data-dismiss="modal">
<button class="btn btn-secondary" type="button" data-dismiss="modal">
<?php echo Text::_('JCANCEL'); ?>
</a>
</button>
<button id="stage-submit-button-id" class="btn btn-success" type="button" data-submit-task="">
<?php echo Text::_('JGLOBAL_STAGE_PROCESS'); ?>
</button>

0 comments on commit 0b2cb2c

Please sign in to comment.