Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joomla 3.9.10 merge #26107

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c5ff9e5
Reset to dev
HLeithner Jun 11, 2019
a62756b
Field type Repeatable. Editor and Textarea subfields remove HTML sinc…
ReLater Jun 14, 2019
496fb1e
Fix pagination when uninstalling extensions (#25195)
SharkyKZ Jun 14, 2019
5d2bb49
Default cache keys based on JPATH_CONFIGURATION instead of null (#20401)
okonomiyaki3000 Jun 14, 2019
6c6824f
Compact image modal layout (#22475)
ciar4n Jun 15, 2019
554d53d
[SQL] fix field home of #__template_styles table (#24595)
alikon Jun 16, 2019
7c72957
Clean article cache after voting (#25201)
SharkyKZ Jun 16, 2019
93cb1ad
Update joomla/string from framework to fix Appveyor (#25243)
richard67 Jun 16, 2019
cc89a6e
Using domain for drone badge (#25240)
Hackwar Jun 16, 2019
9075c46
[cs] Remove tabs (#25157)
Jun 17, 2019
bc3cf75
Remove chosen from com_search (#24623)
brianteeman Jun 17, 2019
24e1ef6
Update the AppVeyor badge to project changes (#25275)
richard67 Jun 20, 2019
4127c01
username vs name (#24992)
tecpromotion Jun 22, 2019
ad07420
Correcting action logs filter due to #24992 (#25291)
infograf768 Jun 22, 2019
27ea0dc
Send proper MariaDB database version to the stats server (#25281)
mbabker Jun 23, 2019
eb3c321
Contact and Newsfeed title not incremented during batch copy (#25259)
SharkyKZ Jun 23, 2019
e48e9f1
Improved PHPDoc for JDatabaseDriver::updateObject (#25134)
Jun 23, 2019
391f4a6
Fix Invalid argument supplied (#25310)
ReLater Jun 24, 2019
0fface7
Fix database error after new installation of current staging (#25299)
richard67 Jun 25, 2019
d3e2662
Add the category first to the ordering when sorting by "ordering" (#2…
Jun 25, 2019
e7c13df
[com_fields] Fix/Improve checks for empty output in field groups (#25…
AndySDH Jun 25, 2019
c684a8f
Include nested fields (#25213)
SharkyKZ Jun 25, 2019
f527b14
Another subform fix for IE compatibility (#25325)
Fedik Jun 29, 2019
631d862
Small performance check for downgrading utf8mb4 (#12847)
OctavianC Jun 30, 2019
4cc4da5
System info fatal error on symbolic linked folders (#13553)
n3t Jun 30, 2019
4dbd480
Cleanup of canDelete, canEdit and canEditState in Component Models (#…
wilsonge Jul 1, 2019
1194041
Fix update extracted files counter (#25198)
Jul 2, 2019
ff2f0a3
Improvements to mediamanager.js and popup-imagemanager.js (#25184)
okonomiyaki3000 Jul 2, 2019
e8b904a
Correct active file highlight in Template Manager (#25399)
SharkyKZ Jul 2, 2019
79de916
Add admin paths for frontent configuration edit form (#25404)
richard67 Jul 2, 2019
fea05e2
Subform - Wrong ID generated for the elements of subform when we clic…
ankushmaherwal Jul 2, 2019
9cb87ee
Update j/input,j/session,phar-stream-wrapper. Pinned sodium_compat (#…
HLeithner Jul 3, 2019
499864f
Joomla! 3.9.9 Release Candidate
HLeithner Jul 3, 2019
fefffc9
Reset to dev
HLeithner Jul 3, 2019
d34a3ec
Prepare 3.9.9 release
HLeithner Jul 8, 2019
df135dc
Reset to dev
HLeithner Jul 9, 2019
6b92cc3
Change back data type of template styles home column in db (#25484)
richard67 Jul 10, 2019
d65bf09
Prepare 3.9.10 release
HLeithner Jul 10, 2019
23e92b5
Merge tag '3.9.10' into 4.0-dev
wilsonge Aug 31, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_admin/Model/SysinfoModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -546,7 +546,7 @@ public function getDirectory($public = false)

foreach ($manifests as $folder)
{
if (!$folder->isDir() || $folder->isDot())
if ($folder->isDot() || !$folder->isDir())
{
continue;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__template_styles` MODIFY `home` char(7) NOT NULL DEFAULT '0';
Original file line number Diff line number Diff line change
@@ -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`);
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
@@ -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");

This file was deleted.

This file was deleted.

19 changes: 8 additions & 11 deletions administrator/components/com_banners/Model/BannerModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
21 changes: 8 additions & 13 deletions administrator/components/com_banners/Model/ClientModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
40 changes: 4 additions & 36 deletions administrator/components/com_contact/Model/ContactModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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?
*
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_contact/Table/ContactTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public function __construct(DatabaseDriver $db)
$this->typeAlias = 'com_contact.contact';

parent::__construct('#__contact_details', 'id', $db);

$this->setColumnAlias('title', 'name');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down
5 changes: 5 additions & 0 deletions administrator/components/com_content/Model/ArticlesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 5 additions & 10 deletions administrator/components/com_fields/Model/FieldModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
24 changes: 8 additions & 16 deletions administrator/components/com_menus/Model/ItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
10 changes: 3 additions & 7 deletions administrator/components/com_modules/Model/ModuleModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down