diff --git a/administrator/components/com_users/src/Model/LevelModel.php b/administrator/components/com_users/src/Model/LevelModel.php
index d92e87809384b..d01d4c4dc7723 100644
--- a/administrator/components/com_users/src/Model/LevelModel.php
+++ b/administrator/components/com_users/src/Model/LevelModel.php
@@ -109,7 +109,7 @@ protected function canDelete($record)
$this->levelsInUse = array_merge($this->levelsInUse, $values);
- // TODO Could assemble an array of the tables used by each view level list those,
+ // @todo Could assemble an array of the tables used by each view level list those,
// giving the user a clue in the error where to look.
}
}
diff --git a/administrator/components/com_users/src/Model/LevelsModel.php b/administrator/components/com_users/src/Model/LevelsModel.php
index e29ac3c0f0412..0a94fa595ca11 100644
--- a/administrator/components/com_users/src/Model/LevelsModel.php
+++ b/administrator/components/com_users/src/Model/LevelsModel.php
@@ -177,7 +177,7 @@ public function reorder($pk, $direction = 0)
}
// Move the row.
- // TODO: Where clause to restrict category.
+ // @todo: Where clause to restrict category.
$table->move($pk);
return true;
diff --git a/administrator/components/com_workflow/src/Controller/StagesController.php b/administrator/components/com_workflow/src/Controller/StagesController.php
index 5cd19a2fb7e50..e7af94b3b2372 100644
--- a/administrator/components/com_workflow/src/Controller/StagesController.php
+++ b/administrator/components/com_workflow/src/Controller/StagesController.php
@@ -103,7 +103,7 @@ public function __construct(array $config = array(), MVCFactoryInterface $factor
}
}
- $this->registerTask('unsetDefault', 'setDefault');
+ $this->registerTask('unsetDefault', 'setDefault');
}
/**
diff --git a/administrator/components/com_workflow/src/Controller/WorkflowsController.php b/administrator/components/com_workflow/src/Controller/WorkflowsController.php
index 9c698600ff0ae..9739d666dba2c 100644
--- a/administrator/components/com_workflow/src/Controller/WorkflowsController.php
+++ b/administrator/components/com_workflow/src/Controller/WorkflowsController.php
@@ -76,7 +76,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu
}
}
- $this->registerTask('unsetDefault', 'setDefault');
+ $this->registerTask('unsetDefault', 'setDefault');
}
/**
diff --git a/administrator/components/com_workflow/src/Model/WorkflowModel.php b/administrator/components/com_workflow/src/Model/WorkflowModel.php
index beb71976e59d2..dec07533ed127 100644
--- a/administrator/components/com_workflow/src/Model/WorkflowModel.php
+++ b/administrator/components/com_workflow/src/Model/WorkflowModel.php
@@ -297,7 +297,12 @@ public function setDefault($pk, $value = 1)
if ($value)
{
// Unset other default item
- if ($table->load(array('default' => '1')))
+ if ($table->load(
+ [
+ 'default' => '1',
+ 'extension' => $table->get('extension')
+ ]
+ ))
{
$table->default = 0;
$table->modified = $date;
diff --git a/administrator/components/com_workflow/src/Table/WorkflowTable.php b/administrator/components/com_workflow/src/Table/WorkflowTable.php
index faedf915b6f12..a9f7267bb39b7 100644
--- a/administrator/components/com_workflow/src/Table/WorkflowTable.php
+++ b/administrator/components/com_workflow/src/Table/WorkflowTable.php
@@ -144,7 +144,7 @@ public function check()
}
else
{
- $db = $this->getDbo();
+ $db = $this->getDbo();
$query = $db->getQuery(true);
$query
@@ -192,7 +192,7 @@ public function store($updateNulls = true)
{
// Existing item
$this->modified_by = $user->id;
- $this->modified = $date->toSql();
+ $this->modified = $date->toSql();
}
else
{
@@ -219,10 +219,15 @@ public function store($updateNulls = true)
$this->modified_by = $this->created_by;
}
- if ($this->default == '1')
+ if ((int) $this->default === 1)
{
// Verify that the default is unique for this workflow
- if ($table->load(array('default' => '1')))
+ if ($table->load(
+ [
+ 'default' => '1',
+ 'extension' => $this->extension
+ ]
+ ))
{
$table->default = 0;
$table->store();
diff --git a/administrator/language/en-GB/com_config.ini b/administrator/language/en-GB/com_config.ini
index f63f6739dc5b4..ddfd1a734709c 100644
--- a/administrator/language/en-GB/com_config.ini
+++ b/administrator/language/en-GB/com_config.ini
@@ -59,28 +59,28 @@ COM_CONFIG_FIELD_DATABASE_NAME_LABEL="Database Name"
COM_CONFIG_FIELD_DATABASE_PASSWORD_DESC="Do not edit this field unless absolutely necessary (eg after the transfer of the database to a new hosting provider)."
COM_CONFIG_FIELD_DATABASE_PASSWORD_LABEL="Database Password"
COM_CONFIG_FIELD_DATABASE_PREFIX_LABEL="Database Tables Prefix"
-COM_CONFIG_FIELD_DATABASE_TYPE_LABEL="Database Type"
COM_CONFIG_FIELD_DATABASE_TYPE_DESC="Do not change this to a different database technology e.g. from MySQLi (MySQL database technology) to PostgreSQL (Postgres database technology); it will break your site."
+COM_CONFIG_FIELD_DATABASE_TYPE_LABEL="Database Type"
COM_CONFIG_FIELD_DATABASE_USERNAME_LABEL="Database Username"
COM_CONFIG_FIELD_DEBUG_CONST="Constant"
COM_CONFIG_FIELD_DEBUG_CONST_LANG_DESC="Select if you should display the language constant or the language value when debugging the language strings."
COM_CONFIG_FIELD_DEBUG_CONST_LANG_LABEL="Language Display"
-COM_CONFIG_FIELD_DEBUG_LANG_LABEL="Debug Language"
COM_CONFIG_FIELD_DEBUG_LANG_DESC="Displays ?? around a language string constant when the string is not present in the currently loaded language files or ** around the string value when the string is present. If none of the above is displayed, it could mean the text is hardcoded and needs a language string."
-COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL="Debug System"
+COM_CONFIG_FIELD_DEBUG_LANG_LABEL="Debug Language"
COM_CONFIG_FIELD_DEBUG_SYSTEM_DESC="Use it only for troubleshooting, ideally on private copies of your site. The more technical information displayed in this mode can be a security risk if left enabled on live sites. Remember to publish the “System - Debug” plugin to get detailed information on each page being loaded."
+COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL="Debug System"
COM_CONFIG_FIELD_DEBUG_VALUE="Value"
-COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_LABEL="Default Access Level"
COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_DESC="Set the Access Level which will be assigned by default to newly created items."
-COM_CONFIG_FIELD_DEFAULT_CAPTCHA_LABEL="Default Captcha"
+COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_LABEL="Default Access Level"
COM_CONFIG_FIELD_DEFAULT_CAPTCHA_DESC="Joomla and third party extensions can use a CAPTCHA to prevent abuse (spam) on public forms. Each extension can choose to use a different CAPTCHA, if more than one are available. If no selection is made this will be used by default. You can enable additional CAPTCHA methods in System, Manage, Plugins."
-COM_CONFIG_FIELD_DEFAULT_EDITOR_LABEL="Default Editor"
+COM_CONFIG_FIELD_DEFAULT_CAPTCHA_LABEL="Default Captcha"
COM_CONFIG_FIELD_DEFAULT_EDITOR_DESC="This editor will be used for editing content and other rich text areas in third party extensions unless a user has chosen a different one in their user profile . This will also be the only editor available and used for users who are not already logged in (the Guest user group)."
-COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_LABEL="Default Feed Limit"
+COM_CONFIG_FIELD_DEFAULT_EDITOR_LABEL="Default Editor"
COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_DESC="How many items will be published by default in RSS and Atom feeds."
+COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_LABEL="Default Feed Limit"
COM_CONFIG_FIELD_DEFAULT_LIST_LIMIT_LABEL="Default List Limit"
-COM_CONFIG_FIELD_ERROR_REPORTING_LABEL="Error Reporting"
COM_CONFIG_FIELD_ERROR_REPORTING_DESC="Control whether PHP error messages should be displayed at all and how verbose they will be. On live sites use None for security reasons. Only use Maximum while troubleshooting — remember to set that back to None when you're done!"
+COM_CONFIG_FIELD_ERROR_REPORTING_LABEL="Error Reporting"
COM_CONFIG_FIELD_FEED_EMAIL_LABEL="Feed Email Address"
COM_CONFIG_FIELD_FILESYSTEM_PATH_DESC="The filesystem path where session data will be stored. If empty, the system's temporary directory will be used."
COM_CONFIG_FIELD_FILESYSTEM_PATH_LABEL="Session Save Path"
@@ -91,10 +91,10 @@ COM_CONFIG_FIELD_FILTERS_NO_HTML="No HTML"
COM_CONFIG_FIELD_FILTERS_ALLOWED_LIST="Allowed List"
COM_CONFIG_FIELD_FLOC_BLOCKER_DESC="Send a header to not support the tracking through the FLoC method."
COM_CONFIG_FIELD_FLOC_BLOCKER_LABEL="Block FLoC"
-COM_CONFIG_FIELD_FORCE_SSL_LABEL="Force HTTPS"
COM_CONFIG_FIELD_FORCE_SSL_DESC="HTTPS must be enabled on your server or load balancer to utilise this option. Enable 'Behind Load Balancer' if your SSL terminates on your load balancer but your site is served on http on its webserver."
-COM_CONFIG_FIELD_GZIP_COMPRESSION_LABEL="Gzip Page Compression"
+COM_CONFIG_FIELD_FORCE_SSL_LABEL="Force HTTPS"
COM_CONFIG_FIELD_GZIP_COMPRESSION_DESC="Joomla can automatically compress the generated HTML pages with GZip, making them smaller and increasing your site's speed score. Disable it if your server is already doing that for you or if it conflicts with third party extensions."
+COM_CONFIG_FIELD_GZIP_COMPRESSION_LABEL="Gzip Page Compression"
COM_CONFIG_FIELD_HTMLBODY_LABEL="HTML Body"
COM_CONFIG_FIELD_LOADBALANCER_ENABLE_DESC="If your site is behind a load balancer or reverse proxy, enable this setting so that IP addresses and other configurations within Joomla automatically take this into account."
COM_CONFIG_FIELD_LOADBALANCER_ENABLE_LABEL="Behind Load Balancer"
@@ -104,10 +104,10 @@ COM_CONFIG_FIELD_LOG_CATEGORY_MODE_EXCLUDE="Exclude"
COM_CONFIG_FIELD_LOG_CATEGORY_MODE_INCLUDE="Include"
COM_CONFIG_FIELD_LOG_CATEGORY_MODE_LABEL="Log Category Mode"
COM_CONFIG_FIELD_LOG_DEPRECATED_LABEL="Log Deprecated API"
-COM_CONFIG_FIELD_LOG_EVERYTHING_LABEL="Log Almost Everything"
COM_CONFIG_FIELD_LOG_EVERYTHING_DESC="Logs everything, except deprecated APIs."
-COM_CONFIG_FIELD_LOG_PATH_LABEL="Path to Log Folder"
+COM_CONFIG_FIELD_LOG_EVERYTHING_LABEL="Log Almost Everything"
COM_CONFIG_FIELD_LOG_PATH_DESC="Joomla can optionally keep a log file of its own and third party extensions' operations. Provide the absolute path to a folder that is writeable by PHP; if it's missing or is not writeable Joomla will not load at all. For security reasons you must not use a folder with system–wide access such as /tmp."
+COM_CONFIG_FIELD_LOG_PATH_LABEL="Path to Log Folder"
COM_CONFIG_FIELD_LOG_PRIORITIES_ALERT="Alert"
COM_CONFIG_FIELD_LOG_PRIORITIES_ALL="All"
COM_CONFIG_FIELD_LOG_PRIORITIES_CRITICAL="Critical"
@@ -122,8 +122,8 @@ COM_CONFIG_FIELD_MAIL_FROM_EMAIL_LABEL="From Email"
COM_CONFIG_FIELD_MAIL_FROM_NAME_LABEL="From Name"
COM_CONFIG_FIELD_MAIL_MAILER_LABEL="Mailer"
COM_CONFIG_FIELD_MAIL_MAILONLINE_LABEL="Send Mail"
-COM_CONFIG_FIELD_MAIL_MASSMAILOFF_LABEL="Disable Mass Mail"
COM_CONFIG_FIELD_MAIL_MASSMAILOFF_DESC="Joomla offers a Mass Mail feature which allows a user with administrator access to send an email to all users of the site. On sites with more than a few dozen users this can be problematic or time out."
+COM_CONFIG_FIELD_MAIL_MASSMAILOFF_LABEL="Disable Mass Mail"
COM_CONFIG_FIELD_MAIL_REPLY_TO_EMAIL_LABEL="Reply To Email"
COM_CONFIG_FIELD_MAIL_REPLY_TO_NAME_LABEL="Reply To Name"
COM_CONFIG_FIELD_MAIL_SENDMAIL_PATH_LABEL="Sendmail Path"
@@ -139,18 +139,18 @@ COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_LABEL="Persistent Memcache(d)"
COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL="Memcache(d) Server Port"
COM_CONFIG_FIELD_METAAUTHOR_LABEL="Author Meta Tag"
COM_CONFIG_FIELD_METADESC_LABEL="Site Meta Description"
-COM_CONFIG_FIELD_METAVERSION_LABEL="Joomla Version"
COM_CONFIG_FIELD_METAVERSION_DESC="Controls whether the generator meta tag in the HTML document's header in the front-end and in Atom feeds includes the exact version of your Joomla site. It is recommended to hide it for security reasons."
+COM_CONFIG_FIELD_METAVERSION_LABEL="Joomla Version"
COM_CONFIG_FIELD_OFFLINE_IMAGE_LABEL="Offline Image"
COM_CONFIG_FIELD_OFFLINE_MESSAGE_LABEL="Custom Message"
-COM_CONFIG_FIELD_PROXY_ENABLE_LABEL="Enable Outbound Proxy"
COM_CONFIG_FIELD_PROXY_ENABLE_DESC="Some hosts do not allow any network access from your site to the outside world by default and require you to manually configure an outbound proxy."
-COM_CONFIG_FIELD_PROXY_HOST_LABEL="Outbound Proxy Host"
+COM_CONFIG_FIELD_PROXY_ENABLE_LABEL="Enable Outbound Proxy"
COM_CONFIG_FIELD_PROXY_HOST_DESC="Host (domain) name or IP address."
+COM_CONFIG_FIELD_PROXY_HOST_LABEL="Outbound Proxy Host"
COM_CONFIG_FIELD_PROXY_PASSWORD_LABEL="Outbound Proxy Password"
COM_CONFIG_FIELD_PROXY_PORT_LABEL="Outbound Proxy Port"
-COM_CONFIG_FIELD_PROXY_USERNAME_LABEL="Outbound Proxy Username"
COM_CONFIG_FIELD_PROXY_USERNAME_DESC="Leave blank if your outbound proxy does not require authentication."
+COM_CONFIG_FIELD_PROXY_USERNAME_LABEL="Outbound Proxy Username"
COM_CONFIG_FIELD_REDIS_AUTH_LABEL="Redis Server Authentication"
COM_CONFIG_FIELD_REDIS_DB_LABEL="Redis Database"
COM_CONFIG_FIELD_REDIS_HOST_LABEL="Redis Server Host/Sock"
@@ -158,14 +158,14 @@ COM_CONFIG_FIELD_REDIS_PERSISTENT_LABEL="Persistent Redis"
COM_CONFIG_FIELD_REDIS_PORT_DESC="Port discarded if connecting to Redis server over Unix sockets."
COM_CONFIG_FIELD_REDIS_PORT_LABEL="Redis Server Port"
COM_CONFIG_FIELD_SEF_REWRITE_NOTE="Apache and Litespeed: Rename htaccess.txt to .htaccess IIS: Rename web.config.txt to web.config NginX: you must configure your server. Other servers or if unsure: please consult your hosting company."
-COM_CONFIG_FIELD_SEF_REWRITE_LABEL="Use URL Rewriting"
COM_CONFIG_FIELD_SEF_REWRITE_DESC="Removes the index.php/ part from the URLs."
-COM_CONFIG_FIELD_SEF_SUFFIX_LABEL="Add Suffix to URL"
+COM_CONFIG_FIELD_SEF_REWRITE_LABEL="Use URL Rewriting"
COM_CONFIG_FIELD_SEF_SUFFIX_DESC="By default, Joomla URLs are “bare”, without an extension. This options tells Joomla to add an extension such as .html, .feed etc based on the type of content being displayed by the URL."
-COM_CONFIG_FIELD_SEF_URL_LABEL="Search Engine Friendly URLs"
+COM_CONFIG_FIELD_SEF_SUFFIX_LABEL="Add Suffix to URL"
COM_CONFIG_FIELD_SEF_URL_DESC="Joomla URLs normally look like index.php?option=com_example&task=item.display&id=1 which isn't easy to convey verbally or in writing. Search Engine Friendly (SEF) URLs are more human–readable, e.g. index.php/example/display/something."
-COM_CONFIG_FIELD_SERVER_TIMEZONE_LABEL="Website Time Zone"
+COM_CONFIG_FIELD_SEF_URL_LABEL="Search Engine Friendly URLs"
COM_CONFIG_FIELD_SERVER_TIMEZONE_DESC="Used by default to display dates and times (Joomla stores them internally as UTC). This can be different than the time zone of your server. Users can override their preferred time zone in their user profile."
+COM_CONFIG_FIELD_SERVER_TIMEZONE_LABEL="Website Time Zone"
COM_CONFIG_FIELD_SESSION_HANDLER_LABEL="Session Handler"
COM_CONFIG_FIELD_SESSION_METADATA_DESC="If enabled, additional metadata about a user's session (including their username, user ID, and which application they are logged into) will be logged to the session database table. If disabled, features dependent on this data will be unavailable."
COM_CONFIG_FIELD_SESSION_METADATA_LABEL="Track Session Metadata"
@@ -177,10 +177,10 @@ COM_CONFIG_FIELD_SITE_NAME_LABEL="Site Name"
COM_CONFIG_FIELD_SITE_OFFLINE_LABEL="Site Offline"
COM_CONFIG_FIELD_SITENAME_PAGETITLES_LABEL="Site Name in Page Titles"
COM_CONFIG_FIELD_SUBJECT_LABEL="Subject"
-COM_CONFIG_FIELD_TEMP_PATH_LABEL="Path to Temp Folder"
COM_CONFIG_FIELD_TEMP_PATH_DESC="Joomla needs to temporarily store some files to perform actions such as installing / updating extensions or uploading files. Enter the absolute path of a directory that is writeable be PHP. Do not use the system–wide temporary folder (e.g. /tmp) for security reasons."
-COM_CONFIG_FIELD_UNICODESLUGS_LABEL="Unicode Aliases"
+COM_CONFIG_FIELD_TEMP_PATH_LABEL="Path to Temp Folder"
COM_CONFIG_FIELD_UNICODESLUGS_DESC="No: Joomla transliterates aliases which contain non–latin-1 characters using the transliteration engine provided by the Joomla language pack for the content's selected language, e.g. über becomes ueber for en-GB (English, Great Britain). Yes: Joomla does not transliterate aliases; the alias is used as is, e.g. über remains as–is."
+COM_CONFIG_FIELD_UNICODESLUGS_LABEL="Unicode Aliases"
COM_CONFIG_FIELD_VALUE_ADMINISTRATOR_ONLY="Administrator Only"
COM_CONFIG_FIELD_VALUE_AFTER="After"
COM_CONFIG_FIELD_VALUE_AUTHOR_EMAIL="Author Email"
@@ -209,8 +209,8 @@ COM_CONFIG_FIELD_WEBSERVICES_CORS_ALLOW_METHODS_DESC="Specifies the Web service
COM_CONFIG_FIELD_WEBSERVICES_CORS_ALLOW_ORIGIN_DESC="Specifies the origin allowed to access Web services on this site, sent back in response to a preflight request. Default: * (=all)."
COM_CONFIG_FIELDSET_TAGS_LABEL="Tags"
COM_CONFIG_FILTER_OPTION_SELECT_EXTENSION="- Select Extension -"
-COM_CONFIG_FRONTEDITING_LABEL="Frontend Editing"
COM_CONFIG_FRONTEDITING_DESC="Joomla can show an overlay in the public front–end, visible only to users with edit privileges, to directly modify the configuration of each module and/or menu displayed on the site. Set to “None” to disable this feature."
+COM_CONFIG_FRONTEDITING_LABEL="Frontend Editing"
COM_CONFIG_FRONTEDITING_MENUSANDMODULES="Modules & Menus"
COM_CONFIG_FRONTEDITING_MODULES="Modules"
COM_CONFIG_GLOBAL_CONFIGURATION="Global Configuration"
diff --git a/administrator/language/en-GB/com_content.ini b/administrator/language/en-GB/com_content.ini
index 23dcc8ccc7d5c..e7186424eeeff 100644
--- a/administrator/language/en-GB/com_content.ini
+++ b/administrator/language/en-GB/com_content.ini
@@ -97,6 +97,7 @@ COM_CONTENT_FIELDS_TYPE_MODAL_ARTICLE="Article"
COM_CONTENT_FIELDSET_PUBLISHING="Publishing"
COM_CONTENT_FIELDSET_RULES="Permissions"
COM_CONTENT_FIELDSET_URLS_AND_IMAGES="Images and Links"
+COM_CONTENT_FILTER_AUTHORS_BY_ME="Created by me"
COM_CONTENT_FILTER_FEATURED_NO="Unfeatured Articles"
COM_CONTENT_FILTER_FEATURED_YES="Featured Articles"
COM_CONTENT_FILTER_SEARCH_DESC="Search in title, alias and note. Prefix with ID: or AUTHOR: or CONTENT: to search for an article ID, article author or search in article content."
diff --git a/administrator/language/en-GB/com_fields.ini b/administrator/language/en-GB/com_fields.ini
index f020bac7822e9..1d65e31a4445c 100644
--- a/administrator/language/en-GB/com_fields.ini
+++ b/administrator/language/en-GB/com_fields.ini
@@ -21,6 +21,7 @@ COM_FIELDS_FIELD_EDITABLE_IN_BOTH="Both"
COM_FIELDS_FIELD_EDITABLE_IN_LABEL="Editable In"
COM_FIELDS_FIELD_EDITABLE_IN_SITE="Site"
COM_FIELDS_FIELD_FORM_EDIT="Edit Field"
+COM_FIELDS_FIELD_FORM_LAYOUT_LABEL="Layout"
COM_FIELDS_FIELD_FORM_NEW="New Field"
COM_FIELDS_FIELD_FORMOPTIONS_HEADING="Form Options"
COM_FIELDS_FIELD_GROUP_LABEL="Field Group"
diff --git a/administrator/language/en-GB/com_joomlaupdate.ini b/administrator/language/en-GB/com_joomlaupdate.ini
index 06aecff2d5b28..b4502450d0ce1 100644
--- a/administrator/language/en-GB/com_joomlaupdate.ini
+++ b/administrator/language/en-GB/com_joomlaupdate.ini
@@ -59,7 +59,7 @@ COM_JOOMLAUPDATE_SELF_EMPTYSTATE_TITLE="A new version of the Joomla Update Compo
COM_JOOMLAUPDATE_SYSTEM_CHECK="System Check"
COM_JOOMLAUPDATE_TOOLBAR_CHECK="Check for Updates"
COM_JOOMLAUPDATE_UPDATE_CHECK="Update Check"
-COM_JOOMLAUPDATE_UPDATE_CONFIRM_BACKUP="I'm prepared for the update and have made a backup."
+COM_JOOMLAUPDATE_UPDATE_CONFIRM_BACKUP="I'm prepared for the update and have made a backup of the files and database."
COM_JOOMLAUPDATE_UPDATE_EMPTYSTATE_TITLE="Update your site to \"Joomla! %s\""
COM_JOOMLAUPDATE_UPDATE_EMPTYSTATE_BUTTON_ADD="Start update"
COM_JOOMLAUPDATE_UPDATE_LOG_CLEANUP="Cleaning up after installation."
@@ -121,7 +121,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLAGAIN="Reinstall Joomla core files"
COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLED="Installed Joomla version"
COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLUPDATE="Update"
COM_JOOMLAUPDATE_VIEW_DEFAULT_LATEST="Latest Joomla version"
-COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL"
+COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="Update unavailable"
COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to fetch the download URL for that update. Either the update to Joomla %1$s is not available for your stability level or there is a problem with the Joomla Update Server. Please try to download the update package from the official Joomla download page and use the Upload and Update tab."
COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE="A new version of the Joomla Update Component is available."
COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE_DESC="You must update this component first before you can update Joomla! Click here to update the component."
diff --git a/administrator/language/en-GB/com_scheduler.ini b/administrator/language/en-GB/com_scheduler.ini
index 42bcbf67dbd81..6c31fa2ce9cf1 100644
--- a/administrator/language/en-GB/com_scheduler.ini
+++ b/administrator/language/en-GB/com_scheduler.ini
@@ -15,7 +15,7 @@ COM_SCHEDULER_CONFIG_HASH_PROTECTION_DESC="If enabled, tasks will only be trigge
COM_SCHEDULER_CONFIG_LAZY_SCHEDULER_ENABLED_DESC="If disabled, scheduled tasks will not be triggered by visitors on the site. Recommended if triggering with native cron."
COM_SCHEDULER_CONFIG_LAZY_SCHEDULER_ENABLED_LABEL="Lazy Scheduler"
COM_SCHEDULER_CONFIG_LAZY_SCHEDULER_INTERVAL_DESC="Interval between scheduler trigger requests from the client."
-COM_SCHEDULER_CONFIG_LAZY_SCHEDULER_INTERVAL_LABEL="Request Interval"
+COM_SCHEDULER_CONFIG_LAZY_SCHEDULER_INTERVAL_LABEL="Request Interval (seconds)"
COM_SCHEDULER_CONFIG_RESET_WEBCRON_KEY_LABEL="Reset Access Key"
COM_SCHEDULER_CONFIG_TASKS_FIELDSET_LABEL="Configure Tasks"
COM_SCHEDULER_CONFIG_TASK_TIMEOUT_LABEL="Task Timeout (seconds)"
@@ -59,7 +59,7 @@ COM_SCHEDULER_FIELD_OPTION_INTERVAL_MATCH_HOURS="Hours"
COM_SCHEDULER_FIELD_OPTION_INTERVAL_MATCH_MINUTES="Minutes"
COM_SCHEDULER_FIELD_OPTION_INTERVAL_MATCH_MONTHS="Months"
COM_SCHEDULER_FIELD_TASK_TYPE="Type ID"
-COM_SCHEDULER_FILTER_SEARCH_DESC="Search in Task title and note. Prefix with 'ID:' to search for a task ID"
+COM_SCHEDULER_FILTER_SEARCH_DESC="Search in task title and note. Prefix with ID: to search for a task ID."
COM_SCHEDULER_FILTER_SEARCH_LABEL="Search Tasks"
COM_SCHEDULER_FORM_TITLE_EDIT="Edit Task"
COM_SCHEDULER_FORM_TITLE_NEW="New Task"
@@ -109,7 +109,7 @@ COM_SCHEDULER_SCHEDULER_TASK_ROUTINE_NA="Task#%1$02d has no corresponding plugin
COM_SCHEDULER_SCHEDULER_TASK_START="Running task#%1$02d '%2$s'."
COM_SCHEDULER_SCHEDULER_TASK_UNKNOWN_EXIT="Task#%1$02d exited with code %4$d in %2$.2f (net %3$.2f) seconds."
COM_SCHEDULER_SCHEDULER_TASK_UNLOCKED="Task#%1$02d was unlocked."
-COM_SCHEDULER_SELECT_INTERVAL_MINUTES="- Select Interval in Minutes -"
+COM_SCHEDULER_SELECT_INTERVAL_MINUTES="- Select interval in Minutes -"
COM_SCHEDULER_SELECT_TASK_TYPE="Select task, %s"
COM_SCHEDULER_SELECT_TYPE="- Task Type -"
COM_SCHEDULER_TABLE_CAPTION="Tasks List"
@@ -121,8 +121,8 @@ COM_SCHEDULER_TASK_PRIORITY_ASC="Task Priority ascending"
COM_SCHEDULER_TASK_PRIORITY_DESC="Task Priority descending"
COM_SCHEDULER_TASK_ROUTINE_EXCEPTION="Routine threw exception: %1$s"
COM_SCHEDULER_TASK_TYPE="Task Type"
-COM_SCHEDULER_TASK_TYPE_ASC="Task Type ascending"
-COM_SCHEDULER_TASK_TYPE_DESC="Task Type descending"
+COM_SCHEDULER_TASK_TYPE_ASC="Task type ascending"
+COM_SCHEDULER_TASK_TYPE_DESC="Task type descending"
COM_SCHEDULER_TEST_RUN="Run Test"
COM_SCHEDULER_TEST_RUN_DURATION="Duration: %s seconds"
COM_SCHEDULER_TEST_RUN_OUTPUT="Output: %s"
diff --git a/administrator/language/en-GB/com_templates.ini b/administrator/language/en-GB/com_templates.ini
index e0b5094a4d695..1b2211b710697 100644
--- a/administrator/language/en-GB/com_templates.ini
+++ b/administrator/language/en-GB/com_templates.ini
@@ -147,10 +147,8 @@ COM_TEMPLATES_IMAGE_WIDTH="Width"
COM_TEMPLATES_INVALID_FILE_NAME="Invalid file name. Please choose a file name with a-z, A-Z, 0-9, - and _."
COM_TEMPLATES_INVALID_FILE_TYPE="File type not selected."
COM_TEMPLATES_INVALID_FOLDER_NAME="Invalid folder name. Please choose a folder name with a-z, A-Z, 0-9, - and _."
-COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_CORE="Hide Original"
-COM_TEMPLATES_LAYOUTS_DIFFVIEW_HIDE_DIFF="Hide Differences"
-COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_CORE="Show Original"
-COM_TEMPLATES_LAYOUTS_DIFFVIEW_SHOW_DIFF="Show Differences"
+COM_TEMPLATES_LAYOUTS_DIFFVIEW_CORE="Original File"
+COM_TEMPLATES_LAYOUTS_DIFFVIEW_DIFF="Differences"
COM_TEMPLATES_MANAGE_FOLDERS="Manage Folders"
COM_TEMPLATES_MANAGER_ADD_STYLE="Templates: Add Style"
COM_TEMPLATES_MANAGER_EDIT_STYLE="Templates: Edit Style"
diff --git a/administrator/language/en-GB/install.xml b/administrator/language/en-GB/install.xml
index 87c6747a74e56..c8659ad484aeb 100644
--- a/administrator/language/en-GB/install.xml
+++ b/administrator/language/en-GB/install.xml
@@ -3,7 +3,7 @@
English (en-GB)en-GB4.1.0
- December 2021
+ January 2022Joomla! Projectadmin@joomla.orgwww.joomla.org
diff --git a/administrator/language/en-GB/langmetadata.xml b/administrator/language/en-GB/langmetadata.xml
index b96d1a7f24af8..2e8da753bf0a5 100644
--- a/administrator/language/en-GB/langmetadata.xml
+++ b/administrator/language/en-GB/langmetadata.xml
@@ -2,7 +2,7 @@
English (en-GB)4.1.0
- December 2021
+ January 2022Joomla! Projectadmin@joomla.orgwww.joomla.org
diff --git a/administrator/language/en-GB/lib_joomla.ini b/administrator/language/en-GB/lib_joomla.ini
index 4cebf64ed4ef4..2fe27310d9012 100644
--- a/administrator/language/en-GB/lib_joomla.ini
+++ b/administrator/language/en-GB/lib_joomla.ini
@@ -649,6 +649,10 @@ JLIB_INSTALLER_NOT_ERROR="If the error is related to the installation of TinyMCE
JLIB_INSTALLER_NOTICE_LANG_RESET_USERS="Language set to Default for %d users."
JLIB_INSTALLER_NOTICE_LANG_RESET_USERS_1="Language set to Default for the user."
JLIB_INSTALLER_PURGED_UPDATES="Cleared updates."
+JLIB_INSTALLER_SQL_BEGIN="Start of SQL updates."
+JLIB_INSTALLER_SQL_BEGIN_SCHEMA="The current database version (schema) is %s."
+JLIB_INSTALLER_SQL_END="End of SQL updates."
+JLIB_INSTALLER_SQL_END_NOT_COMPLETE="End of SQL updates - INCOMPLETE."
JLIB_INSTALLER_UNINSTALL="Uninstall"
JLIB_INSTALLER_UPDATE="Update"
JLIB_INSTALLER_UPDATE_LOG_QUERY="Ran query from file %1$s. Query text: %2$s."
diff --git a/administrator/language/en-GB/plg_editors_tinymce.ini b/administrator/language/en-GB/plg_editors_tinymce.ini
index 6c2df01727fa8..ee02bd148c403 100644
--- a/administrator/language/en-GB/plg_editors_tinymce.ini
+++ b/administrator/language/en-GB/plg_editors_tinymce.ini
@@ -46,6 +46,7 @@ PLG_TINY_FIELD_LANGCODE_LABEL="Language Code"
PLG_TINY_FIELD_LANGSELECT_LABEL="Automatic Language Selection"
PLG_TINY_FIELD_NEWLINES_LABEL="New Lines"
PLG_TINY_FIELD_NUMBER_OF_SETS_LABEL="Number of Sets"
+PLG_TINY_FIELD_PASTE_AS_TEXT_LABEL="Paste As Text"
PLG_TINY_FIELD_PATH_LABEL="Element Path"
PLG_TINY_FIELD_PROHIBITED_LABEL="Prohibited Elements"
PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL="Horizontal Resizing"
diff --git a/administrator/language/en-GB/plg_fields_list.ini b/administrator/language/en-GB/plg_fields_list.ini
index f3b4e535323f2..5eeb5f3d4b567 100644
--- a/administrator/language/en-GB/plg_fields_list.ini
+++ b/administrator/language/en-GB/plg_fields_list.ini
@@ -5,6 +5,7 @@
PLG_FIELDS_LIST="Fields - List"
PLG_FIELDS_LIST_LABEL="List (%s)"
+PLG_FIELDS_LIST_PARAMS_FORM_LAYOUT_FANCY_SELECT="Enhanced select"
PLG_FIELDS_LIST_PARAMS_MULTIPLE_LABEL="Multiple"
PLG_FIELDS_LIST_PARAMS_OPTIONS_LABEL="List Values"
PLG_FIELDS_LIST_PARAMS_OPTIONS_NAME_LABEL="Text"
diff --git a/administrator/language/en-GB/plg_fields_radio.ini b/administrator/language/en-GB/plg_fields_radio.ini
index fb82a5bfd0114..bd3fa1089e2ae 100644
--- a/administrator/language/en-GB/plg_fields_radio.ini
+++ b/administrator/language/en-GB/plg_fields_radio.ini
@@ -5,6 +5,8 @@
PLG_FIELDS_RADIO="Fields - Radio"
PLG_FIELDS_RADIO_LABEL="Radio (%s)"
+PLG_FIELDS_RADIO_PARAMS_FORM_LAYOUT_BUTTONS="Buttons"
+PLG_FIELDS_RADIO_PARAMS_FORM_LAYOUT_SWITCHER="Switcher"
PLG_FIELDS_RADIO_PARAMS_OPTIONS_LABEL="Radio Values"
PLG_FIELDS_RADIO_PARAMS_OPTIONS_NAME_LABEL="Text"
PLG_FIELDS_RADIO_PARAMS_OPTIONS_VALUE_LABEL="Value"
diff --git a/administrator/language/en-GB/plg_fields_sql.ini b/administrator/language/en-GB/plg_fields_sql.ini
index 5744e7f541109..26552719cbb48 100644
--- a/administrator/language/en-GB/plg_fields_sql.ini
+++ b/administrator/language/en-GB/plg_fields_sql.ini
@@ -6,6 +6,7 @@
PLG_FIELDS_SQL="Fields - SQL"
PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE="Only a Super User can create or edit an SQL field!"
PLG_FIELDS_SQL_LABEL="SQL (%s)"
+PLG_FIELDS_SQL_PARAMS_FORM_LAYOUT_FANCY_SELECT="Enhanced select"
PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL="Multiple"
PLG_FIELDS_SQL_PARAMS_QUERY_DESC="The SQL query which will provide the data for the dropdown list. The query must return two columns; one called 'value' which will hold the values of the list items; the other called 'text' with the text in the dropdown list." ; The terms 'value' and 'text' should not be translated
PLG_FIELDS_SQL_PARAMS_QUERY_LABEL="Query"
diff --git a/administrator/language/en-GB/plg_system_stats.ini b/administrator/language/en-GB/plg_system_stats.ini
index c322fd4d7e50b..60ef4610ae074 100644
--- a/administrator/language/en-GB/plg_system_stats.ini
+++ b/administrator/language/en-GB/plg_system_stats.ini
@@ -4,24 +4,24 @@
; Note : All ini files need to be saved as UTF-8
PLG_SYSTEM_STATS="System - Joomla! Statistics"
-PLG_SYSTEM_STATS_BTN_NEVER_SEND="Never"
-PLG_SYSTEM_STATS_BTN_SEND_ALWAYS="Always"
+PLG_SYSTEM_STATS_BTN_NEVER_SEND="No"
+PLG_SYSTEM_STATS_BTN_SEND_ALWAYS="Yes, I'll help Joomla!"
PLG_SYSTEM_STATS_BTN_SEND_NOW="Once"
PLG_SYSTEM_STATS_INTERVAL_LABEL="Interval (hours)"
PLG_SYSTEM_STATS_LABEL_CMS_VERSION="CMS Version"
PLG_SYSTEM_STATS_LABEL_DB_TYPE="DB Type"
PLG_SYSTEM_STATS_LABEL_DB_VERSION="DB Version"
-PLG_SYSTEM_STATS_LABEL_MESSAGE_TITLE="Joomla! would like your permission to collect some basic statistics."
+PLG_SYSTEM_STATS_LABEL_MESSAGE_TITLE="Help us make Joomla! better!"
PLG_SYSTEM_STATS_LABEL_PHP_VERSION="PHP Version"
PLG_SYSTEM_STATS_LABEL_SERVER_OS="Server OS"
PLG_SYSTEM_STATS_LABEL_UNIQUE_ID="Unique ID"
PLG_SYSTEM_STATS_MODE_LABEL="Mode"
PLG_SYSTEM_STATS_MODE_OPTION_ALWAYS_SEND="Always send"
PLG_SYSTEM_STATS_MODE_OPTION_NEVER_SEND="Never send"
-PLG_SYSTEM_STATS_MODE_OPTION_ON_DEMAND="On demand"
+PLG_SYSTEM_STATS_MODE_OPTION_ON_DEMAND="Ask again"
PLG_SYSTEM_STATS_MSG_ALLOW_SENDING_DATA="Enable Joomla Statistics?"
-PLG_SYSTEM_STATS_MSG_JOOMLA_WANTS_TO_SEND_DATA="To better understand our install base and end user environments it is helpful if you send some site information back to a Joomla! controlled central server. No identifying data is captured at any point. You can change these settings later from Plugins → System - Joomla! Statistics."
-PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT="Select here to see the information that will be sent."
+PLG_SYSTEM_STATS_MSG_JOOMLA_WANTS_TO_SEND_DATA="We want to increase the compatibility of our Joomla! software with our user's server settings. Therefore we need anonymous data from your site to better understand the install base and end user environments. All data is anonymised and only sent to a Joomla! controlled central server. You can change these settings later from Plugins → System - Joomla! Statistics."
+PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT="No identifying data is captured at any point. Select here to review."
PLG_SYSTEM_STATS_RESET_UNIQUE_ID="Reset Unique ID"
PLG_SYSTEM_STATS_SETTING="Setting"
PLG_SYSTEM_STATS_STATISTICS="Statistics"
diff --git a/administrator/language/en-GB/plg_task_checkfiles.ini b/administrator/language/en-GB/plg_task_checkfiles.ini
index ec31695e03b97..cee47448cc908 100644
--- a/administrator/language/en-GB/plg_task_checkfiles.ini
+++ b/administrator/language/en-GB/plg_task_checkfiles.ini
@@ -4,13 +4,15 @@
; Note : All ini files need to be saved as UTF-8
PLG_TASK_CHECK_FILES="Task - Check Files"
-PLG_TASK_CHECK_FILES_LABEL_DIMENSION_LIMIT="Limit"
+PLG_TASK_CHECK_FILES_LABEL_DIMENSION_LIMIT="Limit (px)"
+PLG_TASK_CHECK_FILES_LABEL_MAXIMAGES="Maximum Images"
+PLG_TASK_CHECK_FILES_LABEL_MAXIMAGES_DESC="The maximum number of images to be processed in a single run. Setting this number too high may cause the task to timeout."
PLG_TASK_CHECK_FILES_LABEL_DIRECTORY="Directory"
PLG_TASK_CHECK_FILES_LABEL_IMAGE_DIMENSION="Dimension"
PLG_TASK_CHECK_FILES_LOG_IMAGE_PATH_NA="Image path does exist!"
PLG_TASK_CHECK_FILES_LOG_IMAGE_SAVE_FAIL="Failed to save image file"
PLG_TASK_CHECK_FILES_LOG_RESIZE_FAIL="Failed to resize image due to an error in plugin logic..."
PLG_TASK_CHECK_FILES_LOG_RESIZING_IMAGE="Found image of size %1$sx%2$s px; resizing to %3$sx%4$s px. File: %5$s"
-PLG_TASK_CHECK_FILES_TASK_IMAGE_SIZE_DESC="Check images, resize if larger than allowed."
+PLG_TASK_CHECK_FILES_TASK_IMAGE_SIZE_DESC="Check images, resize if larger than allowed. Attention: The original file will be overwritten!"
PLG_TASK_CHECK_FILES_TASK_IMAGE_SIZE_TITLE="Image Size Check"
PLG_TASK_CHECK_FILES_XML_DESCRIPTION="Offers task routines for checking for oversized files, and related actions if possible."
diff --git a/administrator/language/en-GB/plg_task_sitestatus.ini b/administrator/language/en-GB/plg_task_sitestatus.ini
index 7cf4d22e86257..4d57ca42c11eb 100644
--- a/administrator/language/en-GB/plg_task_sitestatus.ini
+++ b/administrator/language/en-GB/plg_task_sitestatus.ini
@@ -10,7 +10,7 @@ PLG_TASK_SITE_STATUS_ERROR_CONFIGURATION_PHP_NOTWRITABLE="Could not make configu
PLG_TASK_SITE_STATUS_ERROR_WRITE_FAILED="Could not write to the configuration file!"
PLG_TASK_SITE_STATUS_ROUTINE_END_LOG_MESSAGE="ToggleOffline return code is: %1$d. Processing Time: %2$.2f seconds."
PLG_TASK_SITE_STATUS_TASK_LOG_SITE_STATUS="Site was %1$s, is now %2$s."
-PLG_TASK_SITE_STATUS_SET_OFFLINE_DESC="Sets site status to online on each run."
+PLG_TASK_SITE_STATUS_SET_OFFLINE_DESC="Sets site status to offline on each run."
PLG_TASK_SITE_STATUS_SET_OFFLINE_ROUTINE_END_LOG_MESSAGE="SetOffline return code is: %1$d. Processing Time: %2$.2f seconds."
PLG_TASK_SITE_STATUS_SET_OFFLINE_TITLE="Set Site Offline"
PLG_TASK_SITE_STATUS_SET_ONLINE_DESC="Sets site status to online on each run."
diff --git a/administrator/manifests/files/joomla.xml b/administrator/manifests/files/joomla.xml
index caa01fe6e44a0..77e57ae86ed26 100644
--- a/administrator/manifests/files/joomla.xml
+++ b/administrator/manifests/files/joomla.xml
@@ -7,7 +7,7 @@
(C) 2019 Open Source Matters, Inc.GNU General Public License version 2 or later; see LICENSE.txt4.1.0-dev
- December 2021
+ January 2022FILES_JOOMLA_XML_DESCRIPTIONadministrator/components/com_admin/script.php
diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml
index 23e3134adce9c..a2d47e858cbda 100644
--- a/administrator/manifests/packages/pkg_en-GB.xml
+++ b/administrator/manifests/packages/pkg_en-GB.xml
@@ -3,7 +3,7 @@
English (en-GB) Language Packen-GB4.1.0.1
- December 2021
+ January 2022Joomla! Projectadmin@joomla.orgwww.joomla.org
diff --git a/administrator/modules/mod_latest/src/Helper/LatestHelper.php b/administrator/modules/mod_latest/src/Helper/LatestHelper.php
index 4063ed752c04f..5353913a538db 100644
--- a/administrator/modules/mod_latest/src/Helper/LatestHelper.php
+++ b/administrator/modules/mod_latest/src/Helper/LatestHelper.php
@@ -96,7 +96,8 @@ public static function getList(Registry &$params, ArticlesModel $model)
{
$item->link = '';
- if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
+ if ($user->authorise('core.edit', 'com_content.article.' . $item->id)
+ || ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by)))
{
$item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
}
diff --git a/administrator/modules/mod_popular/src/Helper/PopularHelper.php b/administrator/modules/mod_popular/src/Helper/PopularHelper.php
index 83d9fd226c424..1572b9b821013 100644
--- a/administrator/modules/mod_popular/src/Helper/PopularHelper.php
+++ b/administrator/modules/mod_popular/src/Helper/PopularHelper.php
@@ -87,7 +87,8 @@ public static function getList(Registry &$params, ArticlesModel $model)
{
$item->link = '';
- if ($user->authorise('core.edit', 'com_content.article.' . $item->id))
+ if ($user->authorise('core.edit', 'com_content.article.' . $item->id)
+ || ($user->authorise('core.edit.own', 'com_content.article.' . $item->id) && ($userId === $item->created_by)))
{
$item->link = Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
}
diff --git a/api/components/com_categories/src/Controller/CategoriesController.php b/api/components/com_categories/src/Controller/CategoriesController.php
index 71ed5fae6007b..e0c7b8d29ded1 100644
--- a/api/components/com_categories/src/Controller/CategoriesController.php
+++ b/api/components/com_categories/src/Controller/CategoriesController.php
@@ -65,7 +65,7 @@ protected function preprocessSaveData(array $data): array
*
* @return integer The record ID on success, false on failure
*
- * @since __DEPLOY_VERSION__
+ * @since 4.0.6
*/
protected function save($recordKey = null)
{
diff --git a/api/components/com_config/src/Controller/ApplicationController.php b/api/components/com_config/src/Controller/ApplicationController.php
index 038b2df81972a..164f9d30a2328 100644
--- a/api/components/com_config/src/Controller/ApplicationController.php
+++ b/api/components/com_config/src/Controller/ApplicationController.php
@@ -115,7 +115,7 @@ public function edit()
$oldData = $model->getData();
$data = array_replace($oldData, $data);
- // TODO: Not the cleanest thing ever but it works...
+ // @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR . '/forms');
// Must load after serving service-requests
diff --git a/api/components/com_config/src/Controller/ComponentController.php b/api/components/com_config/src/Controller/ComponentController.php
index 484433aad254a..523bceb5907ec 100644
--- a/api/components/com_config/src/Controller/ComponentController.php
+++ b/api/components/com_config/src/Controller/ComponentController.php
@@ -114,7 +114,7 @@ public function edit()
$option = $this->input->get('component_name');
- // TODO: Not the cleanest thing ever but it works...
+ // @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_ADMINISTRATOR . '/components/' . $option);
// Must load after serving service-requests
diff --git a/api/components/com_config/src/View/Component/JsonapiView.php b/api/components/com_config/src/View/Component/JsonapiView.php
index 97d6bc3c31529..613af3e74b946 100644
--- a/api/components/com_config/src/View/Component/JsonapiView.php
+++ b/api/components/com_config/src/View/Component/JsonapiView.php
@@ -43,7 +43,7 @@ public function displayList(array $items = null)
if ($component === null || !$component->enabled)
{
- // TODO: exception component unavailable
+ // @todo: exception component unavailable
throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_INVALID_COMPONENT_NAME'), 400);
}
diff --git a/api/components/com_contact/src/Serializer/ContactSerializer.php b/api/components/com_contact/src/Serializer/ContactSerializer.php
index 06231aa2f09e3..23fe7333f3b40 100644
--- a/api/components/com_contact/src/Serializer/ContactSerializer.php
+++ b/api/components/com_contact/src/Serializer/ContactSerializer.php
@@ -40,7 +40,7 @@ public function languageAssociations($model)
{
$resources = [];
- // TODO: This can't be hardcoded in the future?
+ // @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);
foreach ($model->associations as $association)
diff --git a/api/components/com_content/src/Serializer/ContentSerializer.php b/api/components/com_content/src/Serializer/ContentSerializer.php
index a3f74829e9ac6..5bf5fff93024f 100644
--- a/api/components/com_content/src/Serializer/ContentSerializer.php
+++ b/api/components/com_content/src/Serializer/ContentSerializer.php
@@ -37,7 +37,7 @@ public function languageAssociations($model)
{
$resources = [];
- // TODO: This can't be hardcoded in the future?
+ // @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);
foreach ($model->associations as $association)
diff --git a/api/components/com_languages/src/Controller/OverridesController.php b/api/components/com_languages/src/Controller/OverridesController.php
index 9ebb27ff5db9c..91a4c557d87fb 100644
--- a/api/components/com_languages/src/Controller/OverridesController.php
+++ b/api/components/com_languages/src/Controller/OverridesController.php
@@ -87,17 +87,17 @@ protected function save($recordKey = null)
/** @var \Joomla\CMS\MVC\Model\AdminModel $model */
$model = $this->getModel(Inflector::singularize($this->contentType));
- $model->setState('filter.language', $this->input->post->get('lang_code'));
- $model->setState('filter.client', $this->input->post->get('app'));
-
if (!$model)
{
throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE'));
}
+ $model->setState('filter.language', $this->input->post->get('lang_code'));
+ $model->setState('filter.client', $this->input->post->get('app'));
+
$data = $this->input->get('data', json_decode($this->input->json->getRaw(), true), 'array');
- // TODO: Not the cleanest thing ever but it works...
+ // @todo: Not the cleanest thing ever but it works...
Form::addFormPath(JPATH_COMPONENT_ADMINISTRATOR . '/forms');
// Validate the posted data.
diff --git a/api/components/com_media/src/Controller/AdaptersController.php b/api/components/com_media/src/Controller/AdaptersController.php
index 1831173a1ce72..a48950a03070d 100644
--- a/api/components/com_media/src/Controller/AdaptersController.php
+++ b/api/components/com_media/src/Controller/AdaptersController.php
@@ -13,7 +13,7 @@
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service controller.
@@ -22,7 +22,7 @@
*/
class AdaptersController extends ApiController
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* The content type of the item.
diff --git a/api/components/com_media/src/Controller/MediaController.php b/api/components/com_media/src/Controller/MediaController.php
index b9ed3e18023aa..e12c4c46db3a4 100644
--- a/api/components/com_media/src/Controller/MediaController.php
+++ b/api/components/com_media/src/Controller/MediaController.php
@@ -18,7 +18,7 @@
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
use Joomla\Component\Media\Api\Model\MediumModel;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;
@@ -30,7 +30,7 @@
*/
class MediaController extends ApiController
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* The content type of the item.
@@ -130,7 +130,7 @@ public function displayList()
$filter = InputFilter::getInstance();
// Search for files matching (part of) a name or glob pattern.
- if ($doSearch = array_key_exists('search', $apiFilterInfo))
+ if (\array_key_exists('search', $apiFilterInfo))
{
$this->modelState->set('search', $filter->clean($apiFilterInfo['search'], 'STRING'));
diff --git a/api/components/com_media/src/Model/AdapterModel.php b/api/components/com_media/src/Model/AdapterModel.php
index 4141a6c3cdccc..2ddd9743ec657 100644
--- a/api/components/com_media/src/Model/AdapterModel.php
+++ b/api/components/com_media/src/Model/AdapterModel.php
@@ -12,7 +12,7 @@
\defined('_JEXEC') or die;
use Joomla\CMS\MVC\Model\BaseModel;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service model supporting a single adapter item.
@@ -21,7 +21,7 @@
*/
class AdapterModel extends BaseModel
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* Method to get a single adapter.
diff --git a/api/components/com_media/src/Model/AdaptersModel.php b/api/components/com_media/src/Model/AdaptersModel.php
index db3f885057cfe..c102c175ce168 100644
--- a/api/components/com_media/src/Model/AdaptersModel.php
+++ b/api/components/com_media/src/Model/AdaptersModel.php
@@ -14,7 +14,7 @@
use Joomla\CMS\MVC\Model\BaseModel;
use Joomla\CMS\MVC\Model\ListModelInterface;
use Joomla\CMS\Pagination\Pagination;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service model supporting lists of media adapters.
@@ -23,7 +23,7 @@
*/
class AdaptersModel extends BaseModel implements ListModelInterface
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* A hacky way to enable the standard jsonapiView::displayList() to create a Pagination object,
diff --git a/api/components/com_media/src/Model/MediaModel.php b/api/components/com_media/src/Model/MediaModel.php
index 50d37fa8e9855..ef0612191072b 100644
--- a/api/components/com_media/src/Model/MediaModel.php
+++ b/api/components/com_media/src/Model/MediaModel.php
@@ -18,7 +18,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
use Joomla\Component\Media\Administrator\Model\ApiModel;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service model supporting lists of media items.
@@ -27,7 +27,7 @@
*/
class MediaModel extends BaseModel implements ListModelInterface
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* Instance of com_media's ApiModel
diff --git a/api/components/com_media/src/Model/MediumModel.php b/api/components/com_media/src/Model/MediumModel.php
index e30ec88d3681b..d2a9e651848e9 100644
--- a/api/components/com_media/src/Model/MediumModel.php
+++ b/api/components/com_media/src/Model/MediumModel.php
@@ -19,7 +19,7 @@
use Joomla\Component\Media\Administrator\Exception\FileNotFoundException;
use Joomla\Component\Media\Administrator\Exception\InvalidPathException;
use Joomla\Component\Media\Administrator\Model\ApiModel;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service model supporting a single media item.
@@ -28,7 +28,7 @@
*/
class MediumModel extends BaseModel
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* Instance of com_media's ApiModel
@@ -97,6 +97,18 @@ public function save($path = null): string
['adapter' => $adapterName, 'path' => $path] = $this->resolveAdapterAndPath($path);
+ // Trim adapter information from path
+ if ($pos = strpos($path, ':/'))
+ {
+ $path = substr($path, $pos + 1);
+ }
+
+ // Trim adapter information from old path
+ if ($pos = strpos($oldPath, ':/'))
+ {
+ $oldPath = substr($oldPath, $pos + 1);
+ }
+
$resultPath = '';
/**
diff --git a/api/components/com_media/src/View/Adapters/JsonapiView.php b/api/components/com_media/src/View/Adapters/JsonapiView.php
index 7f4e7a3de084c..7c059674a9aa9 100644
--- a/api/components/com_media/src/View/Adapters/JsonapiView.php
+++ b/api/components/com_media/src/View/Adapters/JsonapiView.php
@@ -12,7 +12,7 @@
\defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service view
@@ -21,7 +21,7 @@
*/
class JsonapiView extends BaseApiView
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* The fields to render item in the documents
diff --git a/api/components/com_media/src/View/Media/JsonapiView.php b/api/components/com_media/src/View/Media/JsonapiView.php
index 69169719fae24..bc8d0db67ccec 100644
--- a/api/components/com_media/src/View/Media/JsonapiView.php
+++ b/api/components/com_media/src/View/Media/JsonapiView.php
@@ -12,7 +12,7 @@
\defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
-use Joomla\Component\Media\Api\Helper\AdapterTrait;
+use Joomla\Component\Media\Administrator\Provider\ProviderManagerHelperTrait;
/**
* Media web service view
@@ -21,7 +21,7 @@
*/
class JsonapiView extends BaseApiView
{
- use AdapterTrait;
+ use ProviderManagerHelperTrait;
/**
* The fields to render item in the documents
diff --git a/api/components/com_newsfeeds/src/Serializer/NewsfeedSerializer.php b/api/components/com_newsfeeds/src/Serializer/NewsfeedSerializer.php
index 2571e85e61cd4..ed37348216069 100644
--- a/api/components/com_newsfeeds/src/Serializer/NewsfeedSerializer.php
+++ b/api/components/com_newsfeeds/src/Serializer/NewsfeedSerializer.php
@@ -40,7 +40,7 @@ public function languageAssociations($model)
{
$resources = [];
- // TODO: This can't be hardcoded in the future?
+ // @todo: This can't be hardcoded in the future?
$serializer = new JoomlaSerializer($this->type);
foreach ($model->associations as $association)
diff --git a/api/language/en-GB/install.xml b/api/language/en-GB/install.xml
index 4a0ff0fa19e11..7a97416e4d1e9 100644
--- a/api/language/en-GB/install.xml
+++ b/api/language/en-GB/install.xml
@@ -3,7 +3,7 @@
English (en-GB)en-GB4.1.0
- December 2021
+ January 2022Joomla! Projectadmin@joomla.orgwww.joomla.org
diff --git a/api/language/en-GB/langmetadata.xml b/api/language/en-GB/langmetadata.xml
index d334090823c7f..c71909c412579 100644
--- a/api/language/en-GB/langmetadata.xml
+++ b/api/language/en-GB/langmetadata.xml
@@ -2,7 +2,7 @@
English (en-GB)4.1.0
- December 2021
+ January 2022Joomla! Projectadmin@joomla.orgwww.joomla.org
diff --git a/build/build-modules-js/init/exemptions/tinymce.es6.js b/build/build-modules-js/init/exemptions/tinymce.es6.js
index ab74b5225ca1c..3c2d4e28bc7f4 100644
--- a/build/build-modules-js/init/exemptions/tinymce.es6.js
+++ b/build/build-modules-js/init/exemptions/tinymce.es6.js
@@ -74,17 +74,17 @@ module.exports.tinyMCE = async (packageName, version) => {
let cssContent = await readFile('build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.css', { encoding: 'utf8' });
cssContent = await Postcss([CssNano()]).process(cssContent, { from: undefined });
// Get the JS
- let jsContent = await readFile('build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es5.js', { encoding: 'utf8' });
+ let jsContent = await readFile('build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es6.js', { encoding: 'utf8' });
jsContent = await minify(jsContent, { sourceMap: false, format: { comments: false } });
// Write the HTML file
const htmlContent = `
-
+
-
+
`;
diff --git a/build/media_source/com_content/js/admin-article-readmore.es6.js b/build/media_source/com_content/js/admin-article-readmore.es6.js
index 7494ff1ee73e3..6b569f1597647 100644
--- a/build/media_source/com_content/js/admin-article-readmore.es6.js
+++ b/build/media_source/com_content/js/admin-article-readmore.es6.js
@@ -20,7 +20,7 @@
} else if (content && !content.match(//i)) {
Joomla.editors.instances[editor].replaceSelection('');
} else {
- // TODO replace with joomla-alert
+ // @todo replace with joomla-alert
alert(options.exists);
return false;
}
diff --git a/build/media_source/com_finder/js/index.es6.js b/build/media_source/com_finder/js/index.es6.js
index bc805cefa1ce0..b409b0c665724 100644
--- a/build/media_source/com_finder/js/index.es6.js
+++ b/build/media_source/com_finder/js/index.es6.js
@@ -10,11 +10,11 @@ Joomla = window.Joomla || {};
document.addEventListener('DOMContentLoaded', () => {
Joomla.submitbutton = (pressbutton) => {
- // TODO replace with joomla-alert
+ // @todo replace with joomla-alert
if (pressbutton === 'index.purge' && !window.confirm(Joomla.Text._('COM_FINDER_INDEX_CONFIRM_PURGE_PROMPT'))) {
return false;
}
- // TODO replace with joomla-alert
+ // @todo replace with joomla-alert
if (pressbutton === 'index.delete' && !window.confirm(Joomla.Text._('COM_FINDER_INDEX_CONFIRM_DELETE_PROMPT'))) {
return false;
}
diff --git a/build/media_source/com_finder/js/maps.es6.js b/build/media_source/com_finder/js/maps.es6.js
index 73446c9641da8..0b5f74afbd0e7 100644
--- a/build/media_source/com_finder/js/maps.es6.js
+++ b/build/media_source/com_finder/js/maps.es6.js
@@ -10,7 +10,7 @@ Joomla = window.Joomla || {};
document.addEventListener('DOMContentLoaded', () => {
Joomla.submitbutton = (pressbutton) => {
- // TODO replace with joomla-alert
+ // @todo replace with joomla-alert
if (pressbutton === 'map.delete' && !window.confirm(Joomla.Text._('COM_FINDER_MAPS_CONFIRM_DELETE_PROMPT'))) {
return false;
}
diff --git a/build/media_source/com_media/scss/components/_media-breadcrumb.scss b/build/media_source/com_media/scss/components/_media-breadcrumb.scss
index 21fdc086d519a..faffa71558c62 100644
--- a/build/media_source/com_media/scss/components/_media-breadcrumb.scss
+++ b/build/media_source/com_media/scss/components/_media-breadcrumb.scss
@@ -1,11 +1,11 @@
.media-breadcrumb {
display: flex;
padding: 0;
- margin: 0 auto 0 0;
+ margin-inline-end: auto;
font-size: .9rem;
line-height: $toolbar-height;
background: transparent;
- border-left: 1px solid $border-color;
+ border-inline-start: 1px solid $border-color;
ol {
display: flex;
@@ -20,15 +20,16 @@
}
.media-breadcrumb-item {
- padding: 0 8px 0 22px;
+ padding-inline-end: 8px;
+ padding-inline-start: 22px;
background-color: $breadcrumbs-bg;
&:first-of-type {
- padding-left: 16px;
+ padding-inline-start: 16px;
}
&:last-of-type {
background-color: $breadcrumbs-current-bg;
&::after {
- border-left-color: $breadcrumbs-current-bg;
+ border-inline-start-color: $breadcrumbs-current-bg;
}
}
&:hover {
@@ -42,7 +43,7 @@
position: absolute;
top: 0;
bottom: 0;
- left: 100%;
+ inset-inline-start: 100%;
z-index: 2;
display: block;
width: 0;
@@ -51,45 +52,12 @@
content: "" !important;
border-top: 23px solid transparent;
border-bottom: 23px solid transparent;
- border-left: 10px solid transparent;
+ border-inline-start: 10px solid transparent;
}
&::before {
- border-left-color: $border-color;
+ border-inline-start-color: $border-color;
}
&::after {
- border-left-color: $breadcrumbs-bg;
+ border-inline-start-color: $breadcrumbs-bg;
}
}
-
-.breadcrumb-item + .breadcrumb-item::before {
- display: none;
-}
-
-// RTL override
-
-html[dir=rtl] .media-breadcrumb {
- margin: 0 0 0 auto;
-}
-
-html[dir=rtl] .media-breadcrumb-item::after, .media-breadcrumb-item::before {
- right: 100%;
- border-right: 10px solid transparent;
- border-left: 0;
-}
-
-html[dir=rtl] .media-breadcrumb-item {
- padding: 0 22px 0 8px;
-}
-
-html[dir=rtl] .media-breadcrumb-item::before {
- border-right-color: #fafafa;
-}
-
-html[dir=rtl] .media-breadcrumb-item:first-of-type {
- padding-right: 16px;
- padding-left: 0;
-}
-
-html[dir=rtl] .media-breadcrumb-item:last-of-type::after {
- border-right: 10px solid #fff;
-}
diff --git a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js
index 9ecee7af98c26..53c06e11bc1e0 100644
--- a/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js
+++ b/build/media_source/com_scheduler/js/admin-view-run-test-task.es6.js
@@ -17,7 +17,8 @@ if (!window.Joomla) {
const initRunner = () => {
const paths = Joomla.getOptions('system.paths');
- const uri = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_ajax&format=json&plugin=RunSchedulerTest&group=system&id=%d`;
+ const token = Joomla.getOptions('com_scheduler.test-task.token');
+ const uri = `${paths ? `${paths.base}/index.php` : window.location.pathname}?option=com_ajax&format=json&plugin=RunSchedulerTest&group=system&id=%d${token ? `&${token}=1` : ''}`;
const modal = document.getElementById('scheduler-test-modal');
// Task output template
@@ -41,7 +42,7 @@ const initRunner = () => {
const id = parseInt(button.dataset.id, 10);
const { title } = button.dataset;
- modal.querySelector('.modal-title').innerHTML = Joomla.Text._('COM_SCHEDULER_TEST_RUN_TITLE').replace('%d', id);
+ modal.querySelector('.modal-title').innerHTML = Joomla.Text._('COM_SCHEDULER_TEST_RUN_TITLE').replace('%d', id.toString());
modal.querySelector('.modal-body > div').innerHTML = template.replace('%s', title);
Joomla.request({
diff --git a/build/media_source/com_templates/css/admin-templates-default.css b/build/media_source/com_templates/css/admin-templates-default.css
index 5f930753fff38..a92aa1935c07a 100644
--- a/build/media_source/com_templates/css/admin-templates-default.css
+++ b/build/media_source/com_templates/css/admin-templates-default.css
@@ -92,15 +92,6 @@
background-color: #F0F0EE;
}
-#jform_show_core {
- display: inline;
-}
-
-#jform_show_diff {
- display: inline;
- margin-left: 3.5em;
-}
-
.switcher-label-0, .switcher-label-1 {
white-space: nowrap;
}
diff --git a/build/media_source/com_users/js/admin-users-groups.es6.js b/build/media_source/com_users/js/admin-users-groups.es6.js
index dd4c843f5edcd..becbe3fb3793b 100644
--- a/build/media_source/com_users/js/admin-users-groups.es6.js
+++ b/build/media_source/com_users/js/admin-users-groups.es6.js
@@ -14,7 +14,7 @@ Joomla = window.Joomla || {};
const cids = document.getElementsByName('cid[]');
for (let i = 0; i < cids.length; i += 1) {
if (cids[i].checked && cids[i].parentNode.getAttribute('data-usercount') !== '0') {
- // TODO replace with joomla-alert
+ // @todo replace with joomla-alert
if (window.confirm(Joomla.Text._('COM_USERS_GROUPS_CONFIRM_DELETE'))) {
Joomla.submitform(task);
}
diff --git a/build/media_source/plg_editors_codemirror/js/joomla-editor-codemirror.w-c.es6.js b/build/media_source/plg_editors_codemirror/js/joomla-editor-codemirror.w-c.es6.js
index ecef691e569ec..ddb2ded4c2331 100644
--- a/build/media_source/plg_editors_codemirror/js/joomla-editor-codemirror.w-c.es6.js
+++ b/build/media_source/plg_editors_codemirror/js/joomla-editor-codemirror.w-c.es6.js
@@ -6,6 +6,13 @@ class CodemirrorEditor extends HTMLElement {
this.host = window.location.origin;
this.element = this.querySelector('textarea');
this.refresh = this.refresh.bind(this);
+
+ // Observer instance to refresh the Editor when it become visible, eg after Tab switching
+ this.intersectionObserver = new IntersectionObserver((entries) => {
+ if (entries[0].isIntersecting && this.instance) {
+ this.instance.refresh();
+ }
+ }, { threshold: 0 });
}
static get observedAttributes() {
@@ -124,11 +131,17 @@ class CodemirrorEditor extends HTMLElement {
this.instance = window.CodeMirror.fromTextArea(this.element, this.options);
this.instance.disable = (disabled) => this.setOption('readOnly', disabled ? 'nocursor' : false);
Joomla.editors.instances[this.element.id] = this.instance;
+
+ // Watch when the element in viewport, and refresh the editor
+ this.intersectionObserver.observe(this);
}
disconnectedCallback() {
// Remove from the Joomla API
delete Joomla.editors.instances[this.element.id];
+
+ // Remove from observer
+ this.intersectionObserver.unobserve(this);
}
refresh(element) {
diff --git a/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es5.js b/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es5.js
deleted file mode 100644
index 910370e37e2d7..0000000000000
--- a/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es5.js
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * plugin.js
- *
- * Original code by Arjan Haverkamp
- * Copyright 2013-2015 Arjan Haverkamp (arjan@webgear.nl)
- *
- * Adapted for use in Joomla by Dimitrios Grammatikogiannis
- */
- /* eslint-disable no-undef */
- tinymce.PluginManager.add('highlightPlus', function(editor, url) {
- function showSourceEditor() {
- editor.focus();
- editor.selection.collapse(true);
-
- if (!editor.settings.codemirror) editor.settings.codemirror = {};
-
- // Insert caret marker
- if (editor.settings.codemirror && editor.settings.codemirror.saveCursorPosition) {
- editor.selection.setContent('');
- }
-
- let codemirrorWidth = 800;
- if (editor.settings.codemirror.width) {
- codemirrorWidth = editor.settings.codemirror.width;
- }
-
- let codemirrorHeight = 550;
- if (editor.settings.codemirror.height) {
- codemirrorHeight = editor.settings.codemirror.height;
- }
-
- const buttonsConfig = [
- {
- type: 'custom',
- text: 'Ok',
- name: 'codemirrorOk',
- primary: true
- },
- {
- type: 'cancel',
- text: 'Cancel',
- name: 'codemirrorCancel'
- }
- ]
-
- const config = {
- title: 'Source code',
- url: url + '/source.html',
- width: codemirrorWidth,
- height: codemirrorHeight,
- resizable: true,
- maximizable: true,
- fullScreen: editor.settings.codemirror.fullscreen,
- saveCursorPosition: false,
- buttons: buttonsConfig
- }
-
- config.onAction = function (dialogApi, actionData) {
- if (actionData.name === 'codemirrorOk') {
- const doc = document.querySelectorAll('.tox-dialog__body-iframe iframe')[0];
- doc.contentWindow.tinymceHighlighterSubmit();
- editor.undoManager.add();
- win.close();
- }
- }
-
- const win = editor.windowManager.openUrl(config);
-
- if (editor.settings.codemirror.fullscreen) {
- win.fullscreen(true);
- }
- }
-
- editor.ui.registry.addButton('code', {
- icon: 'sourcecode',
- title: 'Source code+',
- tooltip: 'Source code+',
- onAction: showSourceEditor
- });
-
- editor.ui.registry.addMenuItem('code', {
- icon: 'sourcecode',
- text: 'Source code+',
- onAction: showSourceEditor,
- context: 'tools'
- });
- });
diff --git a/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es6.js b/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es6.js
new file mode 100644
index 0000000000000..8287139cb2a58
--- /dev/null
+++ b/build/media_source/plg_editors_tinymce/js/plugins/highlighter/plugin.es6.js
@@ -0,0 +1,85 @@
+/**
+ * plugin.js
+ *
+ * Original code by Arjan Haverkamp
+ * Copyright 2013-2015 Arjan Haverkamp (arjan@webgear.nl)
+ */
+window.tinymce.PluginManager.add('highlightPlus', (editor, url) => {
+ const showSourceEditor = () => {
+ editor.focus();
+ editor.selection.collapse(true);
+
+ if (!editor.settings.codemirror) editor.settings.codemirror = {};
+
+ // Insert caret marker
+ if (editor.settings.codemirror && editor.settings.codemirror.saveCursorPosition) {
+ editor.selection.setContent('');
+ }
+
+ let codemirrorWidth = 800;
+ if (editor.settings.codemirror.width) {
+ codemirrorWidth = editor.settings.codemirror.width;
+ }
+
+ let codemirrorHeight = 550;
+ if (editor.settings.codemirror.height) {
+ codemirrorHeight = editor.settings.codemirror.height;
+ }
+
+ const buttonsConfig = [
+ {
+ type: 'custom',
+ text: 'Ok',
+ name: 'codemirrorOk',
+ primary: true,
+ },
+ {
+ type: 'cancel',
+ text: 'Cancel',
+ name: 'codemirrorCancel',
+ },
+ ];
+
+ const config = {
+ title: 'Source code',
+ url: `${url}/source.html`,
+ width: codemirrorWidth,
+ height: codemirrorHeight,
+ resizable: true,
+ maximizable: true,
+ fullScreen: editor.settings.codemirror.fullscreen,
+ saveCursorPosition: false,
+ buttons: buttonsConfig,
+ };
+
+ config.onAction = (dialogApi, actionData) => {
+ if (actionData.name === 'codemirrorOk') {
+ const doc = document.querySelectorAll('.tox-dialog__body-iframe iframe')[0];
+ doc.contentWindow.tinymceHighlighterSubmit();
+ editor.undoManager.add();
+ // eslint-disable-next-line no-use-before-define
+ win.close();
+ }
+ };
+
+ const win = editor.windowManager.openUrl(config);
+
+ if (editor.settings.codemirror.fullscreen) {
+ win.fullscreen(true);
+ }
+ };
+
+ editor.ui.registry.addButton('code', {
+ icon: 'sourcecode',
+ title: 'Source code+',
+ tooltip: 'Source code+',
+ onAction: showSourceEditor,
+ });
+
+ editor.ui.registry.addMenuItem('code', {
+ icon: 'sourcecode',
+ text: 'Source code+',
+ onAction: showSourceEditor,
+ context: 'tools',
+ });
+});
diff --git a/build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es5.js b/build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es6.js
similarity index 54%
rename from build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es5.js
rename to build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es6.js
index 0f72ffd2b605d..eb8b89046165b 100644
--- a/build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es5.js
+++ b/build/media_source/plg_editors_tinymce/js/plugins/highlighter/source.es6.js
@@ -3,13 +3,17 @@
*
* Original code by Arjan Haverkamp
* Copyright 2013-2015 Arjan Haverkamp (arjan@webgear.nl)
- *
- * Adapted for use in Joomla by Dimitrios Grammatikogiannis
*/
+if (!window.parent.Joomla || typeof window.parent.Joomla.getOptions !== 'function') {
+ throw new Error('Joomla API not found');
+}
+
+// Get the base path for CodeMirror
+const rootPath = window.parent.Joomla.getOptions('system.paths').rootFull;
+const cmPath = `${rootPath}/media/vendor/codemirror`;
// CodeMirror settings
-const CMsettings = {
- path: '../../../../vendor/codemirror',
+let CMsettings = {
indentOnInit: true,
config: {
mode: 'htmlmixed',
@@ -23,54 +27,66 @@ const CMsettings = {
saveCursorPosition: true,
styleActiveLine: true,
},
- jsFiles: [// Default JS files
- 'lib/codemirror.min.js',
- 'addon/edit/matchbrackets.min.js',
- 'mode/xml/xml.min.js',
- 'mode/javascript/javascript.min.js',
- 'mode/css/css.min.js',
- 'mode/htmlmixed/htmlmixed.min.js',
- 'addon/dialog/dialog.min.js',
- 'addon/search/searchcursor.min.js',
- 'addon/search/search.min.js',
- 'addon/selection/active-line.min.js',
+ jsFiles: [
+ // Default JS files
+ `${cmPath}/lib/codemirror.min.js`,
+ `${cmPath}/addon/edit/matchbrackets.min.js`,
+ `${cmPath}/mode/xml/xml.min.js`,
+ `${cmPath}/mode/javascript/javascript.min.js`,
+ `${cmPath}/mode/css/css.min.js`,
+ `${cmPath}/mode/htmlmixed/htmlmixed.min.js`,
+ `${cmPath}/addon/dialog/dialog.min.js`,
+ `${cmPath}/addon/search/searchcursor.min.js`,
+ `${cmPath}/addon/search/search.min.js`,
+ `${cmPath}/addon/selection/active-line.min.js`,
],
- cssFiles: [// Default CSS files
- 'lib/codemirror.css',
- 'addon/dialog/dialog.css',
+ cssFiles: [
+ // Default CSS files
+ `${cmPath}/lib/codemirror.css`,
+ `${cmPath}/addon/dialog/dialog.css`,
],
};
-// Global vars:
-let tinymce; // Reference to TinyMCE
-let editor; // Reference to TinyMCE editor
-let codemirror; // CodeMirror instance
-let chr = 0; // Unused utf-8 character, placeholder for cursor
+// Declare some variables:
+let tinymce; // Reference to TinyMCE
+let editor; // Reference to TinyMCE editor
+let codemirror; // CodeMirror instance
+const chr = 0; // Unused utf-8 character, placeholder for cursor
const isMac = /macintosh|mac os/i.test(navigator.userAgent);
+// Utility function to load CodeMirror script files
+const loadScript = (url) => new Promise((resolve, reject) => {
+ const script = document.createElement('script');
+ script.src = url;
+ script.onload = () => resolve();
+ script.onerror = () => reject(new Error(`Failed to load the script ${url}`));
+ document.head.appendChild(script);
+});
+
/**
* Find the depth level
*/
const findDepth = (haystack, needle) => {
const idx = haystack.indexOf(needle);
let depth = 0;
- for (let x = idx -1; x >= 0; x--) {
- switch(haystack.charAt(x)) {
- case '<': depth--; break;
- case '>': depth++; break;
- case '&': depth++; break;
+ for (let x = idx - 1; x >= 0; x -= 1) {
+ switch (haystack.charAt(x)) {
+ case '<': depth -= 1; break;
+ case '>': depth += 1; break;
+ case '&': depth += 1; break;
+ default: break;
}
}
return depth;
-}
+};
/**
* This function is called by plugin.js, when user clicks 'Ok' button
*/
window.tinymceHighlighterSubmit = () => {
const cc = '';
- const isDirty = codemirror.isDirty;
- const doc = codemirror.doc;
+ const { isDirty } = codemirror;
+ const { doc } = codemirror;
if (doc.somethingSelected()) {
// Clear selection:
@@ -80,13 +96,13 @@ window.tinymceHighlighterSubmit = () => {
// Insert cursor placeholder ()
doc.replaceSelection(cc);
- var pos = codemirror.getCursor(),
- curLineHTML = doc.getLine(pos.line);
+ const pos = codemirror.getCursor();
+ let curLineHTML = doc.getLine(pos.line);
if (findDepth(curLineHTML, cc) !== 0) {
// Cursor is inside a , don't set cursor:
curLineHTML = curLineHTML.replace(cc, '');
- doc.replaceRange(curLineHTML, CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line));
+ doc.replaceRange(curLineHTML, window.CodeMirror.Pos(pos.line, 0), window.CodeMirror.Pos(pos.line));
}
// Submit HTML to TinyMCE:
@@ -95,17 +111,17 @@ window.tinymceHighlighterSubmit = () => {
const code = codemirror.getValue();
/* Regex to check if inside script or style tags */
- const ccScript = new RegExp("`, 'ms');
+ const ccStyle = new RegExp(``, 'ms');
/* Regex to check if in beginning or end or if between < & > */
- const ccLocationCheck = new RegExp("<[^>]*(" + cc + ").*>|^(" + cc + ")|(" + cc + ")$");
+ const ccLocationCheck = new RegExp(`<[^>]*(${cc}).*>|^(${cc})|(${cc})$`);
if (
- code.search(ccScript) !== -1 ||
- code.search(ccStyle) !== -1 ||
- code.search(ccLocationCheck) !== -1
- ){
+ code.search(ccScript) !== -1
+ || code.search(ccStyle) !== -1
+ || code.search(ccLocationCheck) !== -1
+ ) {
editor.setContent(code.replace(cc, ''));
} else {
editor.setContent(code.replace(cc, ''));
@@ -117,26 +133,40 @@ window.tinymceHighlighterSubmit = () => {
}
// Set cursor:
- var el = editor.dom.select('span#CmCaReT')[0];
+ const el = editor.dom.select('span#CmCaReT')[0];
if (el) {
editor.selection.scrollIntoView(el);
- editor.selection.setCursorLocation(el,0);
+ editor.selection.setCursorLocation(el, 0);
editor.dom.remove(el);
}
-}
+};
+
+/**
+ * Listen for the escape key and close the modal
+ *
+ * @param {Event} evt
+ */
+document.addEventListener('keydown', (evt) => {
+ const event = evt || window.event;
+ let isEscape = false;
+ if ('key' in event) isEscape = (event.key === 'Escape' || event.key === 'Esc');
+ else isEscape = (event.keyCode === 27);
+
+ if (isEscape) tinymce.activeEditor.windowManager.close();
+});
/**
* Append some help text in the modal footer
*/
const start = () => {
// Initialise (on load)
- if (typeof(window.CodeMirror) !== 'function') {
+ if (typeof (window.CodeMirror) !== 'function') {
throw new Error(`CodeMirror not found in "${CMsettings.path}", aborting...`);
}
// Create legend for keyboard shortcuts for find & replace:
- const head = parent.document.querySelectorAll('.tox-dialog__footer')[0];
- const div = parent.document.createElement('div');
+ const head = window.parent.document.querySelectorAll('.tox-dialog__footer')[0];
+ const div = window.parent.document.createElement('div');
const td1 = '
';
const td2 = '
';
div.innerHTML = `
@@ -156,11 +186,12 @@ const start = () => {
`;
div.style.position = 'absolute';
- div.style.left = div.style.bottom = '5px';
+ div.style.left = '5px';
+ div.style.bottom = '5px';
head.appendChild(div);
// Set CodeMirror cursor and bookmark to same position as cursor was in TinyMCE:
- let html = editor.getContent({source_view: true});
+ let html = editor.getContent({ source_view: true });
// [FIX] #6 z-index issue with table panel and source code dialog
// editor.selection.getBookmark();
@@ -171,8 +202,7 @@ const start = () => {
// Hide TinyMCE toolbar panels, [FIX] #6 z-index issue with table panel and source code dialog
// https://github.com/christiaan/tinymce-codemirror/issues/6
tinymce.each(editor.contextToolbars, (toolbar) => { if (toolbar.panel) { toolbar.panel.hide(); } });
-
- CodeMirror.defineInitHook((inst) => {
+ window.CodeMirror.defineInitHook((inst) => {
// Move cursor to correct position:
inst.focus();
const cursor = inst.getSearchCursor(String.fromCharCode(chr), false);
@@ -184,7 +214,8 @@ const start = () => {
// Indent all code, if so requested:
if (editor.settings.codemirror.indentOnInit) {
const last = inst.lineCount();
- inst.operation(function() {
+ inst.operation(() => {
+ // eslint-disable-next-line no-plusplus
for (let i = 0; i < last; ++i) {
inst.indentLine(i);
}
@@ -195,85 +226,50 @@ const start = () => {
CMsettings.config.value = html;
// Instantiate CodeMirror:
- codemirror = CodeMirror(document.body, CMsettings.config);
+ codemirror = window.CodeMirror(document.body, CMsettings.config);
codemirror.isDirty = false;
codemirror.on('change', (inst) => {
inst.isDirty = true;
});
-}
-
-/**
- * Listen for the escape key and close the modal
- *
- * @param {Event} evt
- */
-document.addEventListener('keydown', (evt) => {
- evt = evt || window.event;
- let isEscape = false;
- if ("key" in evt)
- isEscape = (evt.key === "Escape" || evt.key === "Esc");
- else
- isEscape = (evt.keyCode === 27);
-
- if (isEscape)
- tinymce.activeEditor.windowManager.close();
-});
-
-(() => {
- // Initialise (before load)
- tinymce = parent.tinymce;
- if (!tinymce) {
- throw new Error('tinyMCE not found');
- }
-
- editor = tinymce.activeEditor;
- const userSettings = editor.settings.codemirror;
-
- if (userSettings.fullscreen) {
- CMsettings.jsFiles.push('addon/display/fullscreen.min.js');
- CMsettings.cssFiles.push('addon/display/fullscreen.css');
- }
-
- // Merge config
- for (const i in userSettings.config) {
- CMsettings.config[i] = userSettings.config[i];
- }
+ codemirror.setSize('100%', '100%');
+ codemirror.refresh();
+};
- // Merge jsFiles
- for (const i in userSettings.jsFiles) {
- if (!CMsettings.jsFiles.includes(userSettings.jsFiles[i])) {
- CMsettings.jsFiles.push(userSettings.jsFiles[i]);
- }
- }
+// Initialise
+tinymce = window.parent.tinymce;
+if (!tinymce) {
+ throw new Error('tinyMCE not found');
+}
- // Merge cssFiles
- for (const i in userSettings.cssFiles) {
- if (!CMsettings.cssFiles.includes(userSettings.cssFiles[i])) {
- CMsettings.cssFiles.push(userSettings.cssFiles[i]);
- }
- }
+editor = tinymce.activeEditor;
+const userSettings = editor.settings.codemirror;
- // Add trailing slash to path
- if (!/\/$/.test(CMsettings.path)) {
- CMsettings.path += '/';
- }
+if (userSettings.fullscreen) {
+ CMsettings.jsFiles.push(`${cmPath}/addon/display/fullscreen.min.js`);
+ CMsettings.cssFiles.push(`${cmPath}/addon/display/fullscreen.css`);
+}
- // Write stylesheets
- for (let i = 0; i < CMsettings.cssFiles.length; i++) {
- document.write('');
- }
+// Merge config
+CMsettings = { ...CMsettings, ...userSettings };
- // Write JS source files. Needs to be synchronous to ensure the correct order.
- for (let i = 0; i < CMsettings.jsFiles.length; i++) {
- document.write('');
- }
+// Append the stylesheets
+CMsettings.cssFiles.forEach((css) => {
+ const link = document.createElement('link');
+ link.rel = 'stylesheet';
+ link.href = css;
+ document.head.appendChild(link);
+});
+/**
+ * Append javascript files ensuring the order of execution.
+ * Then execute the start function.
+ */
+CMsettings.jsFiles.reduce((p, item) => p.then(() => loadScript(item)), Promise.resolve(true)).then(() => {
// Borrowed from codemirror.js themeChanged function. Sets the theme's class names to the html element.
// Without this, the background color outside of the codemirror wrapper element remains white.
// [TMP] commented temporary, cause JS error: Uncaught TypeError: Cannot read property 'replace' of undefined
if (CMsettings.config.theme) {
document.documentElement.className += CMsettings.config.theme.replace(/(^|\s)\s*/g, ' cm-s-');
}
-
- window.onload = start;
-})();
+ start();
+});
diff --git a/build/media_source/plg_editors_tinymce/js/tinymce.es6.js b/build/media_source/plg_editors_tinymce/js/tinymce.es6.js
index 795dc92d7f13b..aad5d4592ef9b 100644
--- a/build/media_source/plg_editors_tinymce/js/tinymce.es6.js
+++ b/build/media_source/plg_editors_tinymce/js/tinymce.es6.js
@@ -33,12 +33,14 @@
toggleButton.removeAttribute('disabled');
toggleButton.addEventListener('click', () => {
if (Joomla.editors.instances[currentEditor.id].instance.isHidden()) {
- toggleIcon.setAttribute('class', 'icon-eye');
Joomla.editors.instances[currentEditor.id].instance.show();
} else {
- toggleIcon.setAttribute('class', 'icon-eye-slash');
Joomla.editors.instances[currentEditor.id].instance.hide();
}
+
+ if (toggleIcon) {
+ toggleIcon.setAttribute('class', Joomla.editors.instances[currentEditor.id].instance.isHidden() ? 'icon-eye' : 'icon-eye-slash');
+ }
});
}
});
diff --git a/build/media_source/plg_system_stats/js/stats-message.es6.js b/build/media_source/plg_system_stats/js/stats-message.es6.js
index 8fc75fa01aede..31a9e4c3e4852 100644
--- a/build/media_source/plg_system_stats/js/stats-message.es6.js
+++ b/build/media_source/plg_system_stats/js/stats-message.es6.js
@@ -47,18 +47,6 @@ Joomla = window.Joomla || {};
}
});
- // Allow once
- document.addEventListener('click', (event) => {
- if (event.target.classList.contains('js-pstats-btn-allow-once')) {
- event.preventDefault();
-
- // Remove message
- joomlaAlert.close();
-
- callback({ plugin: 'sendOnce' });
- }
- });
-
// Never allow
document.addEventListener('click', (event) => {
if (event.target.classList.contains('js-pstats-btn-allow-never')) {
diff --git a/build/media_source/system/js/showon.es6.js b/build/media_source/system/js/showon.es6.js
index 8d3ba4da4d161..d675c60e6ac9f 100644
--- a/build/media_source/system/js/showon.es6.js
+++ b/build/media_source/system/js/showon.es6.js
@@ -209,7 +209,7 @@ class Showon {
}));
}
} else {
- // TODO: If chosen or choices.js is active we should update them
+ // @todo: If chosen or choices.js is active we should update them
field.disabled = !showfield;
}
});
diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_icons.scss b/build/media_source/templates/administrator/atum/scss/blocks/_icons.scss
index 671ac513c78b5..5528b46ec864a 100644
--- a/build/media_source/templates/administrator/atum/scss/blocks/_icons.scss
+++ b/build/media_source/templates/administrator/atum/scss/blocks/_icons.scss
@@ -38,7 +38,6 @@
border-color: $warning;
}
- .#{$jicon-css-prefix}-archive,
.#{$jicon-css-prefix}-folder,
.#{$fa-css-prefix}-folder {
color: var(--template-text-dark);
diff --git a/build/media_source/templates/administrator/atum/scss/blocks/_login.scss b/build/media_source/templates/administrator/atum/scss/blocks/_login.scss
index 08a068b30771f..dd28e05015eb1 100644
--- a/build/media_source/templates/administrator/atum/scss/blocks/_login.scss
+++ b/build/media_source/templates/administrator/atum/scss/blocks/_login.scss
@@ -84,30 +84,18 @@
.form-control-feedback {
position: absolute;
- right: 0;
+ inset-inline-end: 0;
bottom: -1.5rem;
font-size: ($font-size-base * .75);
- text-align: right;
-
- [dir=rtl] & {
- right: auto;
- left: 0;
- text-align: left;
- }
+ text-align: end;
}
.form-control-hint {
position: absolute;
top: .1rem;
- right: 0;
+ inset-inline-end: 0;
font-size: ($font-size-base * .75);
- text-align: right;
-
- [dir=rtl] & {
- right: auto;
- left: 0;
- text-align: left;
- }
+ text-align: end;
}
}
diff --git a/build/stubGenerator.php b/build/stubGenerator.php
index d93b8d2f2d6de..f4b899cdece1a 100644
--- a/build/stubGenerator.php
+++ b/build/stubGenerator.php
@@ -61,6 +61,7 @@ class StubGenerator extends CliApplication
public function doExecute()
{
$this->createExtensionNamespaceMap();
+ $contentsByNamespace = [];
$file = "isInterface() && $reflection->isFinal()) ? 'final ' : '';
$modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? $modifier . 'abstract ' : $modifier;
+ $namespaceSegments = explode('\\', $oldName);
+ $className = array_pop($namespaceSegments);
+ $targetNamespace = ltrim(implode('\\', $namespaceSegments), '\\');
+
// If a deprecated version is available, write a stub class doc block with a deprecated tag
if ($deprecatedVersion !== false)
{
- $file .= << $contents)
+ {
+ $file .= "namespace $namespace {\n";
+ $file .= $contents;
+ $file .= "}\n\n";
}
// And save the file locally
diff --git a/components/com_config/src/View/Modules/HtmlView.php b/components/com_config/src/View/Modules/HtmlView.php
index 77eb3743b1aa0..e5e3f5be92925 100644
--- a/components/com_config/src/View/Modules/HtmlView.php
+++ b/components/com_config/src/View/Modules/HtmlView.php
@@ -56,7 +56,7 @@ public function display($tpl = null)
$lang->load('', JPATH_ADMINISTRATOR, $lang->getTag());
$lang->load('com_modules', JPATH_ADMINISTRATOR, $lang->getTag());
- // TODO Move and clean up
+ // @todo Move and clean up
$module = (new \Joomla\Component\Modules\Administrator\Model\ModuleModel)->getItem(Factory::getApplication()->input->getInt('id'));
$moduleData = $module->getProperties();
diff --git a/components/com_contact/src/Model/CategoryModel.php b/components/com_contact/src/Model/CategoryModel.php
index 3c2cd902f5826..5726362dd1f6b 100644
--- a/components/com_contact/src/Model/CategoryModel.php
+++ b/components/com_contact/src/Model/CategoryModel.php
@@ -166,7 +166,7 @@ protected function getListQuery()
->select($this->getSlugColumn($query, 'a.id', 'a.alias') . ' AS slug')
->select($this->getSlugColumn($query, 'c.id', 'c.alias') . ' AS catslug')
/**
- * TODO: we actually should be doing it but it's wrong this way
+ * @todo: we actually should be doing it but it's wrong this way
* . ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug, '
* . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END AS catslug ');
*/
diff --git a/components/com_contact/src/Model/ContactModel.php b/components/com_contact/src/Model/ContactModel.php
index 9fd7ba55de057..94795dc4bbddf 100644
--- a/components/com_contact/src/Model/ContactModel.php
+++ b/components/com_contact/src/Model/ContactModel.php
@@ -72,7 +72,7 @@ protected function populateState()
if (Factory::getApplication()->isClient('api'))
{
- // TODO: remove this
+ // @todo: remove this
$app->loadLanguage();
$this->setState('contact.id', Factory::getApplication()->input->post->getInt('id'));
}
diff --git a/components/com_contact/tmpl/category/default_items.php b/components/com_contact/tmpl/category/default_items.php
index 02bbbd0d48aa8..b8936a325f095 100644
--- a/components/com_contact/tmpl/category/default_items.php
+++ b/components/com_contact/tmpl/category/default_items.php
@@ -12,6 +12,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Contact\Administrator\Helper\ContactHelper;
@@ -99,7 +100,14 @@ class="inputbox" onchange="document.adminForm.submit();"
params->get('show_image_heading')) : ?>
image) : ?>
- image, '', array('class' => 'contact-thumbnail img-thumbnail')); ?>
+ $item->image,
+ 'alt' => '',
+ 'class' => 'contact-thumbnail img-thumbnail',
+ ]
+ ); ?>
escape($item->name); ?>
diff --git a/components/com_contact/tmpl/contact/default.php b/components/com_contact/tmpl/contact/default.php
index 0299548b3421e..24d326583bdbe 100644
--- a/components/com_contact/tmpl/contact/default.php
+++ b/components/com_contact/tmpl/contact/default.php
@@ -14,6 +14,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Contact\Site\Helper\RouteHelper;
@@ -97,11 +98,13 @@
item->image && $tparams->get('show_image')) : ?>
diff --git a/plugins/system/stats/stats.php b/plugins/system/stats/stats.php
index 8da88f512dc3a..93ab0b854a089 100644
--- a/plugins/system/stats/stats.php
+++ b/plugins/system/stats/stats.php
@@ -39,15 +39,6 @@ class PlgSystemStats extends CMSPlugin
*/
const MODE_ALLOW_ALWAYS = 1;
- /**
- * Indicates sending statistics is only allowed one time.
- *
- * @var integer
- *
- * @since 3.5
- */
- const MODE_ALLOW_ONCE = 2;
-
/**
* Indicates sending statistics is never allowed.
*
@@ -209,40 +200,6 @@ public function onAjaxSendNever()
echo json_encode(['sent' => 0]);
}
- /**
- * User selected to send data once.
- *
- * @return void
- *
- * @since 3.5
- *
- * @throws Exception If user is not allowed.
- * @throws RuntimeException If there is an error saving the params, disabling the plugin or sending the data.
- */
- public function onAjaxSendOnce()
- {
- if (!$this->isAllowedUser() || !$this->isAjaxRequest())
- {
- throw new Exception(Text::_('JGLOBAL_AUTH_ACCESS_DENIED'), 403);
- }
-
- $this->params->set('mode', static::MODE_ALLOW_ONCE);
-
- if (!$this->saveParams())
- {
- throw new RuntimeException('Unable to save plugin settings', 500);
- }
-
- $this->sendStats();
-
- if (!$this->disablePlugin())
- {
- throw new RuntimeException('Unable to disable the statistics plugin', 500);
- }
-
- echo json_encode(['sent' => 1]);
- }
-
/**
* Send the stats to the server.
* On first load | on demand mode it will show a message asking users to select mode.
diff --git a/plugins/system/stats/stats.xml b/plugins/system/stats/stats.xml
index 2c096e69d617f..84424110af3a7 100644
--- a/plugins/system/stats/stats.xml
+++ b/plugins/system/stats/stats.xml
@@ -50,8 +50,8 @@
default="1"
validate="options"
>
-
+
diff --git a/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php b/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
index db6f5870adf96..5b81697b24aee 100644
--- a/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
+++ b/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
@@ -130,7 +130,7 @@ public function onAjaxWebauthn(): void
if (isset($result['message']))
{
- $type = isset($result['type']) ? $result['type'] : 'info';
+ $type = $result['type'] ?? 'info';
$app->enqueueMessage($result['message'], $type);
$modifiers = " and setting a system message of type $type";
diff --git a/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php b/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
index 259127393b51a..3b7d192751db3 100644
--- a/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
+++ b/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
@@ -153,7 +153,7 @@ private function getUserFromData($data): ?User
if (\is_array($data))
{
- $id = isset($data['id']) ? $data['id'] : null;
+ $id = $data['id'] ?? null;
}
elseif (\is_object($data) && ($data instanceof Registry))
{
@@ -161,7 +161,7 @@ private function getUserFromData($data): ?User
}
elseif (\is_object($data))
{
- $id = isset($data->id) ? $data->id : null;
+ $id = $data->id ?? null;
}
$user = empty($id) ? Factory::getApplication()->getIdentity() : Factory::getContainer()
diff --git a/plugins/task/checkfiles/checkfiles.php b/plugins/task/checkfiles/checkfiles.php
index 44a77c1357ec5..aab4d248b5acc 100644
--- a/plugins/task/checkfiles/checkfiles.php
+++ b/plugins/task/checkfiles/checkfiles.php
@@ -18,6 +18,7 @@
use Joomla\Component\Scheduler\Administrator\Task\Status as TaskStatus;
use Joomla\Component\Scheduler\Administrator\Traits\TaskPluginTrait;
use Joomla\Event\SubscriberInterface;
+use Joomla\Filesystem\Path;
/**
* Task plugin with routines that offer checks on files.
@@ -77,9 +78,10 @@ protected function checkImages(ExecuteTaskEvent $event): int
{
$params = $event->getArgument('params');
- $path = JPATH_ROOT . '/images/' . $params->path;
+ $path = Path::check(JPATH_ROOT . '/images/' . $params->path);
$dimension = $params->dimension;
$limit = $params->limit;
+ $numImages = max(1, (int) $params->numImages ?? 1);
if (!Folder::exists($path))
{
@@ -112,7 +114,7 @@ protected function checkImages(ExecuteTaskEvent $event): int
try
{
- $image->resize($newWidth, $newHeight);
+ $image->resize($newWidth, $newHeight, false);
}
catch (LogicException $e)
{
@@ -130,8 +132,13 @@ protected function checkImages(ExecuteTaskEvent $event): int
$this->logTask('PLG_TASK_CHECK_FILES_LOG_IMAGE_SAVE_FAIL', 'error');
}
- // We do at most a single resize per execution
- break;
+ --$numImages;
+
+ // We do a limited number of resize per execution
+ if ($numImages == 0)
+ {
+ break;
+ }
}
return TaskStatus::OK;
diff --git a/plugins/task/checkfiles/forms/image_size.xml b/plugins/task/checkfiles/forms/image_size.xml
index d4cd866bdc1e1..4535ea69aebb7 100644
--- a/plugins/task/checkfiles/forms/image_size.xml
+++ b/plugins/task/checkfiles/forms/image_size.xml
@@ -19,6 +19,7 @@
type="list"
label="PLG_TASK_CHECK_FILES_LABEL_IMAGE_DIMENSION"
required="true"
+ default="width"
>
@@ -29,10 +30,21 @@
label="PLG_TASK_CHECK_FILES_LABEL_DIMENSION_LIMIT"
required="true"
default="1080"
- min="100"
+ min="1"
step="1"
filter="int"
/>
+
diff --git a/plugins/task/demotasks/forms/testTaskForm.xml b/plugins/task/demotasks/forms/testTaskForm.xml
index bba438e7c690e..14f17f2de893a 100644
--- a/plugins/task/demotasks/forms/testTaskForm.xml
+++ b/plugins/task/demotasks/forms/testTaskForm.xml
@@ -1,7 +1,7 @@
-
+
-
+
app, 'isClient') && !$this->app->isClient('administrator'))
{
@@ -412,7 +412,7 @@ protected function _getUser($user, $options = [])
return $instance;
}
- // TODO : move this out of the plugin
+ // @todo : move this out of the plugin
$params = ComponentHelper::getParams('com_users');
// Read the default user group option from com_users
diff --git a/plugins/workflow/featuring/featuring.php b/plugins/workflow/featuring/featuring.php
index 4fd80adf64995..8d7dcf7cb916c 100644
--- a/plugins/workflow/featuring/featuring.php
+++ b/plugins/workflow/featuring/featuring.php
@@ -143,7 +143,7 @@ protected function enhanceItemForm(Form $form, $data)
$options = $form->getField($fieldname)->options;
- $value = isset($data->$fieldname) ? $data->$fieldname : $form->getValue($fieldname, null, 0);
+ $value = $data->$fieldname ?? $form->getValue($fieldname, null, 0);
$text = '-';
diff --git a/plugins/workflow/publishing/publishing.php b/plugins/workflow/publishing/publishing.php
index 380eeb3b52d8d..96d270e3d986d 100644
--- a/plugins/workflow/publishing/publishing.php
+++ b/plugins/workflow/publishing/publishing.php
@@ -165,7 +165,7 @@ protected function enhanceItemForm(Form $form, $data)
$options = $form->getField($fieldname)->options;
- $value = isset($data->$fieldname) ? $data->$fieldname : $form->getValue($fieldname, null, 0);
+ $value = $data->$fieldname ?? $form->getValue($fieldname, null, 0);
$text = '-';
diff --git a/templates/cassiopeia/component.php b/templates/cassiopeia/component.php
index 6f77bbdcba4f3..d9875a8b93604 100644
--- a/templates/cassiopeia/component.php
+++ b/templates/cassiopeia/component.php
@@ -30,10 +30,10 @@
{
if (stripos($paramsFontScheme, 'https://') === 0)
{
- $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', []);
- $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', []);
- $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style']);
- $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
+ $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
+ $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0)
{
diff --git a/templates/cassiopeia/error.php b/templates/cassiopeia/error.php
index e4512b06fb46a..6b055ac85dd55 100644
--- a/templates/cassiopeia/error.php
+++ b/templates/cassiopeia/error.php
@@ -45,10 +45,10 @@
{
if (stripos($paramsFontScheme, 'https://') === 0)
{
- $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', []);
- $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', []);
- $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style']);
- $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
+ $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
+ $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0)
{
diff --git a/templates/cassiopeia/index.php b/templates/cassiopeia/index.php
index d3e5eb8a44ce9..06ba377bb1913 100644
--- a/templates/cassiopeia/index.php
+++ b/templates/cassiopeia/index.php
@@ -47,10 +47,10 @@
{
if (stripos($paramsFontScheme, 'https://') === 0)
{
- $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', []);
- $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', []);
- $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style']);
- $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
+ $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
+ $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0)
{
diff --git a/templates/cassiopeia/offline.php b/templates/cassiopeia/offline.php
index 2b5c8861e4d3e..41422a162768a 100644
--- a/templates/cassiopeia/offline.php
+++ b/templates/cassiopeia/offline.php
@@ -41,10 +41,10 @@
{
if (stripos($paramsFontScheme, 'https://') === 0)
{
- $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', []);
- $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', []);
- $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style']);
- $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']);
+ $this->getPreloadManager()->preconnect('https://fonts.googleapis.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preconnect('https://fonts.gstatic.com/', ['crossorigin' => 'anonymous']);
+ $this->getPreloadManager()->preload($paramsFontScheme, ['as' => 'style', 'crossorigin' => 'anonymous']);
+ $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, [], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'', 'crossorigin' => 'anonymous']);
if (preg_match_all('/family=([^?:]*):/i', $paramsFontScheme, $matches) > 0)
{
diff --git a/tests/Codeception/_support/Page/Acceptance/Administrator/AdminFormPage.php b/tests/Codeception/_support/Page/Acceptance/Administrator/AdminFormPage.php
index d153053a4a6ab..a4d6b7ab642e2 100644
--- a/tests/Codeception/_support/Page/Acceptance/Administrator/AdminFormPage.php
+++ b/tests/Codeception/_support/Page/Acceptance/Administrator/AdminFormPage.php
@@ -17,5 +17,5 @@
*/
class AdminFormPage extends AdminPage
{
- // Todo.
+ // @todo.
}
diff --git a/tests/Codeception/_support/Page/Acceptance/Administrator/AdminListPage.php b/tests/Codeception/_support/Page/Acceptance/Administrator/AdminListPage.php
index d97d96d575bf6..60cff02671dbd 100644
--- a/tests/Codeception/_support/Page/Acceptance/Administrator/AdminListPage.php
+++ b/tests/Codeception/_support/Page/Acceptance/Administrator/AdminListPage.php
@@ -17,5 +17,5 @@
*/
class AdminListPage extends AdminPage
{
- // Todo.
+ // @todo.
}
diff --git a/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php b/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php
index df99920b86216..051bb4a633e8c 100644
--- a/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php
+++ b/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php
@@ -268,7 +268,7 @@ public function navigateUsingBreadcrumb(Media $I)
*
* @throws Exception
*
- * @since __DEPLOY_VERSION__
+ * @since 4.0.6
*/
public function searchInFilesAndFolders(Media $I)
{
@@ -288,7 +288,7 @@ public function searchInFilesAndFolders(Media $I)
*
* @throws Exception
*
- * @since __DEPLOY_VERSION__
+ * @since 4.0.6
*/
public function searchIsClearedOnNavigate(Media $I)
{
diff --git a/tests/Codeception/api/com_banners/BannerCest.php b/tests/Codeception/api/com_banners/BannerCest.php
index 3eb10f39fb6e5..f6e9b1fccfa5d 100644
--- a/tests/Codeception/api/com_banners/BannerCest.php
+++ b/tests/Codeception/api/com_banners/BannerCest.php
@@ -78,7 +78,7 @@ public function testCrudOnBanner(ApiTester $I)
$I->haveHttpHeader('Content-Type', 'application/json');
$I->haveHttpHeader('Accept', 'application/vnd.api+json');
- // Category is a required field for this patch request for now TODO: Remove this dependency
+ // Category is a required field for this patch request for now @todo: Remove this dependency
$I->sendPATCH('/banners/' . $id, ['name' => 'Different Custom Advert', 'state' => -2, 'catid' => 3]);
$I->seeResponseCodeIs(HttpCode::OK);
@@ -124,7 +124,7 @@ public function testCrudOnCategory(ApiTester $I)
$I->haveHttpHeader('Content-Type', 'application/json');
$I->haveHttpHeader('Accept', 'application/vnd.api+json');
- // Unpublish in order to allow the delete in the next step
+ // Trash in order to allow the delete in the next step
$I->sendPATCH('/banners/categories/' . $categoryId, ['title' => 'Another Title', 'published' => -2]);
$I->seeResponseCodeIs(HttpCode::OK);
diff --git a/tests/Codeception/api/com_contact/ContactCest.php b/tests/Codeception/api/com_contact/ContactCest.php
index ce3f93e865d66..f29088bca9f17 100644
--- a/tests/Codeception/api/com_contact/ContactCest.php
+++ b/tests/Codeception/api/com_contact/ContactCest.php
@@ -71,7 +71,7 @@ public function testCrudOnContact(ApiTester $I)
$I->haveHttpHeader('Content-Type', 'application/json');
$I->haveHttpHeader('Accept', 'application/vnd.api+json');
- // Category is a required field for this patch request for now TODO: Remove this dependency
+ // Category is a required field for this patch request for now @todo: Remove this dependency
$I->sendPATCH('/contacts/' . $id, ['name' => 'Frankie Blogs', 'catid' => 4, 'published' => -2]);
$I->seeResponseCodeIs(HttpCode::OK);
diff --git a/tests/Codeception/api/com_media/MediaCest.php b/tests/Codeception/api/com_media/MediaCest.php
index e385fe7a7c5f9..8dc67f7c701aa 100644
--- a/tests/Codeception/api/com_media/MediaCest.php
+++ b/tests/Codeception/api/com_media/MediaCest.php
@@ -31,7 +31,7 @@ class MediaCest
/**
* Runs before every test.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @since 4.1.0
*
@@ -59,7 +59,7 @@ public function _before(ApiTester $I)
/**
* Runs after every test.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @since 4.1.0
*
@@ -74,7 +74,7 @@ public function _after(ApiTester $I)
/**
* Test the GET media adapter endpoint of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -93,7 +93,7 @@ public function testGetAdapters(ApiTester $I)
/**
* Test the GET media adapter endpoint for a single adapter of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -112,7 +112,7 @@ public function testGetAdapter(ApiTester $I)
/**
* Test the GET media files endpoint of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -132,7 +132,7 @@ public function testGetFiles(ApiTester $I)
/**
* Test the GET media files endpoint of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -151,7 +151,7 @@ public function testGetFilesInSubfolder(ApiTester $I)
/**
* Test the GET media files endpoint of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -170,7 +170,7 @@ public function testGetFilesWithAdapter(ApiTester $I)
/**
* Test the GET media files endpoint of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -191,7 +191,7 @@ public function testSearchFiles(ApiTester $I)
/**
* Test the GET media files endpoint for a single file of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -211,7 +211,7 @@ public function testGetFile(ApiTester $I)
/**
* Test the GET media files endpoint for a single file of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -230,7 +230,7 @@ public function testGetFileWithUrl(ApiTester $I)
/**
* Test the GET media files endpoint for a single file of com_media from the API.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
@@ -247,15 +247,15 @@ public function testGetFolder(ApiTester $I)
}
/**
- * Test the POST media files endpoint of com_media from the API.
+ * Test the POST media files endpoint of com_media from the API without adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testCreateFile(ApiTester $I)
+ public function testCreateFileWithoutAdapter(ApiTester $I)
{
$I->amBearerAuthenticated($I->getBearerToken());
$I->haveHttpHeader('Content-Type', 'application/json');
@@ -273,15 +273,15 @@ public function testCreateFile(ApiTester $I)
}
/**
- * Test the POST media files endpoint of com_media from the API.
+ * Test the POST media files endpoint of com_media from the API without adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testCreateFolder(ApiTester $I)
+ public function testCreateFolderWithoutAdapter(ApiTester $I)
{
$I->amBearerAuthenticated($I->getBearerToken());
$I->haveHttpHeader('Content-Type', 'application/json');
@@ -296,15 +296,64 @@ public function testCreateFolder(ApiTester $I)
}
/**
- * Test the PATCH media files endpoint of com_media from the API.
+ * Test the POST media files endpoint of com_media from the API with adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testUpdateFile(ApiTester $I)
+ public function testCreateFileWithAdapter(ApiTester $I)
+ {
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Content-Type', 'application/json');
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendPost(
+ '/media/files',
+ [
+ 'path' => 'local-images:/' . $this->testDirectory . '/test.jpg',
+ 'content' => base64_encode(file_get_contents(codecept_data_dir() . '/com_media/test-image-1.jpg'))
+ ]
+ );
+
+ $I->seeResponseCodeIs(HttpCode::OK);
+ $I->seeResponseContainsJson(['data' => ['attributes' => ['type' => 'file', 'name' => 'test.jpg']]]);
+ }
+
+ /**
+ * Test the POST media files endpoint of com_media from the API with adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testCreateFolderWithAdapter(ApiTester $I)
+ {
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Content-Type', 'application/json');
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendPost(
+ '/media/files',
+ ['path' => 'local-images:/' . $this->testDirectory . '/test-from-create']
+ );
+
+ $I->seeResponseCodeIs(HttpCode::OK);
+ $I->seeResponseContainsJson(['data' => ['attributes' => ['type' => 'dir', 'name' => 'test-from-create']]]);
+ }
+
+ /**
+ * Test the PATCH media files endpoint of com_media from the API without adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testUpdateFileWithoutAdapter(ApiTester $I)
{
file_put_contents($this->getImagesDirectory($I) . '/override.jpg', '1');
@@ -325,15 +374,15 @@ public function testUpdateFile(ApiTester $I)
}
/**
- * Test the PATCH media files endpoint of com_media from the API.
+ * Test the PATCH media files endpoint of com_media from the API without adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testUpdateFolder(ApiTester $I)
+ public function testUpdateFolderWithoutAdapter(ApiTester $I)
{
mkdir($this->getImagesDirectory($I) . '/override');
@@ -350,15 +399,69 @@ public function testUpdateFolder(ApiTester $I)
}
/**
- * Test the DELETE media files endpoint of com_media from the API.
+ * Test the PATCH media files endpoint of com_media from the API wit adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testDeleteFile(ApiTester $I)
+ public function testUpdateFileWithAdapter(ApiTester $I)
+ {
+ file_put_contents($this->getImagesDirectory($I) . '/override.jpg', '1');
+
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Content-Type', 'application/json');
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendPatch(
+ '/media/files/local-images:/' . $this->testDirectory . '/override.jpg',
+ [
+ 'path' => 'local-images:/' . $this->testDirectory . '/override.jpg',
+ 'content' => base64_encode(file_get_contents(codecept_data_dir() . '/com_media/test-image-1.jpg'))
+ ]
+ );
+
+ $I->seeResponseCodeIs(HttpCode::OK);
+ $I->seeResponseContainsJson(['data' => ['attributes' => ['type' => 'file', 'name' => 'override.jpg']]]);
+ $I->dontSeeResponseContainsJson(['data' => ['attributes' => ['content' => '1']]]);
+ }
+
+ /**
+ * Test the PATCH media files endpoint of com_media from the API with adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testUpdateFolderWithAdapter(ApiTester $I)
+ {
+ mkdir($this->getImagesDirectory($I) . '/override');
+
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Content-Type', 'application/json');
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendPatch(
+ '/media/files/local-images:/' . $this->testDirectory . '/override',
+ ['path' => 'local-images:/' . $this->testDirectory . '/override-new']
+ );
+
+ $I->seeResponseCodeIs(HttpCode::OK);
+ $I->seeResponseContainsJson(['data' => ['attributes' => ['type' => 'dir', 'name' => 'override-new']]]);
+ }
+
+ /**
+ * Test the DELETE media files endpoint of com_media from the API without adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testDeleteFileWithoutAdapter(ApiTester $I)
{
touch($this->getImagesDirectory($I) . '/todelete.jpg');
@@ -370,15 +473,15 @@ public function testDeleteFile(ApiTester $I)
}
/**
- * Test the DELETE media files endpoint of com_media from the API.
+ * Test the DELETE media files endpoint of com_media from the API without adapter information.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return void
*
* @since 4.1.0
*/
- public function testDeleteFolder(ApiTester $I)
+ public function testDeleteFolderWithoutAdapter(ApiTester $I)
{
mkdir($this->getImagesDirectory($I) . '/todelete');
@@ -389,10 +492,50 @@ public function testDeleteFolder(ApiTester $I)
$I->seeResponseCodeIs(HttpCode::NO_CONTENT);
}
+ /**
+ * Test the DELETE media files endpoint of com_media from the API with adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testDeleteFileWithAdapter(ApiTester $I)
+ {
+ touch($this->getImagesDirectory($I) . '/todelete.jpg');
+
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendDelete('/media/files/local-images:/' . $this->testDirectory . '/todelete.jpg');
+
+ $I->seeResponseCodeIs(HttpCode::NO_CONTENT);
+ }
+
+ /**
+ * Test the DELETE media files endpoint of com_media from the API with adapter information.
+ *
+ * @param ApiTester $I Api tester
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function testDeleteFolderWithAdapter(ApiTester $I)
+ {
+ mkdir($this->getImagesDirectory($I) . '/todelete');
+
+ $I->amBearerAuthenticated($I->getBearerToken());
+ $I->haveHttpHeader('Accept', 'application/vnd.api+json');
+ $I->sendDelete('/media/files/local-images:/' . $this->testDirectory . '/todelete');
+
+ $I->seeResponseCodeIs(HttpCode::NO_CONTENT);
+ }
+
/**
* Returns the absolute tmp image folder path to work on.
*
- * @param mixed ApiTester $I Api tester
+ * @param ApiTester $I Api tester
*
* @return string The absolute folder path
*
diff --git a/tests/Unit/Libraries/Cms/Html/JHtmlStringTest.php b/tests/Unit/Libraries/Cms/Html/JHtmlStringTest.php
index e9b984ca39472..b5c184662f921 100644
--- a/tests/Unit/Libraries/Cms/Html/JHtmlStringTest.php
+++ b/tests/Unit/Libraries/Cms/Html/JHtmlStringTest.php
@@ -141,7 +141,7 @@ public function getTestTruncateData(): array
'...',
],
/*
- * TODO: Check these tests: 'Plain html over the limit splitting first word'
+ * @todo: Check these tests: 'Plain html over the limit splitting first word'
(duplicate keys, only the last of the duplicates gets executed) Don't return invalid HTML
*/
'Plain html over the limit splitting first word' => [
@@ -152,7 +152,7 @@ public function getTestTruncateData(): array
'...',
],
/*
- * TODO: Check these tests: 'Plain html over the limit splitting first word'
+ * @todo: Check these tests: 'Plain html over the limit splitting first word'
(duplicate keys, only the last of the duplicates gets executed) Don't return invalid HTML
*/
'Plain html over the limit splitting first word' => [
@@ -183,7 +183,7 @@ public function getTestTruncateData(): array
false,
'Plain te...',
],
- // TODO: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
+ // @todo: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
'HTML not allowed, no split' => [
'
Plaintext foo
',
4,
@@ -198,7 +198,7 @@ public function getTestTruncateData(): array
false,
'...',
],
- // TODO: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
+ // @todo: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
'HTML not allowed, no split' => [
'
Plaintext foo
',
5,
@@ -213,7 +213,7 @@ public function getTestTruncateData(): array
true,
'...',
],
- // TODO: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
+ // @todo: Check these tests: 'HTML not allowed, no split' (duplicate keys, only the last of the duplicates gets executed)
'HTML not allowed, no split' => [
'
Plain
',
5,
@@ -329,7 +329,7 @@ public function getTestTruncateComplexData(): array
'Plain...'
],
/*
- * TODO: Check these tests: 'Plain html over the limit splitting first word'
+ * @todo: Check these tests: 'Plain html over the limit splitting first word'
(duplicate keys, only the last of the duplicates gets executed) Don't return invalid HTML
*/
'Plain html over the limit splitting first word' => [
@@ -339,7 +339,7 @@ public function getTestTruncateComplexData(): array
'P...'
],
/*
- * TODO: Check these tests: 'Plain html over the limit splitting first word'
+ * @todo: Check these tests: 'Plain html over the limit splitting first word'
(duplicate keys, only the last of the duplicates gets executed) Don't return invalid HTML
*/
'Plain html over the limit splitting first word' => [