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

[5.3] User Actions Log: User Filter #44751

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3bd27c4
Display the correct changelog when updating (#44652)
Hackwar Jan 12, 2025
8ca71b9
#44636 add scroll-margin-top if sticky top is used (#44679)
hans2103 Jan 12, 2025
70b79ce
[5.2] Fix assets for com_scheduler (new install) (#44684)
heelc29 Jan 12, 2025
53dc17d
[5.2] Fix PHP Warning for debuguser, debuggroup (#44721)
chmst Jan 12, 2025
e9bbd2a
[5.2.3] Removing deprecated access to User object attributes (#44694)
heelc29 Jan 12, 2025
6860792
[5.2] Translation Update (#44712)
joomla-translation-bot Jan 12, 2025
ad4b0c1
[5.2] copypaste @package (#44706)
brianteeman Jan 13, 2025
ffbad2e
[5][com_user] debug user untranslated string (#44688)
alikon Jan 13, 2025
fea4552
[5.2] system test for list multiselect checkboxes (#44720)
heelc29 Jan 15, 2025
ecb5151
[5.2] Fix for: Article cannot be saved successfully on the front-end …
NicolasDerumigny Jan 17, 2025
276c7a1
[5.2] Fix missing brackets (#44739)
janschoenherr Jan 17, 2025
9059475
[5.2] Unable to store null value on update row #39363 (#39607)
Kaushik1216 Jan 18, 2025
5df5fc4
[5.2] Finder Router: filter out unnecessary query elements (#44055)
Hackwar Jan 18, 2025
65acec1
[5.2] Check whether there is a language file from the frontend (#44730)
zero-24 Jan 18, 2025
20d3804
[5.2] Fix password reset broken in backend (#44723)
joomdonation Jan 18, 2025
3f9497b
[5.2] Update index.php - Installation template (#43416)
sinahaghparast Jan 18, 2025
e384155
[5.2] Email cloak plugin fails for emails with IDN (#39888)
Kaushik1216 Jan 18, 2025
75997cb
Fix condition (#44743)
chmst Jan 18, 2025
7c11cd0
[5.2] Error handling while create folder in media manager new pr (#39…
Kaushik1216 Jan 18, 2025
b337054
[5.2] Remove alt-text for menuItem with image and title (#40675)
chmst Jan 18, 2025
53f4543
[5.2] Fix missing paranthesis (#44742)
janschoenherr Jan 18, 2025
59b8f18
[5.2] User Actions Log: User Filter
pe7er Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ protected function getOptions()
// Construct the query
$query = $db->getQuery(true)
->select($db->quoteName('u.id', 'value'))
->select($db->quoteName('u.username', 'text'))
->select('CONCAT(' . $db->quoteName('u.name') . ', " (", ' . $db->quoteName('u.username') . ', ")") AS ' . $db->quoteName('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.username'))
->order($db->quoteName('u.username'));
->order($db->quoteName('u.name'));

// Setup the query
$db->setQuery($query);
Expand Down
17 changes: 14 additions & 3 deletions administrator/components/com_installer/src/Model/ManageModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,16 @@ public function loadChangelog($eid, $source)
]
)
)
->select($db->quoteName('updates.version', 'updateVersion'))
->select($db->quoteName(
[
'updates.version',
'updates.changelogurl',
],
[
'updateVersion',
'updateChangelogUrl',
]
))
->from($db->quoteName('#__extensions', 'extensions'))
->join(
'LEFT',
Expand All @@ -423,13 +432,15 @@ public function loadChangelog($eid, $source)
$this->translate($extensions);
$extension = array_shift($extensions);

if (!$extension->changelogurl) {
$changelogurl = $source === 'manage' ? $extension->changelogurl : $extension->updateChangelogUrl;

if (!$changelogurl) {
return '';
}

$changelog = new Changelog();
$changelog->setVersion($source === 'manage' ? $extension->version : $extension->updateVersion);
$changelog->loadFromXml($extension->changelogurl);
$changelog->loadFromXml($changelogurl);

// Read all the entries
$entries = [
Expand Down
4 changes: 4 additions & 0 deletions administrator/components/com_mails/src/Helper/MailsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public static function loadTranslationFiles($extension, $language = 'en-GB')
case 'com':
default:
$source = JPATH_ADMINISTRATOR . '/components/' . $extension;

$lang->load($extension, JPATH_BASE, $language, true)
|| $lang->load($extension, JPATH_BASE . '/components/' . $extension, $language, true);

break;

case 'mod':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,31 @@
type="text"
required
autocomplete="off"
v-bind:class="(isValidName()!==0 && isValid())?'is-invalid':''"
aria-describedby="folderFeedback"
@input="folder = $event.target.value"
>
<div
v-if="isValidName()===1"
id="folderFeedback"
class="invalid-feedback"
>
{{ translate('COM_MEDIA_CREATE_NEW_FOLDER_RELATIVE_PATH_ERROR') }}
</div>
<div
v-if="isValidName()===2"
id="folderFeedback"
class="invalid-feedback"
>
{{ translate('COM_MEDIA_CREATE_NEW_FOLDER_EXISTING_FOLDER_ERROR') }}
</div>
<div
v-if="isValidName()===3 && isValid()"
id="folderFeedback"
class="invalid-feedback"
>
{{ translate('COM_MEDIA_CREATE_NEW_FOLDER_UNEXPECTED_CHARACTER') }}
</div>
</div>
</form>
</div>
Expand All @@ -46,7 +69,7 @@
</button>
<button
class="btn btn-success"
:disabled="!isValid()"
:disabled="!isValid() || isValidName()!==0"
@click="save()"
>
{{ translate('JACTION_CREATE') }}
Expand All @@ -70,6 +93,15 @@ export default {
folder: '',
};
},
computed: {
/* Get the contents of the currently selected directory */
items() {
const directories = this.$store.getters.getSelectedDirectoryDirectories;
const files = this.$store.getters.getSelectedDirectoryFiles;

return [...directories, ...files];
},
},
watch: {
'$store.state.showCreateFolderModal': function (show) {
this.$nextTick(() => {
Expand All @@ -79,11 +111,25 @@ export default {
});
},
},

methods: {
/* Check if the form is valid */
isValid() {
return (this.folder);
},
/* Check folder name is valid or not */
isValidName() {
if (this.folder.includes('..')) {
return 1;
}
if ((this.items.filter((file) => file.name.toLowerCase() === (this.folder.toLowerCase())).length !== 0)) {
return 2;
}
if ((!/^[\p{L}\p{N}\-_. ]+$/u.test(this.folder))) {
return 3;
}
return 0;
},
/* Close the modal instance */
close() {
this.reset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
'COM_MEDIA_CREATE_NEW_FOLDER',
'COM_MEDIA_CREATE_NEW_FOLDER_ERROR',
'COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS',
'COM_MEDIA_CREATE_NEW_FOLDER_EXISTING_FOLDER_ERROR',
'COM_MEDIA_CREATE_NEW_FOLDER_RELATIVE_PATH_ERROR',
'COM_MEDIA_CREATE_NEW_FOLDER_UNEXPECTED_CHARACTER',
'COM_MEDIA_DECREASE_GRID',
'COM_MEDIA_DELETE_ERROR',
'COM_MEDIA_DELETE_SUCCESS',
Expand Down
4 changes: 4 additions & 0 deletions administrator/components/com_users/src/Helper/DebugHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public static function getDebugActions($component = null)
$component_actions = Access::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/' . $component . '/access.xml');

if (!empty($component_actions)) {
// Load language
$lang = Factory::getApplication()->getLanguage();
$lang->load($component, JPATH_ADMINISTRATOR, null, false, false);

foreach ($component_actions as &$action) {
$descr = (string) $action->title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<?php else : ?>
<?php
// Split the actions table
$loginActions = [];
$actions = [];
foreach ($this->actions as $action) :
$name = $action[0];
if (in_array($name, ['core.login.site', 'core.login.admin', 'core.login.offline', 'core.login.api', 'core.admin'])) :
Expand Down
5 changes: 2 additions & 3 deletions administrator/components/com_users/tmpl/debuguser/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));

$loginActions = [];
$actions = [];

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
$wa->useScript('table.columns');
Expand All @@ -39,6 +36,8 @@
<?php else : ?>
<?php
// Split the actions table
$loginActions = [];
$actions = [];
foreach ($this->actions as $action) :
$name = $action[0];
if (in_array($name, ['core.login.site', 'core.login.admin', 'core.login.api', 'core.login.offline'])) :
Expand Down
3 changes: 3 additions & 0 deletions administrator/language/en-GB/com_media.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ COM_MEDIA_COPY_FOLDER_NOT_POSSIBLE="Copy folder is not possible"
COM_MEDIA_CREATE_NEW_FOLDER="Create New Folder"
COM_MEDIA_CREATE_NEW_FOLDER_ERROR="Error creating folder."
COM_MEDIA_CREATE_NEW_FOLDER_SUCCESS="Folder created."
COM_MEDIA_CREATE_NEW_FOLDER_EXISTING_FOLDER_ERROR="Folder or file name already exists "
COM_MEDIA_CREATE_NEW_FOLDER_RELATIVE_PATH_ERROR="Use of relative paths not permitted"
COM_MEDIA_CREATE_NEW_FOLDER_UNEXPECTED_CHARACTER="Only Alphanumeric ,underscore(_),hyphen(-) and peroid(.) are allowed"
COM_MEDIA_DECREASE_GRID="Decrease grid size"
COM_MEDIA_DELETE_ERROR="Error deleting the item."
COM_MEDIA_DELETE_NOT_POSSIBLE="Delete not possible!"
Expand Down
2 changes: 1 addition & 1 deletion build/media_source/com_content/js/form-edit.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
document.querySelectorAll(`[${buttonDataSelector}]`).forEach((button) => {
button.addEventListener('click', (e) => {
e.preventDefault();
const task = e.target.getAttribute(buttonDataSelector);
const task = button.getAttribute(buttonDataSelector);
submitTask(task);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

if (Joomla && Joomla.getOptions('js-extensions-update')) {
if (Joomla && Joomla.getOptions('js-joomla-update')) {
const update = (type, text) => {
const link = document.getElementById('plg_quickicon_joomlaupdate');
if (link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
@media screen and (prefers-reduced-motion: reduce) {
scroll-behavior: auto;
}

&:has(.sticky-top) {
[id] {
scroll-margin-top: var(--cassiopeia-scroll-margin-top, 10rem);
}
}
}

html {
Expand Down
33 changes: 31 additions & 2 deletions components/com_finder/src/Service/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Component\Router\RouterViewConfiguration;
use Joomla\CMS\Component\Router\Rules\MenuRules;
use Joomla\CMS\Component\Router\Rules\NomenuRules;
use Joomla\CMS\Component\Router\Rules\StandardRules;
use Joomla\CMS\Menu\AbstractMenu;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -43,7 +42,37 @@ public function __construct(SiteApplication $app, AbstractMenu $menu)
parent::__construct($app, $menu);

$this->attachRule(new MenuRules($this));
$this->attachRule(new StandardRules($this));
$this->attachRule(new NomenuRules($this));
}

/**
* Build method for URLs
*
* @param array &$query Array of query elements
*
* @return array Array of URL segments
*
* @since __DEPLOY_VERSION__
*/
public function build(&$query)
{
$segments = [];

// Process the parsed variables based on custom defined rules
foreach ($this->rules as $rule) {
$rule->build($query, $segments);
}

if (isset($query['Itemid'])) {
$item = $this->menu->getItem($query['Itemid']);

if ($query['option'] == 'com_finder' && isset($query['f']) && isset($item->query['f']) && $query['f'] == $item->query['f']) {
unset($query['f']);
}
}

unset($query['view']);

return $segments;
}
}
2 changes: 1 addition & 1 deletion components/com_users/src/Controller/CallbackController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Controller/CaptiveController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Controller/MethodController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Controller/MethodsController.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
10 changes: 5 additions & 5 deletions components/com_users/src/Dispatcher/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @package Joomla.Site
* @subpackage com_privacy
* @subpackage com_users
*
* @copyright (C) 2024 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
Expand All @@ -19,7 +19,7 @@
// phpcs:enable PSR1.Files.SideEffects

/**
* ComponentDispatcher class for com_privacy
* ComponentDispatcher class for com_users
*
* @since 5.2.3
*/
Expand All @@ -43,7 +43,7 @@ protected function checkAccess()
switch ($view) {
case 'registration':
// If the user is already logged in, redirect to the profile page.
if ($user->get('guest') != 1) {
if ($user->guest != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}
Expand All @@ -57,15 +57,15 @@ protected function checkAccess()

// Handle view specific models.
case 'profile':
if ($user->get('guest') == 1) {
if ($user->guest == 1) {
// Redirect to login page.
$this->app->redirect(Route::_('index.php?option=com_users&view=login', false));
}
break;

case 'remind':
case 'reset':
if ($user->get('guest') != 1) {
if ($user->guest != 1) {
// Redirect to profile page.
$this->app->redirect(Route::_('index.php?option=com_users&view=profile', false));
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/BackupcodesModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/CaptiveModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/MethodModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/MethodsModel.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* @package Joomla.Administrator
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
Expand Down
Loading