diff --git a/administrator/components/com_actionlogs/controllers/actionlogs.php b/administrator/components/com_actionlogs/controllers/actionlogs.php index 1b02cd83db582..a2b6975efe591 100644 --- a/administrator/components/com_actionlogs/controllers/actionlogs.php +++ b/administrator/components/com_actionlogs/controllers/actionlogs.php @@ -12,7 +12,7 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\Utilities\ArrayHelper; -JLoader::register('ActionlogsHelper', JPATH_COMPONENT . '/helpers/actionlogs.php'); +JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php'); /** * Actionlogs list controller class. @@ -70,7 +70,7 @@ public function exportLogs() if ($task == 'exportSelectedLogs') { - // Get selected logs + // Get selected logs $pks = ArrayHelper::toInteger(explode(',', $this->input->post->getString('cids'))); } diff --git a/administrator/components/com_actionlogs/models/actionlogs.php b/administrator/components/com_actionlogs/models/actionlogs.php index 9d59e061b4e5c..bb56ec495620e 100644 --- a/administrator/components/com_actionlogs/models/actionlogs.php +++ b/administrator/components/com_actionlogs/models/actionlogs.php @@ -9,6 +9,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Component\ComponentHelper; use Joomla\Utilities\ArrayHelper; /** @@ -319,4 +320,32 @@ public function purge() return false; } } + + /** + * Get the filter form + * + * @param array $data data + * @param boolean $loadData load current data + * + * @return \JForm|boolean The \JForm object or false on error + * + * @since 3.9.0 + */ + public function getFilterForm($data = array(), $loadData = true) + { + $form = parent::getFilterForm($data, $loadData); + $params = ComponentHelper::getParams('com_actionlogs'); + $ipLogging = (bool) $params->get('ip_logging', 0); + + // Add ip sort options to sort dropdown + if ($form && $ipLogging) + { + /* @var JFormFieldList $field */ + $field = $form->getField('fullordering', 'list'); + $field->addOption(JText::_('COM_ACTIONLOGS_IP_ADDRESS_ASC'), array('value' => 'a.ip_address ASC')); + $field->addOption(JText::_('COM_ACTIONLOGS_IP_ADDRESS_DESC'), array('value' => 'a.ip_address DESC')); + } + + return $form; + } } diff --git a/administrator/components/com_actionlogs/models/fields/extension.php b/administrator/components/com_actionlogs/models/fields/extension.php index 6a03f34a28109..1bd5edbb4a7fe 100644 --- a/administrator/components/com_actionlogs/models/fields/extension.php +++ b/administrator/components/com_actionlogs/models/fields/extension.php @@ -10,7 +10,7 @@ defined('_JEXEC') or die; JFormHelper::loadFieldClass('list'); -JLoader::register('ActionlogsHelper', JPATH_COMPONENT . '/helpers/actionlogs.php'); +JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php'); /** * Field to load a list of all users that have logged actions diff --git a/administrator/components/com_actionlogs/models/forms/filter_actionlogs.xml b/administrator/components/com_actionlogs/models/forms/filter_actionlogs.xml index d7b009b38c930..bb41c4087922c 100644 --- a/administrator/components/com_actionlogs/models/forms/filter_actionlogs.xml +++ b/administrator/components/com_actionlogs/models/forms/filter_actionlogs.xml @@ -51,8 +51,6 @@ - - diff --git a/administrator/components/com_actionlogs/views/actionlogs/tmpl/default.php b/administrator/components/com_actionlogs/views/actionlogs/tmpl/default.php index 3861b31064043..74b9e0f8658da 100644 --- a/administrator/components/com_actionlogs/views/actionlogs/tmpl/default.php +++ b/administrator/components/com_actionlogs/views/actionlogs/tmpl/default.php @@ -11,7 +11,7 @@ /** @var ActionlogsViewActionlogs $this */ -JLoader::register('ActionlogsHelper', JPATH_COMPONENT . '/helpers/actionlogs.php'); +JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.multiselect'); diff --git a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql index 90d51c45192ba..250118c1f9375 100644 --- a/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql +++ b/administrator/components/com_admin/sql/updates/mysql/3.9.0-2018-08-12.sql @@ -1 +1 @@ -ALTER TABLE `#__privacy_consents` ADD COLUMN `state` INT(10) NOT NULL DEFAULT '1'; +ALTER TABLE `#__privacy_consents` ADD COLUMN `state` INT(10) NOT NULL DEFAULT '1' AFTER `user_id`; diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index ad30e8751425b..a9265ae622d63 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -327,6 +327,18 @@ + + + + + where('a.parent_id = ' . (int) $parentId); + $level = $this->getState('filter.level'); + + // Create a subquery for the sub-items list + $subQuery = $db->getQuery(true) + ->select('sub.id') + ->from('#__menu as sub') + ->join('INNER', '#__menu as this ON sub.lft > this.lft AND sub.rgt < this.rgt') + ->where('this.id = ' . (int) $parentId); + + if ($level) + { + $subQuery->where('sub.level <= this.level + ' . (int) ($level - 1)); + } + + // Add the subquery to the main query + $query->where('(a.parent_id = ' . (int) $parentId . ' OR a.parent_id IN (' . (string) $subQuery . '))'); + } + + // Filter on the level. + elseif ($level = $this->getState('filter.level')) + { + $query->where('a.level <= ' . (int) $level); } // Filter the items over the menu id if set. @@ -468,12 +489,6 @@ protected function getListQuery() } } - // Filter on the level. - if ($level = $this->getState('filter.level')) - { - $query->where('a.level <= ' . (int) $level); - } - // Filter on the language. if ($language = $this->getState('filter.language')) { diff --git a/administrator/components/com_privacy/helpers/privacy.php b/administrator/components/com_privacy/helpers/privacy.php index c3b5b92b1ef2f..806f9b4c318f3 100644 --- a/administrator/components/com_privacy/helpers/privacy.php +++ b/administrator/components/com_privacy/helpers/privacy.php @@ -63,7 +63,7 @@ public static function addSubmenu($vName) */ public static function renderDataAsXml(array $exportData) { - $export = new SimpleXMLElement(""); + $export = new SimpleXMLElement(''); foreach ($exportData as $domain) { diff --git a/administrator/components/com_privacy/models/dashboard.php b/administrator/components/com_privacy/models/dashboard.php index 0ea49f2317e72..3ae742f728e65 100644 --- a/administrator/components/com_privacy/models/dashboard.php +++ b/administrator/components/com_privacy/models/dashboard.php @@ -26,8 +26,9 @@ class PrivacyModelDashboard extends JModelLegacy public function getPrivacyPolicyInfo() { $policy = array( - 'published' => false, - 'editLink' => '', + 'published' => false, + 'articlePublished' => false, + 'editLink' => '', ); /* @@ -84,10 +85,25 @@ public function getRequestFormPublished() $item = $menu->getItems('link', 'index.php?option=com_privacy&view=request', true); $status = array( + 'exists' => false, 'published' => false, 'link' => '', ); + $db = $this->getDbo(); + $query = $db->getQuery(true) + ->select($db->quoteName('id')) + ->from($db->quoteName('#__menu')) + ->where($db->quoteName('client_id') . ' = 0') + ->where($db->quoteName('link') . ' = ' . $db->quote('index.php?option=com_privacy&view=request')); + $db->setQuery($query); + + // Check if the menu item exists in database + if ($db->loadResult()) + { + $status['exists'] = true; + } + $linkMode = $app->get('force_ssl', 0) == 2 ? 1 : -1; if (!($item instanceof JMenuItem)) diff --git a/administrator/components/com_privacy/views/dashboard/tmpl/default.php b/administrator/components/com_privacy/views/dashboard/tmpl/default.php index a0c282bf51d74..16c449c052866 100644 --- a/administrator/components/com_privacy/views/dashboard/tmpl/default.php +++ b/administrator/components/com_privacy/views/dashboard/tmpl/default.php @@ -55,8 +55,8 @@ count; ?>
-
-
+
+
@@ -78,16 +78,21 @@
- privacyPolicyInfo['published']) : ?> - - - - + privacyPolicyInfo['published'] && $this->privacyPolicyInfo['articlePublished']) : ?> + + + + + privacyPolicyInfo['published'] && !$this->privacyPolicyInfo['articlePublished']) : ?> + + + + - - - - + + + +
@@ -99,16 +104,21 @@
- requestFormPublished['published']) : ?> - - - - + requestFormPublished['published'] && $this->requestFormPublished['exists']) : ?> + + + + + requestFormPublished['published'] && $this->requestFormPublished['exists']) : ?> + + + + - - - - + + + +
@@ -121,15 +131,15 @@
numberOfUrgentRequests === 0) : ?> - - - - + + + + - - - - + + + +
@@ -143,15 +153,15 @@
sendMailEnabled) : ?> - - - - + + + + - - - - + + + +
diff --git a/administrator/components/com_templates/Model/TemplateModel.php b/administrator/components/com_templates/Model/TemplateModel.php index a9ee1ac63db17..e46b7fbdc476f 100644 --- a/administrator/components/com_templates/Model/TemplateModel.php +++ b/administrator/components/com_templates/Model/TemplateModel.php @@ -1021,6 +1021,7 @@ public function getOverridesList() $client = ApplicationHelper::getClientInfo($template->client_id); $componentPath = Path::clean($client->path . '/components/'); $modulePath = Path::clean($client->path . '/modules/'); + $pluginPath = Path::clean(JPATH_ROOT . '/plugins/'); $layoutPath = Path::clean(JPATH_ROOT . '/layouts/'); $components = Folder::folders($componentPath); @@ -1062,6 +1063,18 @@ public function getOverridesList() } } + foreach (Folder::folders($pluginPath) as $pluginGroup) + { + foreach (Folder::folders($pluginPath . '/' . $pluginGroup) as $plugin) + { + if (file_exists($pluginPath . '/' . $pluginGroup . '/' . $plugin . '/tmpl/')) + { + $pluginLayoutPath = Path::clean($pluginPath . '/' . $pluginGroup . '/'); + $result['plugins'][$pluginGroup][] = $this->getOverridesFolder($plugin, $pluginLayoutPath); + } + } + } + $modules = Folder::folders($modulePath); foreach ($modules as $module) @@ -1145,6 +1158,12 @@ public function createOverride($override) $htmlPath = Path::clean($client->path . '/templates/' . $template->element . '/html/' . $url); } } + elseif (stripos($override, Path::clean(JPATH_ROOT . '/plugins/')) === 0) + { + $size = count($explodeArray); + $layoutPath = Path::clean('plg_' . $explodeArray[$size - 2] . '_' . $explodeArray[$size - 1]); + $htmlPath = Path::clean($client->path . '/templates/' . $template->element . '/html/' . $layoutPath); + } else { $layoutPath = implode('/', array_slice($explodeArray, -2)); @@ -1178,6 +1197,10 @@ public function createOverride($override) $return = $this->createTemplateOverride(Path::clean($path), $htmlPath); } + elseif (stripos($override, Path::clean(JPATH_ROOT . '/plugins/')) === 0) + { + $return = $this->createTemplateOverride(Path::clean($override . '/tmpl'), $htmlPath); + } else { $return = $this->createTemplateOverride($override, $htmlPath); diff --git a/administrator/components/com_templates/tmpl/template/default.php b/administrator/components/com_templates/tmpl/template/default.php index d4bab3ff930d8..be459a7b0c6c7 100644 --- a/administrator/components/com_templates/tmpl/template/default.php +++ b/administrator/components/com_templates/tmpl/template/default.php @@ -235,7 +235,7 @@
-
+
    @@ -252,7 +252,7 @@
-
+
    @@ -278,7 +278,33 @@
-
+
+ + +
+
    diff --git a/administrator/components/com_users/forms/group.xml b/administrator/components/com_users/forms/group.xml index d9a2e04fdbf34..3a901a7069811 100644 --- a/administrator/components/com_users/forms/group.xml +++ b/administrator/components/com_users/forms/group.xml @@ -1,6 +1,6 @@
    -
    +
    -
    - -
    -
    - form->getLabel('title'); ?> -
    -
    - form->getInput('title'); ?> -
    -
    -
    - form->getField('parent_id'); ?> - hidden) : ?> -
    - label; ?> -
    - -
    - input; ?> -
    -
    -
    + 'details')); ?> + + form->renderField('title'); ?> + form->renderField('parent_id'); ?> + + ignore_fieldsets = array('group_details'); ?> + + + diff --git a/administrator/language/en-GB/en-GB.com_privacy.ini b/administrator/language/en-GB/en-GB.com_privacy.ini index 609aeb5c5a3a2..dc3f58e49a449 100644 --- a/administrator/language/en-GB/en-GB.com_privacy.ini +++ b/administrator/language/en-GB/en-GB.com_privacy.ini @@ -127,17 +127,16 @@ COM_PRIVACY_POSTINSTALL_TITLE="Increased Management Of Users Privacy" COM_PRIVACY_POSTINSTALL_BODY="

    With the introduction of GDPR for EU citizens and similar regulations elsewhere in the world it may be necessary for you to request consent before storing any Personal Information of a user.

    Joomla 3.9 introduces new capabilities to assist you in creating site privacy policies and collecting user consent. In addition a workflow is available to help you manage user information requests such as requests for removing their personal data from your site.

    For further information on this new feature read the Privacy documentation.

    " COM_PRIVACY_REQUEST_COMPLETED="The request has been completed." COM_PRIVACY_REQUEST_INVALIDATED="The request has been invalidated." -COM_PRIVACY_SHOW_URGENT_REQUESTS="Show Urgent Requests" COM_PRIVACY_SELECT_REQUEST_TYPE="- Select Request Type -" +COM_PRIVACY_SHOW_URGENT_REQUESTS="Show Urgent Requests" +COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE="Not Available" COM_PRIVACY_STATUS_CHECK_OUTSTANDING_URGENT_REQUESTS="Outstanding Urgent Requests" COM_PRIVACY_STATUS_CHECK_OUTSTANDING_URGENT_REQUESTS_DESCRIPTION="Requests which are older than %d days, as set in the component configuration." -COM_PRIVACY_STATUS_CHECK_REQUEST_FORM_MENU_ITEM_PUBLISHED="Request Form Menu Item Published" -COM_PRIVACY_STATUS_CHECK_PRIVACY_POLICY_PUBLISHED="Privacy Policy Published" +COM_PRIVACY_STATUS_CHECK_PRIVACY_POLICY_PUBLISHED="Published Privacy Policy" +COM_PRIVACY_STATUS_CHECK_REQUEST_FORM_MENU_ITEM_PUBLISHED="Published Request Form Menu Item" COM_PRIVACY_STATUS_CHECK_SENDMAIL_DISABLED="Mail Sending Disabled" COM_PRIVACY_STATUS_CHECK_SENDMAIL_DISABLED_DESCRIPTION="Mail Sending must be enabled, it is a requirement to use the request system" COM_PRIVACY_STATUS_CHECK_SENDMAIL_ENABLED="Mail Sending Enabled" -COM_PRIVACY_STATUS_CHECK_SUCCESSFUL="Check Successful" -COM_PRIVACY_STATUS_CHECK_UNSUCCESSFUL="Check Unsuccessful" COM_PRIVACY_STATUS_COMPLETED="Completed" COM_PRIVACY_STATUS_CONFIRMED="Confirmed" COM_PRIVACY_STATUS_INVALID="Invalid" diff --git a/administrator/language/en-GB/en-GB.com_templates.ini b/administrator/language/en-GB/en-GB.com_templates.ini index 4b964197d364c..2303c62a493a9 100644 --- a/administrator/language/en-GB/en-GB.com_templates.ini +++ b/administrator/language/en-GB/en-GB.com_templates.ini @@ -191,8 +191,9 @@ COM_TEMPLATES_OVERRIDE_TEMPLATE_FILE="Template File" COM_TEMPLATES_OVERRIDE_UPTODATE="Overridden files are up to date. Nothing has been changed in the last extension or Joomla update." COM_TEMPLATES_OVERRIDES="Override files" COM_TEMPLATES_OVERRIDES_COMPONENTS="Components" -COM_TEMPLATES_OVERRIDES_MODULES="Modules" COM_TEMPLATES_OVERRIDES_LAYOUTS="Layouts" +COM_TEMPLATES_OVERRIDES_MODULES="Modules" +COM_TEMPLATES_OVERRIDES_PLUGINS="Plugins" COM_TEMPLATES_PREVIEW="Preview" COM_TEMPLATES_RENAME_FILE="Rename file %s" COM_TEMPLATES_RESIZE_IMAGE="Resize Image" diff --git a/administrator/language/en-GB/en-GB.com_users.ini b/administrator/language/en-GB/en-GB.com_users.ini index f309fec6fda96..fe31645f99868 100644 --- a/administrator/language/en-GB/en-GB.com_users.ini +++ b/administrator/language/en-GB/en-GB.com_users.ini @@ -81,6 +81,7 @@ COM_USERS_FIELD_LOGIN_REDIRECT_CHOICE_LABEL="Choose Login Redirect Type" COM_USERS_FIELD_LOGIN_REDIRECT_ERROR="Only one of the login redirect fields should have a value." COM_USERS_FIELD_LOGIN_REDIRECTMENU_LABEL="Menu Item Login Redirect" COM_USERS_FIELD_LOGIN_URL="Internal URL" +COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_DESC="'Internal URL' lets you manually enter any internal URL in the Redirect field. 'Menu Item' lets you directly select an existing menu item.
    For a multilingual site, it is recommended to use 'Menu Item'." COM_USERS_FIELD_LOGOUT_REDIRECT_CHOICE_LABEL="Choose Logout Redirect Type" COM_USERS_FIELD_LOGOUT_REDIRECT_ERROR="Only one of the logout redirect fields should have a value." COM_USERS_FIELD_LOGOUT_REDIRECTMENU_LABEL="Menu Item Logout Redirect" diff --git a/administrator/language/en-GB/en-GB.ini b/administrator/language/en-GB/en-GB.ini index 6b3135b3c4da5..dcfdad334a0dd 100644 --- a/administrator/language/en-GB/en-GB.ini +++ b/administrator/language/en-GB/en-GB.ini @@ -510,6 +510,8 @@ JGLOBAL_RANDOM_ORDER="Random Order" JGLOBAL_RATINGS="Ratings" JGLOBAL_RATINGS_ASC="Ratings ascending" JGLOBAL_RATINGS_DESC="Ratings descending" +JGLOBAL_RECORD_HITS_DESC="Record the number of hits." +JGLOBAL_RECORD_HITS_LABEL="Record Hits" JGLOBAL_RECORD_NUMBER="Record ID: %d" JGLOBAL_REMEMBER_ME="Remember Me" JGLOBAL_REVERSE_ORDERING="Article Reverse Order" diff --git a/administrator/language/en-GB/en-GB.plg_actionlog_joomla.ini b/administrator/language/en-GB/en-GB.plg_actionlog_joomla.ini index cc1943480ab09..6a128cc084d3a 100644 --- a/administrator/language/en-GB/en-GB.plg_actionlog_joomla.ini +++ b/administrator/language/en-GB/en-GB.plg_actionlog_joomla.ini @@ -4,9 +4,9 @@ ; Note : All ini files need to be saved as UTF-8 PLG_ACTIONLOG_JOOMLA="Action Log - Joomla" -PLG_ACTIONLOG_JOOMLA_XML_DESCRIPTION="Record the actions of users on the site for Joomla core extensions so they can be reviewed if required." -PLG_ACTIONLOG_JOOMLA_APPLICATION_SITE="site" PLG_ACTIONLOG_JOOMLA_APPLICATION_ADMINISTRATOR="admin" +PLG_ACTIONLOG_JOOMLA_APPLICATION_SITE="site" +PLG_ACTIONLOG_JOOMLA_XML_DESCRIPTION="Record the actions of users on the site for Joomla core extensions so they can be reviewed if required." ; Content types title PLG_ACTIONLOG_JOOMLA_TYPE_ACCESS_LEVEL="access level" PLG_ACTIONLOG_JOOMLA_TYPE_APPLICATION_CONFIG="Global Configuration" @@ -33,12 +33,15 @@ PLG_ACTIONLOG_JOOMLA_TYPE_STYLE="template style" PLG_ACTIONLOG_JOOMLA_TYPE_TAG="tag" PLG_ACTIONLOG_JOOMLA_TYPE_TEMPLATE="template" PLG_ACTIONLOG_JOOMLA_TYPE_USER="user" -PLG_ACTIONLOG_JOOMLA_USER_LOGIN_FAILED="User {username} tried to login to {app}" +PLG_ACTIONLOG_JOOMLA_TYPE_USER_GROUP="user group" +PLG_ACTIONLOG_JOOMLA_TYPE_USER_NOTE="user note" PLG_ACTIONLOG_JOOMLA_USER_LOGGED_IN="User {username} logged in to {app}" PLG_ACTIONLOG_JOOMLA_USER_LOGGED_OUT="User {username} logged out from {app}" +PLG_ACTIONLOG_JOOMLA_USER_LOGIN_FAILED="User {username} tried to login to {app}" PLG_ACTIONLOG_JOOMLA_USER_REGISTERED="User {username} registered for an account" -PLG_ACTIONLOG_JOOMLA_TYPE_USER_GROUP="user group" -PLG_ACTIONLOG_JOOMLA_TYPE_USER_NOTE="user note" +PLG_ACTIONLOG_JOOMLA_USER_REMIND="User {username} requested a username reminder for their account" +PLG_ACTIONLOG_JOOMLA_USER_RESET_COMPLETE="User {username} completed the password reset for their account" +PLG_ACTIONLOG_JOOMLA_USER_RESET_REQUEST="User {username} requested a password reset for their account" ; Component PLG_ACTIONLOG_JOOMLA_APPLICATION_CONFIG_UPDATED="User {username} changed settings of the application configuration" PLG_ACTIONLOG_JOOMLA_COMPONENT_CONFIG_UPDATED="User {username} changed settings of the component {extension_name}" diff --git a/administrator/manifests/packages/pkg_en-GB.xml b/administrator/manifests/packages/pkg_en-GB.xml index b7a385af31c17..eff82aa029378 100644 --- a/administrator/manifests/packages/pkg_en-GB.xml +++ b/administrator/manifests/packages/pkg_en-GB.xml @@ -15,8 +15,8 @@ true - site_en-GB - admin_en-GB + language/en-GB + administrator/language/en-GB diff --git a/administrator/modules/mod_latestactions/mod_latestactions.php b/administrator/modules/mod_latestactions/mod_latestactions.php index b198b637e7820..4a125d42cd665 100644 --- a/administrator/modules/mod_latestactions/mod_latestactions.php +++ b/administrator/modules/mod_latestactions/mod_latestactions.php @@ -9,6 +9,12 @@ defined('_JEXEC') or die; +// Only super user can view this data +if (!JFactory::getUser()->authorise('core.admin')) +{ + return; +} + // Include dependencies. JLoader::register('ModLatestActionsHelper', __DIR__ . '/helper.php'); diff --git a/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php b/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php index 58b1d8f1057dd..4160610365679 100644 --- a/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php +++ b/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php @@ -9,6 +9,12 @@ defined('_JEXEC') or die; +// Only super user can view this data +if (!JFactory::getUser()->authorise('core.admin')) +{ + return; +} + // Load the privacy component language file. $lang = JFactory::getLanguage(); $lang->load('com_privacy', JPATH_ADMINISTRATOR, null, false, true) diff --git a/administrator/modules/mod_privacy_dashboard/tmpl/default.php b/administrator/modules/mod_privacy_dashboard/tmpl/default.php index b1258b7cb016a..6a18baa7c66fa 100644 --- a/administrator/modules/mod_privacy_dashboard/tmpl/default.php +++ b/administrator/modules/mod_privacy_dashboard/tmpl/default.php @@ -38,8 +38,8 @@ count; ?>
    -
    -
    +
    +
    diff --git a/administrator/modules/mod_stats_admin/tmpl/default.php b/administrator/modules/mod_stats_admin/tmpl/default.php index 4b0fe34cd531c..3787f5b829289 100644 --- a/administrator/modules/mod_stats_admin/tmpl/default.php +++ b/administrator/modules/mod_stats_admin/tmpl/default.php @@ -32,7 +32,7 @@ title; ?> link)) : ?> - data; ?> + data; ?> data; ?> diff --git a/administrator/templates/atum/scss/pages/_com_templates.scss b/administrator/templates/atum/scss/pages/_com_templates.scss index 68d4d4bb06469..47027dc465306 100644 --- a/administrator/templates/atum/scss/pages/_com_templates.scss +++ b/administrator/templates/atum/scss/pages/_com_templates.scss @@ -11,13 +11,13 @@ column-gap: 15px; > li { - display: inline-block; width: 100%; margin-bottom: 15px; vertical-align: top; list-style: none; backface-visibility: hidden; column-break-inside: avoid; + page-break-inside: avoid; } } diff --git a/build/media_source/com_templates/js/admin-templates-default.es6.js b/build/media_source/com_templates/js/admin-templates-default.es6.js index 69e4ff92a9619..66efff3d21091 100644 --- a/build/media_source/com_templates/js/admin-templates-default.es6.js +++ b/build/media_source/com_templates/js/admin-templates-default.es6.js @@ -6,8 +6,8 @@ 'use strict'; document.addEventListener('DOMContentLoaded', () => { - const folders = [].slice.call(document.querySelectorAll('.folder-url, .component-folder-url, .layout-folder-url')); - const innerLists = [].slice.call(document.querySelectorAll('.folder ul, .component-folder ul, .layout-folder ul')); + const folders = [].slice.call(document.querySelectorAll('.folder-url, .component-folder-url, .plugin-folder ul, .layout-folder-url')); + const innerLists = [].slice.call(document.querySelectorAll('.folder ul, .component-folder ul, .plugin-folder ul, .layout-folder ul')); const openLists = [].slice.call(document.querySelectorAll('.show > ul')); const fileModalFolders = [].slice.call(document.querySelectorAll('#fileModal .folder-url')); const folderModalFolders = [].slice.call(document.querySelectorAll('#folderModal .folder-url')); diff --git a/components/com_content/Controller/DisplayController.php b/components/com_content/Controller/DisplayController.php index b747c2edcad54..9d7ed3590d417 100644 --- a/components/com_content/Controller/DisplayController.php +++ b/components/com_content/Controller/DisplayController.php @@ -11,6 +11,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Language\Text; @@ -116,7 +117,10 @@ public function display($cachable = false, $urlparams = false) // Get/Create the model if ($model = $this->getModel($vName)) { - $model->hit(); + if (ComponentHelper::getParams('com_content')->get('record_hits', 1) == 1) + { + $model->hit(); + } } } diff --git a/components/com_content/Model/ArticleModel.php b/components/com_content/Model/ArticleModel.php index a0810c0d164f1..14a5e85382271 100644 --- a/components/com_content/Model/ArticleModel.php +++ b/components/com_content/Model/ArticleModel.php @@ -57,10 +57,12 @@ protected function populateState() $params = $app->getParams(); $this->setState('params', $params); - // TODO: Tune these values based on other permissions. $user = Factory::getUser(); - if ((!$user->authorise('core.edit.state', 'com_content')) && (!$user->authorise('core.edit', 'com_content'))) + // If $pk is set then authorise on complete asset, else on component only + $asset = empty($pk) ? 'com_content' : 'com_content.article.' . $pk; + + if ((!$user->authorise('core.edit.state', $asset)) && (!$user->authorise('core.edit', $asset))) { $this->setState('filter.published', ContentComponent::CONDITION_PUBLISHED); $this->setState('filter.archived', ContentComponent::CONDITION_ARCHIVED); @@ -139,7 +141,7 @@ public function getItem($pk = null) $query->select('ROUND(v.rating_sum / v.rating_count, 0) AS rating, v.rating_count as rating_count') ->join('LEFT', '#__content_rating AS v ON a.id = v.content_id'); - if ((!$user->authorise('core.edit.state', 'com_content')) && (!$user->authorise('core.edit', 'com_content'))) + if ((!$user->authorise('core.edit.state', 'com_content.article.' . $pk)) && (!$user->authorise('core.edit', 'com_content.article.' . $pk))) { // Filter by start and end dates. $nullDate = $db->quote($db->getNullDate()); diff --git a/components/com_users/Model/RemindModel.php b/components/com_users/Model/RemindModel.php index dfd31ab318e82..9d637a93cebde 100644 --- a/components/com_users/Model/RemindModel.php +++ b/components/com_users/Model/RemindModel.php @@ -220,9 +220,9 @@ public function processRemindRequest($data) return false; } - else - { - return true; - } + + Factory::getApplication()->triggerEvent('onUserAfterRemind', array($user)); + + return true; } } diff --git a/language/en-GB/en-GB.ini b/language/en-GB/en-GB.ini index 49b60e24aecc1..e5e976fafc1c6 100644 --- a/language/en-GB/en-GB.ini +++ b/language/en-GB/en-GB.ini @@ -140,6 +140,7 @@ JERROR_LOADING_MENUS="Error loading Menus: %s" JERROR_LOGIN_DENIED="You can't access the private section of this site." JERROR_NOLOGIN_BLOCKED="Login denied! Your account has either been blocked or you have not activated it yet." JERROR_PAGE_NOT_FOUND="Page not found" +JERROR_SENDING_EMAIL="Email could not be sent." JERROR_SESSION_STARTUP="Error starting the session." JERROR_TABLE_BIND_FAILED="hmm %s ..." JERROR_USERS_PROFILE_NOT_FOUND="User profile not found" @@ -265,6 +266,8 @@ JGLOBAL_NUM="#" JGLOBAL_OTPMETHOD_NONE="Disable Two Factor Authentication" JGLOBAL_PASSWORD="Password" JGLOBAL_PASSWORD_RESET_REQUIRED="You are required to reset your password before proceeding." +JGLOBAL_PREVIEW_POSITION="Position: %s" +JGLOBAL_PREVIEW_STYLE="Style: %s" JGLOBAL_PRINT="Print" JGLOBAL_PRINT_TITLE="Print article < %s >" JGLOBAL_RECORD_NUMBER="Record ID: %d" diff --git a/layouts/chromes/outline.php b/layouts/chromes/outline.php index 103e10d39a8f2..c058bfe51af3c 100644 --- a/layouts/chromes/outline.php +++ b/layouts/chromes/outline.php @@ -10,6 +10,7 @@ defined('_JEXEC') or die; use Joomla\CMS\Factory; +use Joomla\CMS\Language\Text; $module = $displayData['module']; @@ -20,13 +21,43 @@ $css = true; $doc = Factory::getDocument(); - $doc->addStyleDeclaration('.mod-preview-info { padding: 2px 4px 2px 4px; border: 1px solid black; position: absolute; background-color: white; color: red;}'); - $doc->addStyleDeclaration('.mod-preview-wrapper { background-color:#eee; border: 1px dotted black; color:#700;}'); + $doc->addStyleDeclaration(' + .mod-preview { + background: rgba(100,100,100,.08); + box-shadow: 0 0 0 4px #f4f4f4, 0 0 0 5px rgba(100,100,100,.2); + border-radius: 1px; + margin: 8px 0; + } + .mod-preview-info { + padding: 4px 6px; + margin-bottom: 5px; + font-family: Arial, sans-serif; + font-size: .75rem; + line-height: 1rem; + color: white; + background-color: #33373f; + border-radius: 3px; + box-shadow: 0 -10px 20px rgba(0,0,0,.2) inset; + } + .mod-preview-info span { + font-weight: bold; + color: #ccc; + } + .mod-preview-wrapper { + margin-bottom: .5rem; + } + '); } ?>
    -
    position . ' [ Style: ' . $module->style . ' ]'; ?>
    +
    +
    + position); ?> +
    +
    + style); ?> +
    +
    content; ?>
    diff --git a/libraries/src/Environment/Browser.php b/libraries/src/Environment/Browser.php index 4f1720247e83d..1fb1e048d7dfc 100644 --- a/libraries/src/Environment/Browser.php +++ b/libraries/src/Environment/Browser.php @@ -122,6 +122,7 @@ class Browser 'ViolaBot', 'webbandit', 'www.almaden.ibm.com/cs/crawler', + 'yandex.com/bots', 'ZyBorg', ); diff --git a/libraries/src/Extension/ExtensionHelper.php b/libraries/src/Extension/ExtensionHelper.php index 4c06bd09a50d8..ce0e074d7281d 100644 --- a/libraries/src/Extension/ExtensionHelper.php +++ b/libraries/src/Extension/ExtensionHelper.php @@ -229,6 +229,7 @@ class ExtensionHelper array('plugin', 'rotate', 'media-action', 0), // Core plugin extensions - privacy + array('plugin', 'actionlogs', 'privacy', 0), array('plugin', 'contact', 'privacy', 0), array('plugin', 'content', 'privacy', 0), array('plugin', 'message', 'privacy', 0), diff --git a/libraries/src/Form/Field/SubformField.php b/libraries/src/Form/Field/SubformField.php index 864bacebc139e..b6ee3b03937d4 100644 --- a/libraries/src/Form/Field/SubformField.php +++ b/libraries/src/Form/Field/SubformField.php @@ -235,7 +235,7 @@ protected function getInput() try { // Prepare the form template - $formname = 'subform.' . str_replace(array('[', ']'), array('.', ''), $control); + $formname = 'subform.' . str_replace(array('jform[', '[', ']'), array('', '.', ''), $control); $tmplcontrol = !$this->multiple ? $control : $control . '[' . $this->fieldname . 'X]'; $tmpl = Form::getInstance($formname, $this->formsource, array('control' => $tmplcontrol)); @@ -277,6 +277,14 @@ protected function getInput() $data['fieldname'] = $this->fieldname; $data['groupByFieldset'] = $this->groupByFieldset; + /** + * For each rendering process of a subform element, we want to have a + * separate unique subform id present to could distinguish the eventhandlers + * regarding adding/moving/removing rows from nested subforms from their parents. + */ + static $unique_subform_id = 0; + $data['unique_subform_id'] = ('sr-' . ($unique_subform_id++)); + // Prepare renderer $renderer = $this->getRenderer($this->layout); diff --git a/libraries/src/Helper/ModuleHelper.php b/libraries/src/Helper/ModuleHelper.php index 48da028423ba2..a2169f0fb79f3 100644 --- a/libraries/src/Helper/ModuleHelper.php +++ b/libraries/src/Helper/ModuleHelper.php @@ -110,7 +110,6 @@ public static function &getModules($position) { $result[0] = static::getModule('mod_' . $position); $result[0]->title = $position; - $result[0]->content = $position; $result[0]->position = $position; } } diff --git a/libraries/src/Log/Logger/FormattedtextLogger.php b/libraries/src/Log/Logger/FormattedtextLogger.php index 6e0bec04750a5..c83458fc2e36e 100644 --- a/libraries/src/Log/Logger/FormattedtextLogger.php +++ b/libraries/src/Log/Logger/FormattedtextLogger.php @@ -229,13 +229,7 @@ protected function formatLine(LogEntry $entry) $line = str_replace('{' . $field . '}', $tmp[$field] ?? '-', $line); } - // Write the new entry to the file. - $line .= "\n"; - - if (!File::append($this->path, $line)) - { - throw new \RuntimeException('Cannot write to log file.'); - } + return $line; } /** diff --git a/modules/mod_languages/Helper/LanguagesHelper.php b/modules/mod_languages/Helper/LanguagesHelper.php index 2d65b6db4a8c6..2eb4bd39e6b6c 100644 --- a/modules/mod_languages/Helper/LanguagesHelper.php +++ b/modules/mod_languages/Helper/LanguagesHelper.php @@ -67,7 +67,8 @@ public static function getList(&$params) $associations = MenusHelper::getAssociations($active->id); } - $component = $app->bootComponent($app->input->get('option')); + $option = $app->input->get('option'); + $component = $app->bootComponent($option); if ($component instanceof AssociationServiceInterface) { @@ -76,8 +77,8 @@ public static function getList(&$params) else { // Load component associations - $class = str_replace('com_', '', $app->input->get('option')) . 'HelperAssociation'; - \JLoader::register($class, JPATH_COMPONENT_SITE . '/helpers/association.php'); + $class = str_replace('com_', '', $option) . 'HelperAssociation'; + \JLoader::register($class, JPATH_SITE . '/components/' . $option . '/helpers/association.php'); if (class_exists($class) && is_callable(array($class, 'getAssociations'))) { diff --git a/plugins/actionlog/joomla/joomla.php b/plugins/actionlog/joomla/joomla.php index 2ffc62712cd35..11a9a6ea07e5c 100644 --- a/plugins/actionlog/joomla/joomla.php +++ b/plugins/actionlog/joomla/joomla.php @@ -366,6 +366,12 @@ public function onExtensionAfterInstall($installer, $eid) $language = JFactory::getLanguage(); $user = JFactory::getUser(); $manifest = $installer->get('manifest'); + + if ($manifest === null) + { + return; + } + $extensionType = $manifest->attributes()->type; // If the extension type has it own language key, use it, otherwise, use default language key @@ -423,6 +429,12 @@ public function onExtensionAfterUninstall($installer, $eid, $result) $language = JFactory::getLanguage(); $user = JFactory::getUser(); $manifest = $installer->get('manifest'); + + if ($manifest === null) + { + return; + } + $extensionType = $manifest->attributes()->type; // If the extension type has it own language key, use it, otherwise, use default language key @@ -473,6 +485,12 @@ public function onExtensionAfterUpdate($installer, $eid) $language = JFactory::getLanguage(); $user = JFactory::getUser(); $manifest = $installer->get('manifest'); + + if ($manifest === null) + { + return; + } + $extensionType = $manifest->attributes()->type; // If the extension type has it own language key, use it, otherwise, use default language key @@ -626,6 +644,7 @@ public function onExtensionAfterDelete($context, $table) public function onUserAfterSave($user, $isnew, $success, $msg) { $context = $this->app->input->get('option'); + $task = $this->app->input->get->getCmd('task'); if (!$this->checkLoggable($context)) { @@ -638,6 +657,20 @@ public function onUserAfterSave($user, $isnew, $success, $msg) { $messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_REGISTERED'; $action = 'register'; + + // Reset request + if ($task === 'reset.request') + { + $messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_RESET_REQUEST'; + $action = 'resetrequest'; + } + + // Reset complete + if ($task === 'reset.complete') + { + $messageLanguageKey = 'PLG_ACTIONLOG_JOOMLA_USER_RESET_COMPLETE'; + $action = 'resetcomplete'; + } } elseif ($isnew) { @@ -932,4 +965,38 @@ protected function checkLoggable($extension) { return in_array($extension, $this->loggableExtensions); } + + /** + * On after Remind username request + * + * Method is called after user request to remind their username. + * + * @param array $user Holds the user data. + * + * @return void + * + * @since 3.9.0 + */ + public function onUserAfterRemind($user) + { + $context = $this->app->input->get('option'); + + if (!$this->checkLoggable($context)) + { + return; + } + + $message = array( + 'action' => 'remind', + 'type' => 'PLG_ACTIONLOG_JOOMLA_TYPE_USER', + 'id' => $user->id, + 'title' => $user->name, + 'itemlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id, + 'userid' => $user->id, + 'username' => $user->name, + 'accountlink' => 'index.php?option=com_users&task=user.edit&id=' . $user->id, + ); + + $this->addLog(array($message), 'PLG_ACTIONLOG_JOOMLA_USER_REMIND', $context, $user->id); + } } diff --git a/plugins/captcha/recaptcha/recaptcha.php b/plugins/captcha/recaptcha/recaptcha.php index 992514773daec..634fe7b7a8e87 100644 --- a/plugins/captcha/recaptcha/recaptcha.php +++ b/plugins/captcha/recaptcha/recaptcha.php @@ -107,7 +107,7 @@ public function onDisplay($name = null, $id = 'dynamic_recaptcha_1', $class = '' $ele->setAttribute('data-error-callback', $this->params->get('error_callback', '')); $dom->appendChild($ele); - return $dom->saveXML($ele); + return $dom->saveHTML($ele); } /** diff --git a/plugins/captcha/recaptcha_invisible/recaptcha_invisible.php b/plugins/captcha/recaptcha_invisible/recaptcha_invisible.php index ab21af21100e1..cc9b6604960be 100644 --- a/plugins/captcha/recaptcha_invisible/recaptcha_invisible.php +++ b/plugins/captcha/recaptcha_invisible/recaptcha_invisible.php @@ -63,7 +63,6 @@ public function onInit($id = 'dynamic_recaptcha_invisible_1') throw new \RuntimeException(JText::_('PLG_RECAPTCHA_INVISIBLE_ERROR_NO_PUBLIC_KEY')); } - // Load callback first for browser compatibility \JHtml::_( 'script', @@ -83,6 +82,8 @@ public function onInit($id = 'dynamic_recaptcha_invisible_1') array(), array('async' => 'async', 'defer' => 'defer') ); + + return true; } /** @@ -119,7 +120,7 @@ public function onDisplay($name = null, $id = 'dynamic_recaptcha_invisible_1', $ * * @param string $code Answer provided by user. Not needed for the Recaptcha implementation * - * @return True if the answer is correct, false otherwise + * @return boolean True if the answer is correct, false otherwise * * @since 3.9.0 * @throws \RuntimeException @@ -177,7 +178,7 @@ public function onSetupField(\Joomla\CMS\Form\Field\CaptchaField $field, \Simple * @param string $remoteip The remote IP of the visitor. * @param string $response The response received from Google. * - * @return bool True if response is good | False if response is bad. + * @return boolean True if response is good | False if response is bad. * * @since 3.9.0 * @throws \RuntimeException @@ -196,5 +197,7 @@ private function getResponse($privatekey, $remoteip, $response) return false; } + + return true; } } diff --git a/plugins/captcha/recaptcha_invisible/recaptcha_invisible.xml b/plugins/captcha/recaptcha_invisible/recaptcha_invisible.xml index d9f9a92d9f292..f0a1275faa8f9 100644 --- a/plugins/captcha/recaptcha_invisible/recaptcha_invisible.xml +++ b/plugins/captcha/recaptcha_invisible/recaptcha_invisible.xml @@ -59,6 +59,7 @@ description="PLG_RECAPTCHA_INVISIBLE_TABINDEX_DESC" default="0" min="0" + filter="integer" /> rating; +$rcount = (int) $row->rating_count; // Look for images in template if available $starImageOn = HTMLHelper::_('image', 'system/rating_star.png', Text::_('PLG_VOTE_STAR_ACTIVE'), null, true); @@ -46,11 +47,13 @@ } ?> +

    ' . $rating . '', '5'); ?> - - + +

    -
    + + diff --git a/plugins/privacy/actionlogs/actionlogs.php b/plugins/privacy/actionlogs/actionlogs.php index 80ffdcf1a5d5e..c79f7a6b920ee 100644 --- a/plugins/privacy/actionlogs/actionlogs.php +++ b/plugins/privacy/actionlogs/actionlogs.php @@ -9,9 +9,7 @@ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; - -JLoader::register('ActionlogsHelper', JPATH_COMPONENT . '/helpers/actionlogs.php'); +JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php'); JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php'); JLoader::register('PrivacyTableRequest', JPATH_ADMINISTRATOR . '/components/com_privacy/tables/request.php'); @@ -55,7 +53,7 @@ public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user return array(); } - $domain = $this->createDomain('actionlog', 'Logged actions of the user'); + $domain = $this->createDomain('user_action_logs', 'joomla_user_action_logs_data'); $query = $this->db->getQuery(true) ->select('a.*, u.name') diff --git a/plugins/privacy/contact/contact.php b/plugins/privacy/contact/contact.php index 07615616f5a84..cce6eefbd3eef 100644 --- a/plugins/privacy/contact/contact.php +++ b/plugins/privacy/contact/contact.php @@ -9,8 +9,6 @@ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; - JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php'); JLoader::register('PrivacyTableRequest', JPATH_ADMINISTRATOR . '/components/com_privacy/tables/request.php'); @@ -41,7 +39,7 @@ class PlgPrivacyContact extends PrivacyPlugin /** * Contacts array * - * @var Array + * @var array * @since 3.9.0 */ protected $contacts = array(); @@ -91,7 +89,7 @@ public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user */ private function createContactDomain(PrivacyTableRequest $request, JUser $user = null) { - $domain = $this->createDomain('user contact', 'Joomla! user contact data'); + $domain = $this->createDomain('user_contact', 'joomla_user_contact_data'); if ($user) { @@ -132,7 +130,7 @@ private function createContactDomain(PrivacyTableRequest $request, JUser $user = */ private function createContactCustomFieldsDomain($contact) { - $domain = $this->createDomain('contact custom fields', 'Joomla! contact custom fields data'); + $domain = $this->createDomain('contact_custom_fields', 'joomla_contact_custom_fields_data'); // Get item's fields, also preparing their value property for manual display $fields = FieldsHelper::getFields('com_contact.contact', $contact); diff --git a/plugins/privacy/content/content.php b/plugins/privacy/content/content.php index ab8a10ebf2208..b70ed8dff055e 100644 --- a/plugins/privacy/content/content.php +++ b/plugins/privacy/content/content.php @@ -9,8 +9,6 @@ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; - JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php'); JLoader::register('PrivacyTableRequest', JPATH_ADMINISTRATOR . '/components/com_privacy/tables/request.php'); @@ -41,7 +39,7 @@ class PlgPrivacyContent extends PrivacyPlugin /** * Contents array * - * @var Array + * @var array * @since 3.9.0 */ protected $contents = array(); @@ -89,7 +87,7 @@ public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user */ private function createContentDomain(JUser $user) { - $domain = $this->createDomain('user content', 'Joomla! user content data'); + $domain = $this->createDomain('user_content', 'joomla_user_content_data'); $query = $this->db->getQuery(true) ->select('*') @@ -119,7 +117,7 @@ private function createContentDomain(JUser $user) */ private function createContentCustomFieldsDomain($content) { - $domain = $this->createDomain('content custom fields', 'Joomla! content custom fields data'); + $domain = $this->createDomain('content_custom_fields', 'joomla_content_custom_fields_data'); // Get item's fields, also preparing their value property for manual display $fields = FieldsHelper::getFields('com_content.article', $content); diff --git a/plugins/privacy/message/message.php b/plugins/privacy/message/message.php index 77082e3a80d46..590bc9d3d91a7 100644 --- a/plugins/privacy/message/message.php +++ b/plugins/privacy/message/message.php @@ -9,9 +9,6 @@ defined('_JEXEC') or die; -use Joomla\Utilities\ArrayHelper; - -JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); JLoader::register('PrivacyPlugin', JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/plugin.php'); JLoader::register('PrivacyTableRequest', JPATH_ADMINISTRATOR . '/components/com_privacy/tables/request.php'); @@ -74,7 +71,7 @@ public function onPrivacyExportRequest(PrivacyTableRequest $request, JUser $user */ private function createMessageDomain(JUser $user) { - $domain = $this->createDomain('user message', 'Joomla! user message data'); + $domain = $this->createDomain('user_messages', 'joomla_user_messages_data'); $query = $this->db->getQuery(true) ->select('*') diff --git a/plugins/privacy/user/user.php b/plugins/privacy/user/user.php index 2ad9744d4538f..7b05e9dfa89ad 100644 --- a/plugins/privacy/user/user.php +++ b/plugins/privacy/user/user.php @@ -180,7 +180,7 @@ public function onPrivacyRemoveData(PrivacyTableRequest $request, JUser $user = */ private function createNotesDomain(JTableUser $user) { - $domain = $this->createDomain('user notes', 'Joomla! user notes data'); + $domain = $this->createDomain('user_notes', 'joomla_user_notes_data'); $query = $this->db->getQuery(true) ->select('*') @@ -214,7 +214,7 @@ private function createNotesDomain(JTableUser $user) */ private function createProfileDomain(JTableUser $user) { - $domain = $this->createDomain('user profile', 'Joomla! user profile data'); + $domain = $this->createDomain('user_profile', 'joomla_user_profile_data'); $query = $this->db->getQuery(true) ->select('*') @@ -243,7 +243,7 @@ private function createProfileDomain(JTableUser $user) */ private function createUserDomain(JTableUser $user) { - $domain = $this->createDomain('users', 'Joomla! users table data'); + $domain = $this->createDomain('users', 'joomla_users_data'); $domain->addItem($this->createItemForUserTable($user)); return $domain; @@ -285,7 +285,7 @@ private function createItemForUserTable(JTableUser $user) */ private function createUserCustomFieldsDomain(JTableUser $user) { - $domain = $this->createDomain('user custom fields', 'Joomla! user custom fields data'); + $domain = $this->createDomain('user_custom_fields', 'joomla_user_custom_fields_data'); // Get item's fields, also preparing their value property for manual display $fields = FieldsHelper::getFields('com_users.user', $user); diff --git a/plugins/quickicon/privacycheck/privacycheck.php b/plugins/quickicon/privacycheck/privacycheck.php index f78fabd4286de..cb2cec3c7411b 100644 --- a/plugins/quickicon/privacycheck/privacycheck.php +++ b/plugins/quickicon/privacycheck/privacycheck.php @@ -40,7 +40,7 @@ class PlgQuickiconPrivacyCheck extends JPlugin */ public function onGetIcons($context) { - if ($context !== $this->params->get('context', 'mod_quickicon') || !Factory::getUser()->authorise('core.admin', 'com_privacy')) + if ($context !== $this->params->get('context', 'mod_quickicon') || !Factory::getUser()->authorise('core.admin')) { return; } diff --git a/plugins/system/actionlogs/forms/actionlogs.xml b/plugins/system/actionlogs/forms/actionlogs.xml index 1aef8b6157a56..579bd536e1c66 100644 --- a/plugins/system/actionlogs/forms/actionlogs.xml +++ b/plugins/system/actionlogs/forms/actionlogs.xml @@ -21,6 +21,7 @@ label="PLG_SYSTEM_ACTIONLOGS_EXTENSIONS_NOTIFICATIONS" description="PLG_SYSTEM_ACTIONLOGS_EXTENSIONS_NOTIFICATIONS_DESC" multiple="true" + showon="logs_notification_option:1" />
    diff --git a/plugins/system/privacyconsent/privacyconsent.php b/plugins/system/privacyconsent/privacyconsent.php index 459db718a1ebe..3cbd42b84d601 100644 --- a/plugins/system/privacyconsent/privacyconsent.php +++ b/plugins/system/privacyconsent/privacyconsent.php @@ -335,7 +335,7 @@ public function onAfterRoute() /** * Event to specify whether a privacy policy has been published. * - * @param array &$policy The privacy policy status data, passed by reference, with keys "published" and "editLink" + * @param array &$policy The privacy policy status data, passed by reference, with keys "published", "editLink" and "articlePublished". * * @return void * @@ -356,6 +356,27 @@ public function onPrivacyCheckPrivacyPolicyPublished(&$policy) return; } + // Check if the article exists in database and is published + $query = $this->db->getQuery(true) + ->select($this->db->quoteName(array('id', 'state'))) + ->from($this->db->quoteName('#__content')) + ->where($this->db->quoteName('id') . ' = ' . (int) $articleId); + $this->db->setQuery($query); + + $article = $this->db->loadObject(); + + // Check if the article exists + if (!$article) + { + return; + } + + // Check if the article is published + if ($article->state == 1) + { + $policy['articlePublished'] = true; + } + $policy['published'] = true; $policy['editLink'] = JRoute::_('index.php?option=com_content&task=article.edit&id=' . $articleId); }