Skip to content

Commit

Permalink
Merge branch '4.3-dev' of https://github.com/joomla/joomla-cms into 4…
Browse files Browse the repository at this point in the history
….3-dev
  • Loading branch information
Hackwar committed Sep 7, 2022
2 parents 4d9f49a + a330591 commit 1533ca4
Show file tree
Hide file tree
Showing 60 changed files with 258 additions and 175 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ RoboFile.ini
!/tests/cypress/screenshots/.gitkeep
/tests/cypress/videos
!/tests/cypress/videos/.gitkeep

# WebAuthn FIDO metadata cache
/plugins/system/webauthn/fido.jwt
2 changes: 2 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6450,6 +6450,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/media/vendor/hotkeys.js/js/hotkeys.min.js',
'/media/vendor/hotkeys.js/js/hotkeys.min.js.gz',
'/media/vendor/hotkeys.js/LICENSE',
// From 4.2.1 to 4.2.2
'/administrator/cache/fido.jwt',
);

$folders = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use Exception;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace Joomla\Component\Languages\Administrator\View\Overrides;

use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class="image-cropped"
:src="getURL"
:alt="altTag"
loading="lazy"
:loading="loading"
:width="width"
:height="height"
>
Expand Down Expand Up @@ -76,10 +76,13 @@ export default {
: `${this.item.thumb_path}`;
},
width() {
return this.item.width;
return this.item.width > 0 ? this.item.width : null;
},
height() {
return this.item.height;
return this.item.height > 0 ? this.item.height : null;
},
loading() {
return this.item.width > 0 ? 'lazy' : null;
},
altTag() {
return this.item.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static function canUpload($file, $err = '')
}
}

// Max upload size set to 2 MB for Template Manager
// Max upload size set to 10 MB for Template Manager
$maxSize = (int) ($params->get('upload_limit') * 1024 * 1024);

if ($maxSize > 0 && (int) $file['size'] > $maxSize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Object\CMSObject;
Expand Down Expand Up @@ -295,7 +296,28 @@ protected function addToolbar()
}

if (count($this->updatedList) !== 0 && $this->pluginState) {
ToolbarHelper::custom('template.deleteOverrideHistory', 'times', '', 'COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY', true, 'updateForm');
$dropdown = $bar->dropdownButton('override-group')
->text('COM_TEMPLATES_BUTTON_CHECK')
->toggleSplit(false)
->icon('icon-ellipsis-h')
->buttonClass('btn btn-action')
->form('updateForm')
->listCheck(true);

$childBar = $dropdown->getChildToolbar();

$childBar->publish('template.publish')
->text('COM_TEMPLATES_BUTTON_CHECK_LIST_ENTRY')
->form('updateForm')
->listCheck(true);
$childBar->unpublish('template.unpublish')
->text('COM_TEMPLATES_BUTTON_UNCHECK_LIST_ENTRY')
->form('updateForm')
->listCheck(true);
$childBar->unpublish('template.deleteOverrideHistory')
->text('COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY')
->form('updateForm')
->listCheck(true);
}

if ($this->type === 'home') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,24 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

HTMLHelper::_('bootstrap.dropdown', '.dropdown-toggle');

$input = Factory::getApplication()->input;
?>

<form action="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="updateForm" id="updateForm">
<div class="row mt-2">
<div class="col-md-12">
<?php if (count($this->updatedList) !== 0) : ?>
<?php if (count($this->updatedList) === 0) : ?>
<div class="alert alert-success">
<span class="icon-check-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('NOTICE'); ?></span>
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_UPTODATE'); ?>
</div>
<?php else : ?>
<div class="alert alert-info">
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_NOT_UPTODATE'); ?>
</div>
<form action="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="updateForm" id="updateForm">
<div class="row mt-2">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
Expand Down Expand Up @@ -78,12 +89,7 @@
<input type="hidden" name="task" value="">
<input type="hidden" name="boxchecked" value="0">
<?php echo HTMLHelper::_('form.token'); ?>
<?php else : ?>
<div class="alert alert-success">
<span class="icon-check-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('NOTICE'); ?></span>
<?php echo Text::_('COM_TEMPLATES_OVERRIDE_UPTODATE'); ?>
</div>
<?php endif; ?>
</div>
</div>
</div>
</form>
</form>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@
<?php if ($this->pluginState) : ?>
<td class="d-none d-md-table-cell text-center">
<?php if (!empty($item->updated)) : ?>
<span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
<a href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '#files'); ?>">
<span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
</a>
<?php else : ?>
<span class="badge bg-success"><?php echo Text::_('COM_TEMPLATES_UPTODATE'); ?></span>
<?php endif; ?>
Expand Down
4 changes: 3 additions & 1 deletion administrator/components/com_users/forms/group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
type="groupparent"
label="COM_USERS_GROUP_FIELD_PARENT_LABEL"
validate="options"
/>
>
<option value="0" disabled="disabled">COM_USERS_GROUP_FIELD_PARENT_SELECT</option>
</field>

