diff --git a/administrator/components/com_actionlogs/Field/LogcreatorField.php b/administrator/components/com_actionlogs/Field/LogcreatorField.php
index 28ff4cb68da0b..133e1ece5080a 100644
--- a/administrator/components/com_actionlogs/Field/LogcreatorField.php
+++ b/administrator/components/com_actionlogs/Field/LogcreatorField.php
@@ -58,12 +58,12 @@ protected function getOptions()
// Construct the query
$query = $db->getQuery(true)
->select($db->quoteName('u.id', 'value'))
- ->select($db->quoteName('u.name', 'text'))
+ ->select($db->quoteName('u.username', 'text'))
->from($db->quoteName('#__users', 'u'))
->join('INNER', $db->quoteName('#__action_logs', 'c') . ' ON ' . $db->quoteName('c.user_id') . ' = ' . $db->quoteName('u.id'))
->group($db->quoteName('u.id'))
- ->group($db->quoteName('u.name'))
- ->order($db->quoteName('u.name'));
+ ->group($db->quoteName('u.username'))
+ ->order($db->quoteName('u.username'));
// Setup the query
$db->setQuery($query);
diff --git a/administrator/components/com_admin/Model/SysinfoModel.php b/administrator/components/com_admin/Model/SysinfoModel.php
index e699a022a9e10..0bba09c258748 100644
--- a/administrator/components/com_admin/Model/SysinfoModel.php
+++ b/administrator/components/com_admin/Model/SysinfoModel.php
@@ -530,7 +530,7 @@ public function getDirectory($public = false)
foreach ($admin_langs as $folder)
{
- if (!$folder->isDir() || $folder->isDot())
+ if ($folder->isDot() || !$folder->isDir())
{
continue;
}
@@ -546,7 +546,7 @@ public function getDirectory($public = false)
foreach ($manifests as $folder)
{
- if (!$folder->isDir() || $folder->isDot())
+ if ($folder->isDot() || !$folder->isDir())
{
continue;
}
@@ -569,7 +569,7 @@ public function getDirectory($public = false)
foreach ($image_folders as $folder)
{
- if (!$folder->isDir() || $folder->isDot())
+ if ($folder->isDot() || !$folder->isDir())
{
continue;
}
@@ -587,7 +587,7 @@ public function getDirectory($public = false)
foreach ($site_langs as $folder)
{
- if (!$folder->isDir() || $folder->isDot())
+ if ($folder->isDot() || !$folder->isDir())
{
continue;
}
@@ -605,7 +605,7 @@ public function getDirectory($public = false)
foreach ($plugin_groups as $folder)
{
- if (!$folder->isDir() || $folder->isDot())
+ if ($folder->isDot() || !$folder->isDir())
{
continue;
}
diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql
new file mode 100644
index 0000000000000..3738ee367d0ac
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql
@@ -0,0 +1 @@
+ALTER TABLE `#__template_styles` MODIFY `home` char(7) NOT NULL DEFAULT '0';
diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql
new file mode 100644
index 0000000000000..33df450aa00ca
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/3.9.8-2019-06-15.sql
@@ -0,0 +1,4 @@
+ALTER TABLE `#__template_styles` DROP INDEX `idx_home`;
+# Query removed, see https://github.com/joomla/joomla-cms/pull/25484
+ALTER TABLE `#__template_styles` ADD INDEX `idx_client_id` (`client_id`);
+ALTER TABLE `#__template_styles` ADD INDEX `idx_client_id_home` (`client_id`, `home`);
diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql
new file mode 100644
index 0000000000000..b1a394cd5c582
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/3.9.10-2019-07-09.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "#__template_styles" ALTER COLUMN "home" TYPE character varying(7);
+ALTER TABLE "#__template_styles" ALTER COLUMN "home" SET DEFAULT '0';
diff --git a/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql b/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql
new file mode 100644
index 0000000000000..3acf06149c527
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/3.9.8-2019-06-15.sql
@@ -0,0 +1,4 @@
+DROP INDEX IF EXISTS "#__template_styles_idx_home";
+# Queries removed, see https://github.com/joomla/joomla-cms/pull/25484
+CREATE INDEX "#__template_styles_idx_client_id" ON "#__template_styles" ("client_id");
+CREATE INDEX "#__template_styles_idx_client_id_home" ON "#__template_styles" ("client_id", "home");
diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.9.7-2019-05-16.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.9.7-2019-05-16.sql
deleted file mode 100644
index e03422239c89e..0000000000000
--- a/administrator/components/com_admin/sql/updates/sqlazure/3.9.7-2019-05-16.sql
+++ /dev/null
@@ -1 +0,0 @@
-# Query removed, see https://github.com/joomla/joomla-cms/pull/25177
diff --git a/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-11.sql b/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-11.sql
deleted file mode 100644
index caefb45bd147d..0000000000000
--- a/administrator/components/com_admin/sql/updates/sqlazure/3.9.8-2019-06-11.sql
+++ /dev/null
@@ -1 +0,0 @@
-UPDATE [#__users] SET [params] = REPLACE([params], '",,"', '","');
\ No newline at end of file
diff --git a/administrator/components/com_banners/Model/BannerModel.php b/administrator/components/com_banners/Model/BannerModel.php
index fe11165f9c226..e056a05cd7aae 100644
--- a/administrator/components/com_banners/Model/BannerModel.php
+++ b/administrator/components/com_banners/Model/BannerModel.php
@@ -115,20 +115,17 @@ protected function batchClient($value, $pks, $contexts)
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->state != -2)
{
- if ($record->state != -2)
- {
- return false;
- }
-
- if (!empty($record->catid))
- {
- return Factory::getUser()->authorise('core.delete', 'com_banners.category.' . (int) $record->catid);
- }
+ return false;
+ }
- return parent::canDelete($record);
+ if (!empty($record->catid))
+ {
+ return Factory::getUser()->authorise('core.delete', 'com_banners.category.' . (int) $record->catid);
}
+
+ return parent::canDelete($record);
}
/**
diff --git a/administrator/components/com_banners/Model/ClientModel.php b/administrator/components/com_banners/Model/ClientModel.php
index ee037e1c33169..035af62f19f84 100644
--- a/administrator/components/com_banners/Model/ClientModel.php
+++ b/administrator/components/com_banners/Model/ClientModel.php
@@ -41,22 +41,17 @@ class ClientModel extends AdminModel
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->state != -2)
{
- if ($record->state != -2)
- {
- return false;
- }
-
- $user = Factory::getUser();
-
- if (!empty($record->catid))
- {
- return $user->authorise('core.delete', 'com_banners.category.' . (int) $record->catid);
- }
+ return false;
+ }
- return $user->authorise('core.delete', 'com_banners');
+ if (!empty($record->catid))
+ {
+ return Factory::getUser()->authorise('core.delete', 'com_banners.category.' . (int) $record->catid);
}
+
+ return parent::canDelete($record);
}
/**
diff --git a/administrator/components/com_contact/Model/ContactModel.php b/administrator/components/com_contact/Model/ContactModel.php
index 911c7a3c3d52b..59c04ea0f507e 100644
--- a/administrator/components/com_contact/Model/ContactModel.php
+++ b/administrator/components/com_contact/Model/ContactModel.php
@@ -120,15 +120,12 @@ protected function batchUser($value, $pks, $contexts)
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->published != -2)
{
- if ($record->published != -2)
- {
- return false;
- }
-
- return Factory::getUser()->authorise('core.delete', 'com_contact.category.' . (int) $record->catid);
+ return false;
}
+
+ return Factory::getUser()->authorise('core.delete', 'com_contact.category.' . (int) $record->catid);
}
/**
@@ -520,35 +517,6 @@ public function featured($pks, $value = 0)
return true;
}
- /**
- * Method to change the title & alias.
- *
- * @param integer $category_id The id of the parent.
- * @param string $alias The alias.
- * @param string $name The title.
- *
- * @return array Contains the modified title and alias.
- *
- * @since 3.1
- */
- protected function generateNewTitle($category_id, $alias, $name)
- {
- // Alter the title & alias
- $table = $this->getTable();
-
- while ($table->load(array('alias' => $alias, 'catid' => $category_id)))
- {
- if ($name == $table->name)
- {
- $name = StringHelper::increment($name);
- }
-
- $alias = StringHelper::increment($alias, 'dash');
- }
-
- return array($name, $alias);
- }
-
/**
* Is the user allowed to create an on the fly category?
*
diff --git a/administrator/components/com_contact/Table/ContactTable.php b/administrator/components/com_contact/Table/ContactTable.php
index 242091e18d58c..4ab92882776ea 100644
--- a/administrator/components/com_contact/Table/ContactTable.php
+++ b/administrator/components/com_contact/Table/ContactTable.php
@@ -55,6 +55,8 @@ public function __construct(DatabaseDriver $db)
$this->typeAlias = 'com_contact.contact';
parent::__construct('#__contact_details', 'id', $db);
+
+ $this->setColumnAlias('title', 'name');
}
/**
diff --git a/administrator/components/com_content/Model/ArticleModel.php b/administrator/components/com_content/Model/ArticleModel.php
index 33095366071f3..2f2d9c080c4ba 100644
--- a/administrator/components/com_content/Model/ArticleModel.php
+++ b/administrator/components/com_content/Model/ArticleModel.php
@@ -272,7 +272,7 @@ protected function canDelete($record)
{
if (!empty($record->id))
{
- $stage = new StageTable($this->_db);
+ $stage = new StageTable($this->getDbo());
$workflow = new Workflow(['extension' => 'com_content']);
diff --git a/administrator/components/com_content/Model/ArticlesModel.php b/administrator/components/com_content/Model/ArticlesModel.php
index 4b4fe75663f0d..d8e1a11cb56e4 100644
--- a/administrator/components/com_content/Model/ArticlesModel.php
+++ b/administrator/components/com_content/Model/ArticlesModel.php
@@ -495,6 +495,11 @@ protected function getListQuery()
$orderCol = $this->state->get('list.ordering', 'a.id');
$orderDirn = $this->state->get('list.direction', 'DESC');
+ if ($orderCol == 'a.ordering' || $orderCol == 'category_title')
+ {
+ $orderCol = $db->quoteName('c.title') . ' ' . $orderDirn . ', ' . $db->quoteName('a.ordering');
+ }
+
$query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn));
return $query;
diff --git a/administrator/components/com_fields/Model/FieldModel.php b/administrator/components/com_fields/Model/FieldModel.php
index 7dd66b07be9af..8135ab350b11e 100644
--- a/administrator/components/com_fields/Model/FieldModel.php
+++ b/administrator/components/com_fields/Model/FieldModel.php
@@ -762,19 +762,14 @@ public function cleanupValues($context, $itemId)
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->state != -2)
{
- if ($record->state != -2)
- {
- return false;
- }
-
- $parts = FieldsHelper::extract($record->context);
-
- return Factory::getUser()->authorise('core.delete', $parts[0] . '.field.' . (int) $record->id);
+ return false;
}
- return false;
+ $parts = FieldsHelper::extract($record->context);
+
+ return Factory::getUser()->authorise('core.delete', $parts[0] . '.field.' . (int) $record->id);
}
/**
diff --git a/administrator/components/com_installer/Model/InstallerModel.php b/administrator/components/com_installer/Model/InstallerModel.php
index 6b7e32d86e269..27f96f5eff26e 100644
--- a/administrator/components/com_installer/Model/InstallerModel.php
+++ b/administrator/components/com_installer/Model/InstallerModel.php
@@ -124,10 +124,10 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
$total = count($result);
$this->cache[$this->getStoreId('getTotal')] = $total;
- if ($total < $limitstart)
+ if ($total <= $limitstart)
{
$limitstart = 0;
- $this->setState('list.start', 0);
+ $this->setState('list.limitstart', 0);
}
return array_slice($result, $limitstart, $limit ?: null);
diff --git a/administrator/components/com_menus/Controller/ItemController.php b/administrator/components/com_menus/Controller/ItemController.php
index a0b49fb8b6441..99a1883b73b59 100644
--- a/administrator/components/com_menus/Controller/ItemController.php
+++ b/administrator/components/com_menus/Controller/ItemController.php
@@ -365,7 +365,7 @@ public function save($key = null, $urlVar = null)
$data = $model->validate($form, $data);
// Preprocess request fields to ensure that we remove not set or empty request params
- $request = $form->getGroup('request');
+ $request = $form->getGroup('request', true);
// Check for the special 'request' entry.
if ($data['type'] == 'component' && !empty($request))
diff --git a/administrator/components/com_menus/Model/ItemModel.php b/administrator/components/com_menus/Model/ItemModel.php
index 528e2be1f63df..6e5de71165cd2 100644
--- a/administrator/components/com_menus/Model/ItemModel.php
+++ b/administrator/components/com_menus/Model/ItemModel.php
@@ -103,27 +103,19 @@ class ItemModel extends AdminModel
*/
protected function canDelete($record)
{
- $user = Factory::getUser();
-
- if (!empty($record->id))
+ if (empty($record->id) || $record->published != -2)
{
- // Only delete trashed items
- if ($record->published != -2)
- {
- return false;
- }
-
- $menuTypeId = 0;
+ return false;
+ }
- if (!empty($record->menutype))
- {
- $menuTypeId = $this->getMenuTypeId($record->menutype);
- }
+ $menuTypeId = 0;
- return $user->authorise('core.delete', 'com_menus.menu.' . (int) $menuTypeId);
+ if (!empty($record->menutype))
+ {
+ $menuTypeId = $this->getMenuTypeId($record->menutype);
}
- return false;
+ return Factory::getUser()->authorise('core.delete', 'com_menus.menu.' . (int) $menuTypeId);
}
/**
diff --git a/administrator/components/com_modules/Model/ModuleModel.php b/administrator/components/com_modules/Model/ModuleModel.php
index 92fe2b58c01c2..f2008a795a92a 100644
--- a/administrator/components/com_modules/Model/ModuleModel.php
+++ b/administrator/components/com_modules/Model/ModuleModel.php
@@ -316,18 +316,14 @@ protected function batchMove($value, $pks, $contexts)
*/
protected function canEditState($record)
{
- $user = Factory::getUser();
-
// Check for existing module.
if (!empty($record->id))
{
- return $user->authorise('core.edit.state', 'com_modules.module.' . (int) $record->id);
+ return Factory::getUser()->authorise('core.edit.state', 'com_modules.module.' . (int) $record->id);
}
+
// Default to component settings if module not known.
- else
- {
- return parent::canEditState('com_modules');
- }
+ return parent::canEditState($record);
}
/**
diff --git a/administrator/components/com_newsfeeds/Model/NewsfeedModel.php b/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
index fe76963c80d24..80fb266d9ac34 100644
--- a/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
+++ b/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
@@ -62,26 +62,17 @@ class NewsfeedModel extends AdminModel
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->published != -2)
{
- if ($record->published != -2)
- {
- return false;
- }
-
- $user = Factory::getUser();
+ return false;
+ }
- if (!empty($record->catid))
- {
- return $user->authorise('core.delete', 'com_newsfeed.category.' . (int) $record->catid);
- }
- else
- {
- return parent::canDelete($record);
- }
+ if (!empty($record->catid))
+ {
+ return Factory::getUser()->authorise('core.delete', 'com_newsfeed.category.' . (int) $record->catid);
}
- return false;
+ return parent::canDelete($record);
}
/**
@@ -95,11 +86,9 @@ protected function canDelete($record)
*/
protected function canEditState($record)
{
- $user = Factory::getUser();
-
if (!empty($record->catid))
{
- return $user->authorise('core.edit.state', 'com_newsfeeds.category.' . (int) $record->catid);
+ return Factory::getUser()->authorise('core.edit.state', 'com_newsfeeds.category.' . (int) $record->catid);
}
return parent::canEditState($record);
@@ -436,35 +425,6 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
parent::preprocessForm($form, $data, $group);
}
- /**
- * Method to change the title & alias.
- *
- * @param integer $category_id The id of the parent.
- * @param string $alias The alias.
- * @param string $name The title.
- *
- * @return array Contains the modified title and alias.
- *
- * @since 3.1
- */
- protected function generateNewTitle($category_id, $alias, $name)
- {
- // Alter the title & alias
- $table = $this->getTable();
-
- while ($table->load(array('alias' => $alias, 'catid' => $category_id)))
- {
- if ($name == $table->name)
- {
- $name = StringHelper::increment($name);
- }
-
- $alias = StringHelper::increment($alias, 'dash');
- }
-
- return array($name, $alias);
- }
-
/**
* Is the user allowed to create an on the fly category?
*
diff --git a/administrator/components/com_newsfeeds/Table/NewsfeedTable.php b/administrator/components/com_newsfeeds/Table/NewsfeedTable.php
index eae8e4ca76deb..2366fd48ec72c 100644
--- a/administrator/components/com_newsfeeds/Table/NewsfeedTable.php
+++ b/administrator/components/com_newsfeeds/Table/NewsfeedTable.php
@@ -51,6 +51,7 @@ public function __construct(DatabaseDriver $db)
{
$this->typeAlias = 'com_newsfeeds.newsfeed';
parent::__construct('#__newsfeeds', 'id', $db);
+ $this->setColumnAlias('title', 'name');
}
/**
diff --git a/administrator/components/com_redirect/Model/LinkModel.php b/administrator/components/com_redirect/Model/LinkModel.php
index e22e529ba811c..5cf46f547f025 100644
--- a/administrator/components/com_redirect/Model/LinkModel.php
+++ b/administrator/components/com_redirect/Model/LinkModel.php
@@ -47,24 +47,7 @@ protected function canDelete($record)
return false;
}
- $user = Factory::getUser();
-
- return $user->authorise('core.delete', 'com_redirect');
- }
-
- /**
- * Method to test whether a record can have its state edited.
- *
- * @param object $record A record object.
- *
- * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
- *
- * @since 1.6
- */
- protected function canEditState($record)
- {
- // Check the component since there are no categories or other assets.
- return Factory::getUser()->authorise('core.edit.state', 'com_redirect');
+ return parent::canDelete($record);
}
/**
diff --git a/administrator/components/com_tags/Model/TagModel.php b/administrator/components/com_tags/Model/TagModel.php
index b5272bea39fea..ae6ec36fbb979 100644
--- a/administrator/components/com_tags/Model/TagModel.php
+++ b/administrator/components/com_tags/Model/TagModel.php
@@ -61,29 +61,12 @@ class TagModel extends AdminModel
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->published != -2)
{
- if ($record->published != -2)
- {
- return false;
- }
-
- return parent::canDelete($record);
+ return false;
}
- }
- /**
- * Method to test whether a record can have its state changed.
- *
- * @param object $record A record object.
- *
- * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
- *
- * @since 3.1
- */
- protected function canEditState($record)
- {
- return parent::canEditState($record);
+ return parent::canDelete($record);
}
/**
diff --git a/build/media_source/com_joomlaupdate/js/update.es5.js b/build/media_source/com_joomlaupdate/js/update.es5.js
index 32a8c1f2e405b..bf48c60e77b56 100644
--- a/build/media_source/com_joomlaupdate/js/update.es5.js
+++ b/build/media_source/com_joomlaupdate/js/update.es5.js
@@ -244,7 +244,6 @@ stepExtract = function(data)
stat_percent = (stat_inbytes * 100) / joomlaupdate_totalsize;
// Update GUI
- stat_inbytes += data.bytesIn;
stat_outbytes += data.bytesOut;
stat_files += data.files;
@@ -265,7 +264,7 @@ stepExtract = function(data)
jQuery('#extpercent').text(stat_percent.toFixed(1) + '%');
jQuery('#extbytesin').text(stat_inbytes);
jQuery('#extbytesout').text(stat_outbytes);
- jQuery('#extfiles').text(data.files);
+ jQuery('#extfiles').text(stat_files);
// Do AJAX post
post = {
diff --git a/build/media_source/com_templates/js/admin-templates-default.es6.js b/build/media_source/com_templates/js/admin-templates-default.es6.js
index 86a27abb0b339..46c4b9ab41783 100644
--- a/build/media_source/com_templates/js/admin-templates-default.es6.js
+++ b/build/media_source/com_templates/js/admin-templates-default.es6.js
@@ -84,8 +84,6 @@
filePathTmp = filePathTmp.slice(1);
filePathTmp = filePathTmp.split('/');
filePathTmp = filePathTmp[filePathTmp.length - 1];
- // eslint-disable-next-line no-new
- const re = new RegExp(filePathTmp);
listEls.forEach((element, index) => {
element.querySelector('a').classList.add('active');
@@ -97,7 +95,7 @@
const aEl = liElement.querySelector('a');
const spanEl = aEl.querySelector('span');
- if (spanEl && re.test(spanEl.innerText)) {
+ if (spanEl && spanEl.innerText.trim()) {
aEl.classList.add('active');
}
});
diff --git a/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js b/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
index decdae18de293..7625ca9e38367 100644
--- a/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
+++ b/build/media_source/system/js/fields/joomla-field-subform.w-c.es6.js
@@ -273,7 +273,12 @@
const name = $el.getAttribute('name');
- const id = name.replace(/(\[\]$)/g, '').replace(/(\]\[)/g, '__').replace(/\[/g, '_').replace(/\]/g, '');
+ const id = name
+ .replace(/(\[\]$)/g, '')
+ .replace(/(\]\[)/g, '__')
+ .replace(/\[/g, '_')
+ .replace(/\]/g, '')
+ .replace(/\W/g, '_');
// id from name
const nameNew = name.replace(`[${group}][`, `[${groupnew}][`);
diff --git a/components/com_config/Model/CmsModel.php b/components/com_config/Model/CmsModel.php
index 9d7ef80ad1d38..f13ea83e89287 100644
--- a/components/com_config/Model/CmsModel.php
+++ b/components/com_config/Model/CmsModel.php
@@ -244,17 +244,12 @@ protected function cleanCache($group = null)
*/
protected function canDelete($record)
{
- if (!empty($record->id))
+ if (empty($record->id) || $record->published != -2)
{
- if ($record->published != -2)
- {
- return false;
- }
-
- $user = Factory::getUser();
-
- return $user->authorise('core.delete', $this->option);
+ return false;
}
+
+ return Factory::getUser()->authorise('core.delete', $this->option);
}
/**
@@ -268,8 +263,6 @@ protected function canDelete($record)
*/
protected function canEditState($record)
{
- $user = Factory::getUser();
-
- return $user->authorise('core.edit.state', $this->option);
+ return Factory::getUser()->authorise('core.edit.state', $this->option);
}
}
diff --git a/components/com_config/Model/FormModel.php b/components/com_config/Model/FormModel.php
index 847ae632727c0..dbac514174e03 100644
--- a/components/com_config/Model/FormModel.php
+++ b/components/com_config/Model/FormModel.php
@@ -148,6 +148,8 @@ protected function loadForm($name, $source = null, $options = array(), $clear =
// Get the form.
// Register the paths for the form -- failing here
$paths = new \SplPriorityQueue;
+ $paths->insert(JPATH_COMPONENT_ADMINISTRATOR . '/model/form', 'normal');
+ $paths->insert(JPATH_COMPONENT_ADMINISTRATOR . '/model/field', 'normal');
$paths->insert(JPATH_COMPONENT . '/model/form', 'normal');
$paths->insert(JPATH_COMPONENT . '/model/field', 'normal');
$paths->insert(JPATH_COMPONENT . '/model/rule', 'normal');
@@ -159,8 +161,11 @@ protected function loadForm($name, $source = null, $options = array(), $clear =
// Solution until JForm supports splqueue
Form::addFormPath(JPATH_COMPONENT . '/forms');
+ Form::addFieldPath(JPATH_COMPONENT . '/Field');
Form::addFormPath(JPATH_COMPONENT . '/models/forms');
Form::addFieldPath(JPATH_COMPONENT . '/models/fields');
+ Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR . '/model/form');
+ Form::addFieldPath(JPATH_COMPONENT_ADMINISTRATOR . '/model/field');
Form::addFormPath(JPATH_COMPONENT . '/model/form');
Form::addFieldPath(JPATH_COMPONENT . '/model/field');
diff --git a/components/com_content/Model/ArticleModel.php b/components/com_content/Model/ArticleModel.php
index 1064ed0659200..6d804c54263ff 100644
--- a/components/com_content/Model/ArticleModel.php
+++ b/components/com_content/Model/ArticleModel.php
@@ -380,6 +380,8 @@ public function storeVote($pk = 0, $rate = 0)
}
}
+ $this->cleanCache();
+
return true;
}
@@ -387,4 +389,25 @@ public function storeVote($pk = 0, $rate = 0)
return false;
}
+
+ /**
+ * Cleans the cache of com_content and content modules
+ *
+ * @param string $group The cache group
+ * @param integer $clientId The ID of the client
+ *
+ * @return void
+ *
+ * @since 3.9.9
+ */
+ protected function cleanCache($group = null, $clientId = 0)
+ {
+ parent::cleanCache('com_content');
+ parent::cleanCache('mod_articles_archive');
+ parent::cleanCache('mod_articles_categories');
+ parent::cleanCache('mod_articles_category');
+ parent::cleanCache('mod_articles_latest');
+ parent::cleanCache('mod_articles_news');
+ parent::cleanCache('mod_articles_popular');
+ }
}
diff --git a/components/com_fields/layouts/fields/render.php b/components/com_fields/layouts/fields/render.php
index 2b4b84e1d53a9..1f4afb2c10f63 100644
--- a/components/com_fields/layouts/fields/render.php
+++ b/components/com_fields/layouts/fields/render.php
@@ -54,7 +54,7 @@
foreach ($fields as $field)
{
// If the value is empty do nothing
- if (!isset($field->value) || $field->value == '')
+ if (!isset($field->value) || trim($field->value) === '')
{
continue;
}
@@ -63,6 +63,12 @@
$layout = $field->params->get('layout', 'render');
$content = FieldsHelper::render($context, 'field.' . $layout, array('field' => $field));
+ // If the content is empty do nothing
+ if (trim($content) === '')
+ {
+ continue;
+ }
+
$output[] = '
' . $content . '';
}
diff --git a/composer.json b/composer.json
index aabd9468e5347..dc6055090b78e 100644
--- a/composer.json
+++ b/composer.json
@@ -82,7 +82,7 @@
"fig/link-util": "~1.0",
"google/recaptcha": "~1.1",
"ozdemirburak/iris": "1.2.*",
- "paragonie/sodium_compat": "~1.6",
+ "paragonie/sodium_compat": "~1.9.1",
"phpmailer/phpmailer": "~6.0",
"psr/link": "~1.0",
"symfony/console": "4.3.*",
diff --git a/composer.lock b/composer.lock
index 694d0d073f2f3..71bde1b4795e1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -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": "d553659408e6a1e479a4fb22cbf671c1",
+ "content-hash": "c2d9521396bad250579701210f92c251",
"packages": [
{
"name": "algo26-matthias/idna-convert",
@@ -60,16 +60,16 @@
},
{
"name": "composer/ca-bundle",
- "version": "1.2.3",
+ "version": "1.2.4",
"source": {
"type": "git",
"url": "https://github.com/composer/ca-bundle.git",
- "reference": "f26a67e397be0e5c00d7c52ec7b5010098e15ce5"
+ "reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/ca-bundle/zipball/f26a67e397be0e5c00d7c52ec7b5010098e15ce5",
- "reference": "f26a67e397be0e5c00d7c52ec7b5010098e15ce5",
+ "url": "https://api.github.com/repos/composer/ca-bundle/zipball/10bb96592168a0f8e8f6dcde3532d9fa50b0b527",
+ "reference": "10bb96592168a0f8e8f6dcde3532d9fa50b0b527",
"shasum": ""
},
"require": {
@@ -112,7 +112,7 @@
"ssl",
"tls"
],
- "time": "2019-08-02T09:05:43+00:00"
+ "time": "2019-08-30T08:44:50+00:00"
},
{
"name": "defuse/php-encryption",
@@ -1805,16 +1805,16 @@
},
{
"name": "paragonie/sodium_compat",
- "version": "v1.10.1",
+ "version": "v1.9.4",
"source": {
"type": "git",
"url": "https://github.com/paragonie/sodium_compat.git",
- "reference": "5115fa44886d1c2785d2f135ef4626db868eac4b"
+ "reference": "91c1362bb0084c02828d43bbc9ee38831297329e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/5115fa44886d1c2785d2f135ef4626db868eac4b",
- "reference": "5115fa44886d1c2785d2f135ef4626db868eac4b",
+ "url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/91c1362bb0084c02828d43bbc9ee38831297329e",
+ "reference": "91c1362bb0084c02828d43bbc9ee38831297329e",
"shasum": ""
},
"require": {
@@ -1883,7 +1883,7 @@
"secret-key cryptography",
"side-channel resistant"
],
- "time": "2019-07-12T16:36:59+00:00"
+ "time": "2019-05-09T23:30:36+00:00"
},
{
"name": "phpmailer/phpmailer",
@@ -2249,16 +2249,16 @@
},
{
"name": "symfony/console",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9"
+ "reference": "de63799239b3881b8a08f8481b22348f77ed7b36"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9",
- "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9",
+ "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36",
+ "reference": "de63799239b3881b8a08f8481b22348f77ed7b36",
"shasum": ""
},
"require": {
@@ -2320,20 +2320,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2019-07-24T17:13:59+00:00"
+ "time": "2019-08-26T08:26:39+00:00"
},
{
"name": "symfony/debug",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "527887c3858a2462b0137662c74837288b998ee3"
+ "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/527887c3858a2462b0137662c74837288b998ee3",
- "reference": "527887c3858a2462b0137662c74837288b998ee3",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/afcdea44a2e399c1e4b52246ec8d54c715393ced",
+ "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced",
"shasum": ""
},
"require": {
@@ -2376,20 +2376,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2019-07-23T11:21:36+00:00"
+ "time": "2019-08-20T14:27:59+00:00"
},
{
"name": "symfony/ldap",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/ldap.git",
- "reference": "c76fcad346a5102b8ace06ff2d6830debd490933"
+ "reference": "ba0a1f675ab863cd321f1cf4d501f9b0657d190f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/ldap/zipball/c76fcad346a5102b8ace06ff2d6830debd490933",
- "reference": "c76fcad346a5102b8ace06ff2d6830debd490933",
+ "url": "https://api.github.com/repos/symfony/ldap/zipball/ba0a1f675ab863cd321f1cf4d501f9b0657d190f",
+ "reference": "ba0a1f675ab863cd321f1cf4d501f9b0657d190f",
"shasum": ""
},
"require": {
@@ -2434,20 +2434,20 @@
"active directory",
"ldap"
],
- "time": "2019-05-30T16:10:05+00:00"
+ "time": "2019-08-14T12:26:46+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "40762ead607c8f792ee4516881369ffa553fee6f"
+ "reference": "81c2e120522a42f623233968244baebd6b36cb6a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/40762ead607c8f792ee4516881369ffa553fee6f",
- "reference": "40762ead607c8f792ee4516881369ffa553fee6f",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/81c2e120522a42f623233968244baebd6b36cb6a",
+ "reference": "81c2e120522a42f623233968244baebd6b36cb6a",
"shasum": ""
},
"require": {
@@ -2488,7 +2488,7 @@
"configuration",
"options"
],
- "time": "2019-06-13T11:01:17+00:00"
+ "time": "2019-08-08T09:29:19+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -2722,16 +2722,16 @@
},
{
"name": "symfony/service-contracts",
- "version": "v1.1.5",
+ "version": "v1.1.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d"
+ "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d",
- "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
+ "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
"shasum": ""
},
"require": {
@@ -2776,20 +2776,20 @@
"interoperability",
"standards"
],
- "time": "2019-06-13T11:15:36+00:00"
+ "time": "2019-08-20T14:44:19+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07"
+ "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e4110b992d2cbe198d7d3b244d079c1c58761d07",
- "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6",
+ "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6",
"shasum": ""
},
"require": {
@@ -2852,20 +2852,20 @@
"debug",
"dump"
],
- "time": "2019-07-27T06:42:46+00:00"
+ "time": "2019-08-26T08:26:39+00:00"
},
{
"name": "symfony/web-link",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/web-link.git",
- "reference": "af0e386322f192ed50bd9c812daedce05368733c"
+ "reference": "4bd0ce7c54d604300deee8eb1b1beda856fbba20"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/web-link/zipball/af0e386322f192ed50bd9c812daedce05368733c",
- "reference": "af0e386322f192ed50bd9c812daedce05368733c",
+ "url": "https://api.github.com/repos/symfony/web-link/zipball/4bd0ce7c54d604300deee8eb1b1beda856fbba20",
+ "reference": "4bd0ce7c54d604300deee8eb1b1beda856fbba20",
"shasum": ""
},
"require": {
@@ -2925,20 +2925,20 @@
"psr13",
"push"
],
- "time": "2019-03-14T07:32:46+00:00"
+ "time": "2019-08-08T09:29:19+00:00"
},
{
"name": "symfony/yaml",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6"
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/34d29c2acd1ad65688f58452fd48a46bd996d5a6",
- "reference": "34d29c2acd1ad65688f58452fd48a46bd996d5a6",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
"shasum": ""
},
"require": {
@@ -2984,7 +2984,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2019-07-24T14:47:54+00:00"
+ "time": "2019-08-20T14:27:59+00:00"
},
{
"name": "tobscure/json-api",
@@ -4515,16 +4515,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v2.15.1",
+ "version": "v2.15.3",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
- "reference": "20064511ab796593a3990669eff5f5b535001f7c"
+ "reference": "705490b0f282f21017d73561e9498d2b622ee34c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/20064511ab796593a3990669eff5f5b535001f7c",
- "reference": "20064511ab796593a3990669eff5f5b535001f7c",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/705490b0f282f21017d73561e9498d2b622ee34c",
+ "reference": "705490b0f282f21017d73561e9498d2b622ee34c",
"shasum": ""
},
"require": {
@@ -4554,9 +4554,10 @@
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
- "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
"phpunitgoodpractices/traits": "^1.8",
- "symfony/phpunit-bridge": "^4.3"
+ "symfony/phpunit-bridge": "^4.3",
+ "symfony/yaml": "^3.0 || ^4.0"
},
"suggest": {
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
@@ -4589,17 +4590,17 @@
"MIT"
],
"authors": [
- {
- "name": "Dariusz Rumiński",
- "email": "dariusz.ruminski@gmail.com"
- },
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Dariusz Rumiński",
+ "email": "dariusz.ruminski@gmail.com"
}
],
"description": "A tool to automatically fix PHP code style",
- "time": "2019-06-01T10:32:12+00:00"
+ "time": "2019-08-31T12:51:54+00:00"
},
{
"name": "grasmash/expander",
@@ -5871,18 +5872,18 @@
"authors": [
{
"name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
+ "role": "Developer",
+ "email": "arne@blankerts.de"
},
{
"name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
+ "role": "Developer",
+ "email": "sebastian@phpeople.de"
},
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
+ "role": "Developer",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
@@ -6251,8 +6252,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "role": "lead",
- "email": "sebastian@phpunit.de"
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
}
],
"description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
@@ -6302,8 +6303,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "role": "lead",
+ "email": "sebastian@phpunit.de"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
@@ -6344,8 +6345,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "role": "lead",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Simple template engine.",
@@ -6393,8 +6394,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "role": "lead",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Utility class for timing",
@@ -7140,8 +7141,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "role": "lead",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Collection of value objects that represent the types of the PHP type system",
@@ -7183,8 +7184,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "lead"
+ "role": "lead",
+ "email": "sebastian@phpunit.de"
}
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
@@ -7244,16 +7245,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "a29dd02a1f3f81b9a15c7730cc3226718ddb55ca"
+ "reference": "9e5dddb637b13db82e35695a8603fe6e118cc119"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a29dd02a1f3f81b9a15c7730cc3226718ddb55ca",
- "reference": "a29dd02a1f3f81b9a15c7730cc3226718ddb55ca",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/9e5dddb637b13db82e35695a8603fe6e118cc119",
+ "reference": "9e5dddb637b13db82e35695a8603fe6e118cc119",
"shasum": ""
},
"require": {
@@ -7299,20 +7300,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2019-06-11T15:41:59+00:00"
+ "time": "2019-08-26T08:26:39+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d"
+ "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/105c98bb0c5d8635bea056135304bd8edcc42b4d",
- "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/c6e5e2a00db768c92c3ae131532af4e1acc7bd03",
+ "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03",
"shasum": ""
},
"require": {
@@ -7352,20 +7353,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2019-01-16T21:53:39+00:00"
+ "time": "2019-08-20T14:07:54+00:00"
},
{
"name": "symfony/dom-crawler",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "291397232a2eefb3347eaab9170409981eaad0e2"
+ "reference": "cc686552948d627528c0e2e759186dff67c2610e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/291397232a2eefb3347eaab9170409981eaad0e2",
- "reference": "291397232a2eefb3347eaab9170409981eaad0e2",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/cc686552948d627528c0e2e759186dff67c2610e",
+ "reference": "cc686552948d627528c0e2e759186dff67c2610e",
"shasum": ""
},
"require": {
@@ -7413,20 +7414,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2019-06-13T11:03:18+00:00"
+ "time": "2019-08-26T08:26:39+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "212b020949331b6531250584531363844b34a94e"
+ "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/212b020949331b6531250584531363844b34a94e",
- "reference": "212b020949331b6531250584531363844b34a94e",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
+ "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2",
"shasum": ""
},
"require": {
@@ -7483,7 +7484,7 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2019-06-27T06:42:14+00:00"
+ "time": "2019-08-26T08:55:16+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -7545,16 +7546,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "b9896d034463ad6fd2bf17e2bf9418caecd6313d"
+ "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/b9896d034463ad6fd2bf17e2bf9418caecd6313d",
- "reference": "b9896d034463ad6fd2bf17e2bf9418caecd6313d",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/9abbb7ef96a51f4d7e69627bc6f63307994e4263",
+ "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263",
"shasum": ""
},
"require": {
@@ -7591,20 +7592,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2019-06-23T08:51:25+00:00"
+ "time": "2019-08-20T14:07:54+00:00"
},
{
"name": "symfony/finder",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2"
+ "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/9638d41e3729459860bb96f6247ccb61faaa45f2",
- "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
+ "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
"shasum": ""
},
"require": {
@@ -7640,7 +7641,7 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2019-06-28T13:16:30+00:00"
+ "time": "2019-08-14T12:26:46+00:00"
},
{
"name": "symfony/polyfill-php70",
@@ -7703,16 +7704,16 @@
},
{
"name": "symfony/process",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c"
+ "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c",
- "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c",
+ "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a",
+ "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a",
"shasum": ""
},
"require": {
@@ -7748,20 +7749,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2019-05-30T16:10:05+00:00"
+ "time": "2019-08-26T08:26:39+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v4.3.3",
+ "version": "v4.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "6b100e9309e8979cf1978ac1778eb155c1f7d93b"
+ "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6b100e9309e8979cf1978ac1778eb155c1f7d93b",
- "reference": "6b100e9309e8979cf1978ac1778eb155c1f7d93b",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/1e4ff456bd625be5032fac9be4294e60442e9b71",
+ "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71",
"shasum": ""
},
"require": {
@@ -7798,7 +7799,7 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "time": "2019-05-27T08:16:38+00:00"
+ "time": "2019-08-07T11:52:19+00:00"
},
{
"name": "theseer/tokenizer",
@@ -7833,8 +7834,8 @@
"authors": [
{
"name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
+ "role": "Developer",
+ "email": "arne@blankerts.de"
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
@@ -7842,16 +7843,16 @@
},
{
"name": "webmozart/assert",
- "version": "1.4.0",
+ "version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9"
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9",
- "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"shasum": ""
},
"require": {
@@ -7859,8 +7860,7 @@
"symfony/polyfill-ctype": "^1.8"
},
"require-dev": {
- "phpunit/phpunit": "^4.6",
- "sebastian/version": "^1.0.1"
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"extra": {
@@ -7889,7 +7889,7 @@
"check",
"validate"
],
- "time": "2018-12-25T11:19:39+00:00"
+ "time": "2019-08-24T08:43:50+00:00"
}
],
"aliases": [],
diff --git a/installation/sql/mysql/joomla.sql b/installation/sql/mysql/joomla.sql
index 013d35456c48d..1857c24ca3b28 100644
--- a/installation/sql/mysql/joomla.sql
+++ b/installation/sql/mysql/joomla.sql
@@ -1800,12 +1800,13 @@ CREATE TABLE IF NOT EXISTS `#__template_styles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`template` varchar(50) NOT NULL DEFAULT '',
`client_id` tinyint(1) unsigned NOT NULL DEFAULT 0,
- `home` char(7) NOT NULL DEFAULT 0,
+ `home` char(7) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`params` text NOT NULL,
PRIMARY KEY (`id`),
KEY `idx_template` (`template`),
- KEY `idx_home` (`home`)
+ KEY `idx_client_id` (`client_id`),
+ KEY `idx_client_id_home` (`client_id`,`home`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=9;
--
diff --git a/installation/sql/postgresql/joomla.sql b/installation/sql/postgresql/joomla.sql
index 3728af907552a..8a5513c0befcd 100644
--- a/installation/sql/postgresql/joomla.sql
+++ b/installation/sql/postgresql/joomla.sql
@@ -1800,7 +1800,8 @@ CREATE TABLE IF NOT EXISTS "#__template_styles" (
PRIMARY KEY ("id")
);
CREATE INDEX "#__template_styles_idx_template" ON "#__template_styles" ("template");
-CREATE INDEX "#__template_styles_idx_home" ON "#__template_styles" ("home");
+CREATE INDEX "#__template_styles_idx_client_id" ON "#__template_styles" ("client_id");
+CREATE INDEX "#__template_styles_idx_client_id_home" ON "#__template_styles" ("client_id", "home");
--
-- Dumping data for table #__template_styles
diff --git a/libraries/src/Cache/CacheStorage.php b/libraries/src/Cache/CacheStorage.php
index 539b77ab9dbf3..6094589a0b6af 100644
--- a/libraries/src/Cache/CacheStorage.php
+++ b/libraries/src/Cache/CacheStorage.php
@@ -90,7 +90,7 @@ public function __construct($options = array())
$app = Factory::getApplication();
$this->_hash = md5($app->get('secret'));
- $this->_application = $options['application'] ?? null;
+ $this->_application = $options['application'] ?? md5(JPATH_CONFIGURATION);
$this->_language = $options['language'] ?? 'en-GB';
$this->_locking = $options['locking'] ?? true;
$this->_lifetime = ($options['lifetime'] ?? $app->get('cachetime')) * 60;
diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php
index c129b7003120d..ca30552033944 100644
--- a/libraries/src/Form/FormField.php
+++ b/libraries/src/Form/FormField.php
@@ -1009,7 +1009,7 @@ public function filter($value, $group = null, Registry $input = null)
{
$subForm = $this->loadSubForm();
- if ($this->multiple)
+ if ($this->multiple && !empty($value))
{
$return = array();
@@ -1117,6 +1117,39 @@ public function validate($value, $group = null, \Joomla\Registry\Registry $input
}
}
+ if ($valid !== false && $this instanceof SubformField)
+ {
+ $subForm = $this->loadSubForm();
+
+ if ($this->multiple)
+ {
+ foreach ($value as $key => $val)
+ {
+ $val = (array) $val;
+ $valid = $subForm->validate($val);
+
+ if ($valid === false)
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ $valid = $subForm->validate($value);
+ }
+
+ if ($valid === false)
+ {
+ $errors = $subForm->getErrors();
+
+ foreach ($errors as $error)
+ {
+ return $error;
+ }
+ }
+ }
+
// Check if the field is valid.
if ($valid === false)
{
diff --git a/libraries/src/MVC/Model/AdminModel.php b/libraries/src/MVC/Model/AdminModel.php
index 0cd2934107de2..6265ead079786 100644
--- a/libraries/src/MVC/Model/AdminModel.php
+++ b/libraries/src/MVC/Model/AdminModel.php
@@ -925,11 +925,18 @@ public function delete(&$pks)
protected function generateNewTitle($category_id, $alias, $title)
{
// Alter the title & alias
- $table = $this->getTable();
+ $table = $this->getTable();
+ $aliasField = $table->getColumnAlias('alias');
+ $catidField = $table->getColumnAlias('catid');
+ $titleField = $table->getColumnAlias('title');
- while ($table->load(array('alias' => $alias, 'catid' => $category_id)))
+ while ($table->load(array($aliasField => $alias, $catidField => $category_id)))
{
- $title = StringHelper::increment($title);
+ if ($title === $table->$titleField)
+ {
+ $title = StringHelper::increment($title);
+ }
+
$alias = StringHelper::increment($alias, 'dash');
}
@@ -1526,9 +1533,11 @@ protected function checkCategoryId($categoryId)
public function generateTitle($categoryId, $table)
{
// Alter the title & alias
- $data = $this->generateNewTitle($categoryId, $table->alias, $table->title);
- $table->title = $data['0'];
- $table->alias = $data['1'];
+ $titleField = $table->getColumnAlias('title');
+ $aliasField = $table->getColumnAlias('alias');
+ $data = $this->generateNewTitle($categoryId, $table->$aliasField, $table->$titleField);
+ $table->$titleField = $data['0'];
+ $table->$aliasField = $data['1'];
}
/**
diff --git a/plugins/actionlog/joomla/joomla.php b/plugins/actionlog/joomla/joomla.php
index b9f35dcb9ddc3..e03d1a73edf99 100644
--- a/plugins/actionlog/joomla/joomla.php
+++ b/plugins/actionlog/joomla/joomla.php
@@ -964,10 +964,10 @@ public function onAfterLogPurge($group = '')
'action' => 'actionlogs',
'type' => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
'id' => $user->id,
- 'title' => $user->name,
+ 'title' => $user->username,
'itemlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
'userid' => $user->id,
- 'username' => $user->name,
+ 'username' => $user->username,
'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
);
$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_LOG', $context, $user->id);
@@ -992,10 +992,10 @@ public function onAfterLogExport($group = '')
'action' => 'actionlogs',
'type' => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
'id' => $user->id,
- 'title' => $user->name,
+ 'title' => $user->username,
'itemlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
'userid' => $user->id,
- 'username' => $user->name,
+ 'username' => $user->username,
'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
);
$this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_LOGEXPORT', $context, $user->id);
@@ -1026,10 +1026,10 @@ public function onAfterPurge($group = 'all')
'action' => 'cache',
'type' => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER',
'id' => $user->id,
- 'title' => $user->name,
+ 'title' => $user->username,
'itemlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
'userid' => $user->id,
- 'username' => $user->name,
+ 'username' => $user->username,
'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id,
'group' => $group,
);
diff --git a/plugins/fields/repeatable/params/repeatable.xml b/plugins/fields/repeatable/params/repeatable.xml
index 31b65933e28d4..0f698b44199f9 100644
--- a/plugins/fields/repeatable/params/repeatable.xml
+++ b/plugins/fields/repeatable/params/repeatable.xml
@@ -30,6 +30,38 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/plugins/fields/repeatable/repeatable.php b/plugins/fields/repeatable/repeatable.php
index 52b91fa23683a..fa8736f380261 100644
--- a/plugins/fields/repeatable/repeatable.php
+++ b/plugins/fields/repeatable/repeatable.php
@@ -65,6 +65,11 @@ public function onCustomFieldsPrepareDom($field, DOMElement $parent, Form $form)
$child->addAttribute('name', $formField->fieldname);
$child->addAttribute('type', $formField->fieldtype);
$child->addAttribute('readonly', $readonly);
+
+ if (isset($formField->fieldfilter))
+ {
+ $child->addAttribute('filter', $formField->fieldfilter);
+ }
}
$fieldNode->setAttribute('formsource', $fieldsXml->asXML());
diff --git a/plugins/system/stats/stats.php b/plugins/system/stats/stats.php
index b0005aac846d1..9b90e58385c7e 100644
--- a/plugins/system/stats/stats.php
+++ b/plugins/system/stats/stats.php
@@ -363,7 +363,7 @@ protected function getRenderer($layoutId = 'default')
*/
private function getStatsData()
{
- return [
+ $data = [
'unique_id' => $this->getUniqueId(),
'php_version' => PHP_VERSION,
'db_type' => $this->db->name,
@@ -371,6 +371,14 @@ private function getStatsData()
'cms_version' => JVERSION,
'server_os' => php_uname('s') . ' ' . php_uname('r'),
];
+
+ // Check if we have a MariaDB version string and extract the proper version from it
+ if (preg_match('/^(?:5\.5\.5-)?(mariadb-)?(?P\d+)\.(?P\d+)\.(?P\d+)/i', $data['db_version'], $versionParts))
+ {
+ $data['db_version'] = $versionParts['major'] . '.' . $versionParts['minor'] . '.' . $versionParts['patch'];
+ }
+
+ return $data;
}
/**