<field
name="actions"
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_users/tmpl/method/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
$cancelURL = $this->escape(base64_decode($this->returnURL));
}

$recordId = (int)$this->record->id ?? 0;
$recordId = (int) $this->record->id ?? 0;
$method = $this->record->method ?? $this->getModel()->getState('method');
$userId = (int)$this->user->id ?? 0;
$userId = (int) $this->user->id ?? 0;
$headingLevel = 2;
$hideSubmit = !$this->renderOptions['show_submit'] && !$this->isEditExisting
?>
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_cpanel.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COM_CPANEL_MESSAGES_BODY_NOCLOSE="There are important post-installation messages
COM_CPANEL_MESSAGES_BODYMORE_NOCLOSE="This information area won't appear when you have hidden all the messages."
COM_CPANEL_MESSAGES_REVIEW="Read Messages"
COM_CPANEL_MESSAGES_TITLE="You have post-installation messages"
COM_CPANEL_MSG_ADDNOSNIFF_BODY="<p>Joomla is now shipped with additional security hardenings in the default htaccess.txt and web.config.txt files. These hardenings disable the so called MIME-type sniffing feature in web browsers. The sniffing leads to specific attack vectors, where scripts in normally harmless file formats (eg images) will be executed, leading to Cross-Site-Scripting vulnerabilities.</p><p>The security team recommends to manually apply the necessary changes to existing .htaccess or web.config files, as those files can not be updated automatically.</p><p><strong>Changes for .htaccess</strong><br>Add the following lines before \"## Mod_rewrite in use.\":</p><pre>&lt;IfModule mod_headers.c&gt;\nHeader always set X-Content-Type-Options \"nosniff\"\n&lt;/IfModule&gt;</pre><p><strong>Changes for web.config</strong><br>Add the following lines right after \"&lt;/rewrite&gt;\":</p><pre>&lt;httpProtocol&gt;\n &lt;customHeaders&gt;\n &lt;add name=\"X-Content-Type-Options\" value=\"nosniff\" /&gt;\n &lt;/customHeaders&gt;\n&lt;/httpProtocol&gt;</pre>" ; Translators: Don't touch the code part in the message, Starting with ## Mod_rewrite ...
COM_CPANEL_MSG_ADDNOSNIFF_BODY="<p>Joomla is now shipped with additional security hardenings in the default htaccess.txt and web.config.txt files. These hardenings disable the so called MIME-type sniffing feature in web browsers. The sniffing leads to specific attack vectors, where scripts in normally harmless file formats (eg images) will be executed, leading to Cross-Site-Scripting vulnerabilities.</p><p>The security team recommends to manually apply the necessary changes to existing .htaccess or web.config files, as those files can not be updated automatically.</p><p><strong>Changes for .htaccess</strong><br>Add the following lines before \"## Mod_rewrite in use.\":</p><pre>&lt;IfModule mod_headers.c&gt;\nHeader always set X-Content-Type-Options \"nosniff\"\n&lt;/IfModule&gt;</pre><p><strong>Changes for web.config</strong><br>Add the following lines right after \"&lt;/rewrite&gt;\":</p><pre>&lt;httpProtocol&gt;\n &lt;customHeaders&gt;\n &lt;add name=\"X-Content-Type-Options\" value=\"nosniff\" /&gt;\n &lt;/customHeaders&gt;\n&lt;/httpProtocol&gt;</pre>" ; Translators: Don't touch the code part in the message, Starting with ## Mod_rewrite &hellip;
COM_CPANEL_MSG_ADDNOSNIFF_TITLE=".htaccess & web.config Security Update"
COM_CPANEL_MSG_HTACCESSSVG_BODY="<p>Since 3.9.21 Joomla is shipped with an additional security rule in the default htaccess.txt. This rule will protect users of svg files from potential Cross-Site-Scripting (XSS) vulnerabilities.<br>The security team recommends to manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.</p><p><strong>Changes for .htaccess</strong></p><pre>&lt;FilesMatch \"\.svg$\"&gt;\n &lt;IfModule mod_headers.c&gt;\n Header always set Content-Security-Policy \"script-src 'none'\"\n &lt;/IfModule&gt;\n&lt;/FilesMatch&gt;</pre><p>Currently we are not aware of a method to conditionally configure this on IIS web servers, please contact your hosting provider for further assistance.</p>"
COM_CPANEL_MSG_HTACCESSSVG_TITLE="Additional XSS protection for the usage of SVG files"
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_joomlaupdate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_BREAK="Extensions marked with <span cl
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_MISSING_TAG="Extensions marked with <span class='badge bg-secondary'>Missing Compatibility Tag</span> indicate the developer has not included <a href='https://docs.joomla.org/Special:MyLanguage/Deploying_an_Update_Server' target='_blank' rel='noopener noreferrer'>compatibility information.</a>"
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_UPDATE_REQUIRED="Extensions marked with <span class='badge bg-warning text-dark'>Yes (X.X.X)</span> might require an update."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DIRECTIVE="Directive"
COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait ..."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait &hellip;"
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXPLANATION_AND_LINK_TO_DOCS="The pre-update check provides you with information about the readiness of your server, settings and installed extensions for the update.<br>You can find more information about this page and how to prepare for updating Joomla in the <a class='pre-update-docs' href='https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check' target='_blank' rel='noopener noreferrer'>pre-update check documentation</a>."
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE="Compatible"
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_COMPATIBLE_WITH_JOOMLA_VERSION="%s Compatible"
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_media.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COM_MEDIA_ERROR_NO_PROVIDERS="No filesystem providers have been found. Please en
COM_MEDIA_ERROR_NOT_AUTHENTICATED="You are not authenticated. Please login."
COM_MEDIA_ERROR_NOT_AUTHORIZED="You are not authorised"
COM_MEDIA_ERROR_NOT_FOUND="File or Folder not found"
COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload."
COM_MEDIA_ERROR_WARNFILETOOLARGE="This file is too large to upload. You can change the limits for your site in the component options."
COM_MEDIA_FIELD_CHECK_MIME_DESC="Use MIME Magic or Fileinfo to attempt to verify files. Try disabling this if you get invalid mime type errors."
COM_MEDIA_FIELD_CHECK_MIME_LABEL="Check MIME Types"
COM_MEDIA_FIELD_IGNORED_EXTENSIONS_DESC="Ignored file extensions for MIME type checking and restricted uploads."
Expand Down
23 changes: 15 additions & 8 deletions administrator/language/en-GB/com_templates.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ COM_TEMPLATES="Templates"
COM_TEMPLATES_ARE_YOU_SURE="Are you sure?"
COM_TEMPLATES_ASSIGNED_1="Assigned to one menu item."
COM_TEMPLATES_ASSIGNED_MORE="Assigned to %d menu items."
COM_TEMPLATES_BUTTON_CHECK="Check Overrides"
COM_TEMPLATES_BUTTON_CHECK_LIST_ENTRY="Mark Checked"
COM_TEMPLATES_BUTTON_CLOSE_FILE="Close File"
COM_TEMPLATES_BUTTON_COPY_FILE="Copy File"
COM_TEMPLATES_BUTTON_COPY_TEMPLATE="Copy Template"
COM_TEMPLATES_BUTTON_CREATE="Create"
COM_TEMPLATES_BUTTON_CROP="Crop"
COM_TEMPLATES_BUTTON_DELETE="Delete"
COM_TEMPLATES_BUTTON_DELETE_FILE="Delete File"
COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY="Delete List Entry"
COM_TEMPLATES_BUTTON_DELETE_LIST_ENTRY="Remove Record"
COM_TEMPLATES_BUTTON_EXTRACT_ARCHIVE="Extract Here"
COM_TEMPLATES_BUTTON_FILE="New File"
COM_TEMPLATES_BUTTON_FOLDERS="Manage Folders"
Expand All @@ -23,6 +25,7 @@ COM_TEMPLATES_BUTTON_RENAME="Rename"
COM_TEMPLATES_BUTTON_RENAME_FILE="Rename File"
COM_TEMPLATES_BUTTON_RESIZE="Resize"
COM_TEMPLATES_BUTTON_TEMPLATE_CHILD="Create Child Template"
COM_TEMPLATES_BUTTON_UNCHECK_LIST_ENTRY="Mark Unchecked"
COM_TEMPLATES_BUTTON_UPLOAD="Upload"
COM_TEMPLATES_CHECK_FILE_OWNERSHIP="Check file ownership"
COM_TEMPLATES_CHILD_SUCCESS="Child template created."
Expand Down Expand Up @@ -79,7 +82,7 @@ COM_TEMPLATES_ERROR_STYLE_REQUIRES_TITLE="The style requires a title."
COM_TEMPLATES_ERROR_TEMPLATE_FOLDER_NOT_FOUND="Template folder not found."
COM_TEMPLATES_ERROR_UPLOAD_INPUT="No file was found."
COM_TEMPLATES_ERROR_WARNFILENAME="Invalid file name. Please correct the name of the file and upload again."
COM_TEMPLATES_ERROR_WARNFILETOOLARGE="Files larger than 2 MB can't be uploaded."
COM_TEMPLATES_ERROR_WARNFILETOOLARGE="This file is too large to upload."
COM_TEMPLATES_ERROR_WARNFILETYPE="File format not supported."
COM_TEMPLATES_ERROR_WARNIEXSS="Can't be uploaded. Has XSS."
COM_TEMPLATES_FIELD_CLIENT_LABEL="Location"
Expand All @@ -92,7 +95,7 @@ COM_TEMPLATES_FILE_ARCHIVE_EXTRACT_FAIL="Failed to extract the archive file."
COM_TEMPLATES_FILE_ARCHIVE_EXTRACT_SUCCESS="Archive file extracted."
COM_TEMPLATES_FILE_ARCHIVE_NOT_FOUND="Archive file not found."
COM_TEMPLATES_FILE_ARCHIVE_OPEN_FAIL="Failed to open the archive file."
COM_TEMPLATES_FILE_COMPARE_PANE="Diff between original and overridden file"
COM_TEMPLATES_FILE_COMPARE_PANE="Diff between original and override file"
COM_TEMPLATES_FILE_CONTENT_PREVIEW="File Content Preview"
COM_TEMPLATES_FILE_COPY_FAIL="Failed to copy the file."
COM_TEMPLATES_FILE_COPY_SUCCESS="The current file was copied as %s."
Expand All @@ -107,7 +110,7 @@ COM_TEMPLATES_FILE_EXISTS="File with the same name already exists."
COM_TEMPLATES_FILE_INFO="File Information"
COM_TEMPLATES_FILE_NAME="File Name"
COM_TEMPLATES_FILE_NEW_NAME_LABEL="Copied File Name"
COM_TEMPLATES_FILE_OVERRIDE_PANE="Overridden file (editable)"
COM_TEMPLATES_FILE_OVERRIDE_PANE="Override file (editable)"
COM_TEMPLATES_FILE_PERMISSIONS="The File Permissions are %s"
COM_TEMPLATES_FILE_RENAME_ERROR="An error occurred renaming the file."
COM_TEMPLATES_FILE_RENAME_SUCCESS="File renamed."
Expand Down Expand Up @@ -171,9 +174,12 @@ COM_TEMPLATES_N_CONFLICT="%d Changes found"
COM_TEMPLATES_N_CONFLICT_1="Change found"
COM_TEMPLATES_N_ITEMS_DELETED="%d template styles deleted."
COM_TEMPLATES_N_ITEMS_DELETED_1="Template style deleted."
COM_TEMPLATES_N_OVERRIDE_CHECKED="%d Updated files list entry marked as checked."
COM_TEMPLATES_N_OVERRIDE_DELETED="%d Updated files list entry deleted."
COM_TEMPLATES_N_OVERRIDE_UNCHECKED="%d Updated files list entry marked as unchecked."
COM_TEMPLATES_N_OVERRIDE_CHECKED="%d records checked."
COM_TEMPLATES_N_OVERRIDE_CHECKED_1="Record checked."
COM_TEMPLATES_N_OVERRIDE_DELETED="%d records removed."
COM_TEMPLATES_N_OVERRIDE_DELETED_1="Record removed."
COM_TEMPLATES_N_OVERRIDE_UNCHECKED="%d records unchecked."
COM_TEMPLATES_N_OVERRIDE_UNCHECKED_1="Record unchecked."
COM_TEMPLATES_NEW_FILE_HEADER="Create or Upload a new file."
COM_TEMPLATES_NEW_FILE_NAME="New File Name"
COM_TEMPLATES_NEW_FILE_SELECT="Select a file type"
Expand All @@ -187,9 +193,10 @@ COM_TEMPLATES_OVERRIDE_CREATED="Override created in "
COM_TEMPLATES_OVERRIDE_CREATED_DATE="Added to the list"
COM_TEMPLATES_OVERRIDE_FAILED="Failed to create override."
COM_TEMPLATES_OVERRIDE_MODIFIED_DATE="Last change via Update"
COM_TEMPLATES_OVERRIDE_NOT_UPTODATE="The originals of the template override files listed below has been updated. This list aids you in reviewing those changes and marking them as checked as you progress."
COM_TEMPLATES_OVERRIDE_SOURCE="Update Source"
COM_TEMPLATES_OVERRIDE_TEMPLATE_FILE="Template File"
COM_TEMPLATES_OVERRIDE_UPTODATE="Overridden files are up to date. Nothing has been changed in the last extension or Joomla update."
COM_TEMPLATES_OVERRIDE_UPTODATE="Override files are up to date. Nothing has been changed in the last extension or Joomla update."
COM_TEMPLATES_OVERRIDES="Override Files"
COM_TEMPLATES_OVERRIDES_COMPONENTS="Components"
COM_TEMPLATES_OVERRIDES_LAYOUTS="Layouts"
Expand Down

0 comments on commit 1533ca4

Please sign in to comment.