diff --git a/.eslintignore b/.eslintignore index 53086d2467d10..912f193b079f3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,8 +1,5 @@ # A list of files to ignore from linting +# TODO: Fix the webcomponents codestyle then also allow linting on them +*.js !*.es6.js -build/**/**/*.js ## Exclude webcomponents till we fix the CS! *.vue -build/incompatible_page/*.js -media/system/webcomponents/js/*.js ## The linted files are in build/webcomponents! -media/com_media/js/edit-images.js ## TODO: Fix this file -media/mod_menu/js/admin-menu.js ## TODO: Fix this file diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql index de7d0fbe4b785..04332e563ba47 100644 --- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-06-03.sql @@ -7,6 +7,7 @@ CREATE TABLE IF NOT EXISTS `#__csp` ( `document_uri` varchar(500) NOT NULL DEFAULT '', `blocked_uri` varchar(500) NOT NULL DEFAULT '', `directive` varchar(500) NOT NULL DEFAULT '', + `client` varchar(500) NOT NULL DEFAULT '', `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `published` tinyint(1) NOT NULL DEFAULT 0, diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql index 09481caed92f9..768a47ccb3086 100644 --- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-06-03.sql @@ -7,6 +7,7 @@ CREATE TABLE IF NOT EXISTS "#__csp" ( "document_uri" varchar(500) NOT NULL DEFAULT '', "blocked_uri" varchar(500) NOT NULL DEFAULT '', "directive" varchar(500) NOT NULL DEFAULT '', + "client" varchar(500) NOT NULL DEFAULT '', "created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "modified" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL, "published" smallint DEFAULT 0 NOT NULL, diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_config.php b/administrator/components/com_admin/tmpl/sysinfo/default_config.php index 8c9118def3c57..6eb271a6d4ef1 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_config.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_config.php @@ -17,10 +17,10 @@ - - @@ -33,9 +33,9 @@ config as $key => $value) : ?> - diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_directory.php b/administrator/components/com_admin/tmpl/sysinfo/default_directory.php index a535a1b0d61e1..ed71ca1c13ffe 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_directory.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_directory.php @@ -18,10 +18,10 @@
+ +
+ - +
- - @@ -34,9 +34,9 @@ directory as $dir => $info) : ?> - diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php b/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php index 9d8637e1fdf2e..9dc773c145b19 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php @@ -18,10 +18,10 @@
+ +
+ - +
- - @@ -34,113 +34,113 @@ - - - - - - - - - - - - - - diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_system.php b/administrator/components/com_admin/tmpl/sysinfo/default_system.php index 52ff42fbabfeb..c8bec2a2c3348 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_system.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_system.php @@ -18,10 +18,10 @@
+ +
+ - + php_settings['open_basedir']); ?>
+ - + php_settings['display_errors']); ?>
+ - + php_settings['short_open_tag']); ?>
+ - + php_settings['file_uploads']); ?>
+ - + php_settings['output_buffering']); ?>
+ - + php_settings['session.save_path']); ?>
+ - + php_settings['session.auto_start']); ?>
+ - + php_settings['xml']); ?>
+ - + php_settings['zlib']); ?>
+ - + php_settings['zip']); ?>
+ - + php_settings['disable_functions']); ?>
+ - + php_settings['mbstring']); ?>
+ - + php_settings['iconv']); ?>
+ - + php_settings['max_input_vars']); ?>
- - @@ -33,81 +33,81 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/administrator/components/com_associations/tmpl/association/edit.php b/administrator/components/com_associations/tmpl/association/edit.php index e2703cd3b365f..8efb4c7387170 100644 --- a/administrator/components/com_associations/tmpl/association/edit.php +++ b/administrator/components/com_associations/tmpl/association/edit.php @@ -15,7 +15,7 @@ HTMLHelper::_('behavior.formvalidator'); HTMLHelper::_('behavior.keepalive'); -HTMLHelper::_('formbehavior.chosen', 'select'); +HTMLHelper::_('jquery.framework'); HTMLHelper::_('script', 'com_associations/sidebyside.js', false, true); HTMLHelper::_('stylesheet', 'com_associations/sidebyside.css', array(), true); diff --git a/administrator/components/com_associations/tmpl/associations/default.php b/administrator/components/com_associations/tmpl/associations/default.php index 28bc046e37a82..5d54324919fdf 100644 --- a/administrator/components/com_associations/tmpl/associations/default.php +++ b/administrator/components/com_associations/tmpl/associations/default.php @@ -46,33 +46,33 @@ typeSupports['state'])) : ?> - - - - - typeFields['menutype'])) : ?> - typeFields['access'])) : ?> - - @@ -97,7 +97,7 @@ - diff --git a/administrator/components/com_associations/tmpl/associations/modal.php b/administrator/components/com_associations/tmpl/associations/modal.php index 85b794f3bfca9..576ca7ab94e9d 100644 --- a/administrator/components/com_associations/tmpl/associations/modal.php +++ b/administrator/components/com_associations/tmpl/associations/modal.php @@ -24,9 +24,7 @@ Session::checkToken('get') or die(Text::_('JINVALID_TOKEN')); } -HTMLHelper::_('jquery.framework'); HTMLHelper::_('behavior.multiselect'); -HTMLHelper::_('formbehavior.chosen', 'select'); $function = $app->input->getCmd('function', 'jSelectAssociation'); $listOrder = $this->escape($this->state->get('list.ordering')); @@ -63,30 +61,30 @@ typeSupports['state'])) : ?> - - - - typeFields['menutype'])) : ?> - typeSupports['acl'])) : ?> - - @@ -110,7 +108,7 @@ - diff --git a/administrator/components/com_banners/tmpl/banners/default.php b/administrator/components/com_banners/tmpl/banners/default.php index b4c2e73e1db5d..58be681809b69 100644 --- a/administrator/components/com_banners/tmpl/banners/default.php +++ b/administrator/components/com_banners/tmpl/banners/default.php @@ -51,36 +51,36 @@
+ +
- - + + info['php']; ?>
- - + + info['dbserver']; ?>
- - + + info['dbversion']; ?>
- - + + info['dbcollation']; ?>
- - + + info['dbconnectioncollation']; ?>
- - + + info['phpversion']; ?>
- - + + info['server']); ?>
- - + + info['sapi_name']; ?>
- - + + info['version']; ?>
- - + + info['useragent'], ENT_COMPAT, 'UTF-8'); ?>
+ + + + + + + +
+ level)) : ?> $item->level)); ?> @@ -121,7 +121,7 @@ escape($item->category_title); ?> - +
+ + + + + + +
+ level)) : ?> $item->level)); ?> @@ -135,7 +133,7 @@ escape($item->category_title); ?> - +
- - - - - - - - - @@ -131,7 +131,7 @@ state, $i, 'banners.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> - diff --git a/administrator/components/com_banners/tmpl/clients/default.php b/administrator/components/com_banners/tmpl/clients/default.php index e69bd2cb61901..dd87a76ae221a 100644 --- a/administrator/components/com_banners/tmpl/clients/default.php +++ b/administrator/components/com_banners/tmpl/clients/default.php @@ -50,42 +50,42 @@
+ + - - + + + + + + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'banners.', $canCheckin); ?> @@ -150,7 +150,7 @@ escape($item->category_title); ?>
- +
sticky, $i, $canChange); ?>
- - - - - - - - - @@ -113,7 +113,7 @@ state, $i, 'clients.', $canChange); ?> - diff --git a/administrator/components/com_banners/tmpl/tracks/default.php b/administrator/components/com_banners/tmpl/tracks/default.php index 014c14ba62ee9..bbfe7c38a0b53 100644 --- a/administrator/components/com_banners/tmpl/tracks/default.php +++ b/administrator/components/com_banners/tmpl/tracks/default.php @@ -31,19 +31,19 @@
+ - - + + + + + + + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'clients.', $canCheckin); ?> @@ -126,7 +126,7 @@ escape($item->name); ?>
- +
contact; ?>
- - - - - @@ -58,12 +58,12 @@ items as $i => $item) : ?> - diff --git a/administrator/components/com_cache/tmpl/cache/default.php b/administrator/components/com_cache/tmpl/cache/default.php index 3426cec02a37d..7455c51f5f1d1 100644 --- a/administrator/components/com_cache/tmpl/cache/default.php +++ b/administrator/components/com_cache/tmpl/cache/default.php @@ -30,16 +30,16 @@
+ + + + +
+ banner_name; ?>
escape($item->category_title); ?>
- +
client_name; ?>
- - - @@ -58,11 +58,11 @@ - diff --git a/administrator/components/com_categories/helpers/association.php b/administrator/components/com_categories/helpers/association.php index 693dfcd52409d..770af18d88076 100644 --- a/administrator/components/com_categories/helpers/association.php +++ b/administrator/components/com_categories/helpers/association.php @@ -36,8 +36,6 @@ public static function getCategoryAssociations($id = 0, $extension = 'com_conten if ($id) { - // Load route helper - jimport('helper.route', JPATH_COMPONENT_SITE); $helperClassname = ucfirst(substr($extension, 4)) . 'HelperRoute'; $associations = CategoriesHelper::getAssociations($id, $extension); diff --git a/administrator/components/com_categories/tmpl/categories/default.php b/administrator/components/com_categories/tmpl/categories/default.php index fd725e4eb273a..94ba49fa661bf 100644 --- a/administrator/components/com_categories/tmpl/categories/default.php +++ b/administrator/components/com_categories/tmpl/categories/default.php @@ -73,21 +73,21 @@
+ - - + + + +
+ - + count; ?>
- - - items[0]) && property_exists($this->items[0], 'count_published')) : $columns++; ?> - - assoc) : $columns++; ?> - - - @@ -205,7 +205,7 @@ published, $i, 'categories.', $canChange); ?> - items[0]) && property_exists($this->items[0], 'count_published')) : ?>
+ + - - + + + + @@ -95,7 +95,7 @@ items[0]) && property_exists($this->items[0], 'count_unpublished')) : $columns++; ?> - + @@ -103,7 +103,7 @@ items[0]) && property_exists($this->items[0], 'count_archived')) : $columns++; ?> - + @@ -111,27 +111,27 @@ items[0]) && property_exists($this->items[0], 'count_trashed')) : $columns++; ?> - + + + + +
+ $item->level)); ?> checked_out) : ?> editor, $item->checked_out_time, 'categories.', $canCheckin); ?> @@ -224,7 +224,7 @@ escape($item->alias), $this->escape($item->note)); ?> - + diff --git a/administrator/components/com_categories/tmpl/categories/modal.php b/administrator/components/com_categories/tmpl/categories/modal.php index d5dee8c0e155c..0aab5a988d89d 100644 --- a/administrator/components/com_categories/tmpl/categories/modal.php +++ b/administrator/components/com_categories/tmpl/categories/modal.php @@ -49,19 +49,19 @@ - - - - - @@ -108,12 +108,12 @@ - diff --git a/administrator/components/com_checkin/tmpl/checkin/default.php b/administrator/components/com_checkin/tmpl/checkin/default.php index 6181283dc69fb..2ee07ac891e32 100644 --- a/administrator/components/com_checkin/tmpl/checkin/default.php +++ b/administrator/components/com_checkin/tmpl/checkin/default.php @@ -31,9 +31,15 @@
+ + + + +
+ $item->level)); ?> escape($item->title); ?> - + escape($item->access_level); ?>
- - - + + + @@ -47,12 +53,14 @@ items as $table => $count) : ?> - - + diff --git a/administrator/components/com_contact/forms/contact.xml b/administrator/components/com_contact/forms/contact.xml index 50869ef7d366a..5d5653e1ce32c 100644 --- a/administrator/components/com_contact/forms/contact.xml +++ b/administrator/components/com_contact/forms/contact.xml @@ -1,7 +1,7 @@ -
+
diff --git a/administrator/components/com_contact/helpers/associations.php b/administrator/components/com_contact/helpers/associations.php index 53d45000d102e..1312b4b1a5f4d 100644 --- a/administrator/components/com_contact/helpers/associations.php +++ b/administrator/components/com_contact/helpers/associations.php @@ -121,7 +121,7 @@ public function getItem($typeName, $id) switch ($typeName) { case 'contact': - $table = Table::getInstance('Contact', 'Joomla\\Component\\Contact\\Administrator\\Table\\'); + $table = Table::getInstance('ContactTable', 'Joomla\\Component\\Contact\\Administrator\\Table\\'); break; case 'category': diff --git a/administrator/components/com_contact/tmpl/contact/edit.php b/administrator/components/com_contact/tmpl/contact/edit.php index 49c7cd14c5ef1..9dc43ee5019d6 100644 --- a/administrator/components/com_contact/tmpl/contact/edit.php +++ b/administrator/components/com_contact/tmpl/contact/edit.php @@ -21,7 +21,7 @@ HTMLHelper::_('behavior.formvalidator'); HTMLHelper::_('behavior.keepalive'); -HTMLHelper::_('formbehavior.chosen', '.advancedSelect', null, array('disable_search_threshold' => 0 )); +HTMLHelper::_('formbehavior.chosen', '#jform_catid', null, array('disable_search_threshold' => 0 )); $app = Factory::getApplication(); $input = $app->input; diff --git a/administrator/components/com_contact/tmpl/contacts/default.php b/administrator/components/com_contact/tmpl/contacts/default.php index 2e719cb27dfec..413217de881cf 100644 --- a/administrator/components/com_contact/tmpl/contacts/default.php +++ b/administrator/components/com_contact/tmpl/contacts/default.php @@ -50,35 +50,35 @@
+ + + + + +
+ + + - +
- - - - - - + - - @@ -132,7 +132,7 @@ featured, $i, $canChange); ?> -
+ + - - + + + + + - - + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'contacts.', $canCheckin); ?> @@ -151,7 +151,7 @@ escape($item->category_title); ?>
- +
linked_user)) : ?> linked_user; ?> diff --git a/administrator/components/com_contact/tmpl/contacts/modal.php b/administrator/components/com_contact/tmpl/contacts/modal.php index d8543e3d1217d..04050f8dce954 100644 --- a/administrator/components/com_contact/tmpl/contacts/modal.php +++ b/administrator/components/com_contact/tmpl/contacts/modal.php @@ -57,22 +57,22 @@ - - - - - - @@ -118,15 +118,14 @@ - - - - - - - - - - - - vote) : ?> - - - @@ -179,7 +179,7 @@ - diff --git a/administrator/components/com_content/tmpl/articles/modal.php b/administrator/components/com_content/tmpl/articles/modal.php index 36695730cdd3c..fa9ed93cb9097 100644 --- a/administrator/components/com_content/tmpl/articles/modal.php +++ b/administrator/components/com_content/tmpl/articles/modal.php @@ -60,23 +60,23 @@
+ + + + + +
+ escape($item->name); ?> - escape($item->name); ?>
escape($item->category_title); ?>
- +
linked_user)) : ?> linked_user; ?> diff --git a/administrator/components/com_content/helpers/preview.php b/administrator/components/com_content/Helper/PreviewHelper.php similarity index 91% rename from administrator/components/com_content/helpers/preview.php rename to administrator/components/com_content/Helper/PreviewHelper.php index 815364a4a46ff..2344c194514e5 100644 --- a/administrator/components/com_content/helpers/preview.php +++ b/administrator/components/com_content/Helper/PreviewHelper.php @@ -7,6 +7,12 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt */ +namespace Joomla\Component\Content\Administrator\Helper; + +use Joomla\CMS\Factory; +use Joomla\CMS\Language\Multilanguage; +use Joomla\CMS\Uri\Uri; + defined('_JEXEC') or die; use Joomla\CMS\Language\Multilanguage; @@ -18,7 +24,7 @@ * * @since 4.0.0 */ -class ContentHelperPreview +class PreviewHelper { /** * Get the article URL diff --git a/administrator/components/com_content/View/Article/HtmlView.php b/administrator/components/com_content/View/Article/HtmlView.php index 1489bd2ec9d12..6c3df783d4fa0 100644 --- a/administrator/components/com_content/View/Article/HtmlView.php +++ b/administrator/components/com_content/View/Article/HtmlView.php @@ -18,6 +18,7 @@ use Joomla\CMS\Helper\ContentHelper; use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; +use Joomla\Component\Content\Administrator\Helper\PreviewHelper; /** * View to edit an article. @@ -182,8 +183,7 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo) if (!$isNew) { - \JLoader::register('ContentHelperPreview', JPATH_ADMINISTRATOR . '/components/com_content/helpers/preview.php'); - $url = \ContentHelperPreview::url($this->item); + $url = PreviewHelper::url($this->item); $toolbar->preview($url, Text::_('JGLOBAL_PREVIEW')) ->bodyHeight(80) ->modalWidth(90); diff --git a/administrator/components/com_content/forms/filter_featured.xml b/administrator/components/com_content/forms/filter_featured.xml index 99b1b8fd7a61d..eafd9dec717c2 100644 --- a/administrator/components/com_content/forms/filter_featured.xml +++ b/administrator/components/com_content/forms/filter_featured.xml @@ -60,9 +60,7 @@ class="multipleTags" mode="nested" onchange="this.form.submit();" - > - - + />
+ + - - + + + + + + + + + + + + + +
- id); ?> + id, false, 'cid', 'cb', $item->title); ?>
@@ -187,7 +187,7 @@ render($item->featured, $i, ['disabled' => !$canChange]); ?>
+
checked_out) : ?> editor, $item->checked_out_time, 'articles.', $canCheckin); ?> @@ -200,7 +200,7 @@ escape($item->title); ?>
- +
escape($item->alias); ?>
- - - - - - @@ -121,7 +121,7 @@ - diff --git a/administrator/components/com_content/tmpl/featured/default.php b/administrator/components/com_content/tmpl/featured/default.php index e36574cf0c958..1ea4348f458c3 100644 --- a/administrator/components/com_content/tmpl/featured/default.php +++ b/administrator/components/com_content/tmpl/featured/default.php @@ -68,46 +68,46 @@
+ + + + + - + +
+ escape($onclick) . '"' . ' data-id="' . $item->id . '"' . ' data-title="' . $this->escape(addslashes($item->title)) . '"' @@ -135,7 +135,7 @@
escape($item->category_title); ?>
- +
escape($item->access_level); ?>
- - - - - - - - vote) : ?> - - - @@ -160,7 +160,7 @@ featured, $i, $canChange); ?> - diff --git a/administrator/components/com_contenthistory/tmpl/history/modal.php b/administrator/components/com_contenthistory/tmpl/history/modal.php index 8c860075e8f7a..9decdc250d799 100644 --- a/administrator/components/com_contenthistory/tmpl/history/modal.php +++ b/administrator/components/com_contenthistory/tmpl/history/modal.php @@ -71,22 +71,22 @@
+ + - - + + + + + + + + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'articles.', $canCheckin); ?> @@ -179,7 +179,7 @@ escape($item->category_title); ?>
- +
escape($item->access_level); ?>
- - - - - @@ -105,7 +105,7 @@ - diff --git a/administrator/components/com_cpanel/View/System/HtmlView.php b/administrator/components/com_cpanel/View/System/HtmlView.php index 895ded07184df..1211f39d23f21 100644 --- a/administrator/components/com_cpanel/View/System/HtmlView.php +++ b/administrator/components/com_cpanel/View/System/HtmlView.php @@ -103,7 +103,7 @@ public function display($tpl = null) $links['MOD_MENU_TEMPLATES'] = [ 'com_templates' => static::arrayBuilder( 'MOD_MENU_TEMPLATE_SITE_TEMPLATES', - 'index.php?option=com_templates&client_id=0', + 'index.php?option=com_templates&view=templates&client_id=0', 'edit' ), 'com_templates_site_styles' => static::arrayBuilder( diff --git a/administrator/components/com_cpanel/tmpl/help/default.php b/administrator/components/com_cpanel/tmpl/help/default.php index 8d16ec49cf070..a051bf6b15a0e 100644 --- a/administrator/components/com_cpanel/tmpl/help/default.php +++ b/administrator/components/com_cpanel/tmpl/help/default.php @@ -13,7 +13,10 @@ ?>
-

+

+ + +

    links as $link) : ?>
  • diff --git a/administrator/components/com_cpanel/tmpl/system/default.php b/administrator/components/com_cpanel/tmpl/system/default.php index 6aaab62890f18..fb3b81232e8eb 100644 --- a/administrator/components/com_cpanel/tmpl/system/default.php +++ b/administrator/components/com_cpanel/tmpl/system/default.php @@ -15,12 +15,12 @@
    links as $name => $links) : ?>
    -

    +

    headerIcons[$name]) : ?> -

    +
      $link) : ?>
    • diff --git a/administrator/components/com_csp/Model/ReportsModel.php b/administrator/components/com_csp/Model/ReportsModel.php index 36fc28838d739..73f9e424d8c92 100644 --- a/administrator/components/com_csp/Model/ReportsModel.php +++ b/administrator/components/com_csp/Model/ReportsModel.php @@ -40,6 +40,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu 'document_uri', 'a.document_uri', 'blocked_uri', 'a.blocked_uri', 'directive', 'a.directive', + 'client', 'a.client', 'published', 'a.published', ); } diff --git a/administrator/components/com_csp/View/Reports/HtmlView.php b/administrator/components/com_csp/View/Reports/HtmlView.php index 462df7767e798..81b220422a25c 100644 --- a/administrator/components/com_csp/View/Reports/HtmlView.php +++ b/administrator/components/com_csp/View/Reports/HtmlView.php @@ -12,11 +12,11 @@ defined('_JEXEC') or die; use Joomla\CMS\Helper\ContentHelper; +use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\Component\Csp\Administrator\Helper\ReporterHelper; -use Joomla\CMS\Language\Text; /** * Reports view class for the Csp package. @@ -151,12 +151,13 @@ protected function addToolbar() */ protected function getSortFields() { - return array( + return [ 'a.state' => Text::_('JSTATUS'), 'a.blocked_uri' => Text::_('COM_CSP_HEADING_BLOCKED_URI'), 'a.document_uri' => Text::_('COM_CSP_HEADING_DOCUMENT_URI'), 'a.directive' => Text::_('COM_CSP_HEADING_DIRECTIVE'), - 'a.id' => Text::_('JGRID_HEADING_ID') - ); + 'a.client' => Text::_('JCLIENT'), + 'a.id' => Text::_('JGRID_HEADING_ID'), + ]; } } diff --git a/administrator/components/com_csp/config.xml b/administrator/components/com_csp/config.xml index cf1dee5c4baf4..99c33b5ccd58e 100644 --- a/administrator/components/com_csp/config.xml +++ b/administrator/components/com_csp/config.xml @@ -1,19 +1,5 @@ -
      - - - - -
      -
      COM_CSP_HEADING_DIRECTIVE_DESC + + diff --git a/administrator/components/com_csp/tmpl/reports/default.php b/administrator/components/com_csp/tmpl/reports/default.php index 7d68ef1eea4d9..c3b919659107c 100644 --- a/administrator/components/com_csp/tmpl/reports/default.php +++ b/administrator/components/com_csp/tmpl/reports/default.php @@ -61,32 +61,35 @@
+ - - + + + + + +
version_id); ?> + save_date, 'Y-m-d H:i:s'); ?> @@ -113,7 +113,7 @@ sha1_hash == $hash) : ?>   - + version_note); ?>
- - - - - + - - @@ -103,9 +106,9 @@ published, $i, 'reports.', $canChange, 'cb'); ?> - @@ -113,7 +116,10 @@ directive; ?> +
+ - - + + + + + + + + +
+ pagination->getListFooter(); ?>
+ document_uri; ?> - + blocked_uri; ?> - created > 0 ? HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC4')) : '-'; ?> + client)); ?> + + created > 0 ? HTMLHelper::_('date', $item->created, JText::_('DATE_FORMAT_LC4')) : '-'; ?> id; ?> diff --git a/administrator/components/com_fields/tmpl/fields/default.php b/administrator/components/com_fields/tmpl/fields/default.php index 5a67c28e1109d..b606b776ac28c 100644 --- a/administrator/components/com_fields/tmpl/fields/default.php +++ b/administrator/components/com_fields/tmpl/fields/default.php @@ -57,33 +57,33 @@ - - - - - - - - @@ -125,7 +125,7 @@ state, $i, 'fields.', $canChange, 'cb'); ?> - diff --git a/administrator/components/com_fields/tmpl/fields/modal.php b/administrator/components/com_fields/tmpl/fields/modal.php index c78a955f50bc4..5be5aadef442a 100644 --- a/administrator/components/com_fields/tmpl/fields/modal.php +++ b/administrator/components/com_fields/tmpl/fields/modal.php @@ -40,25 +40,25 @@
+ + - - + + + + + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'fields.', $canCheckin); ?> @@ -156,7 +156,7 @@
- +
escape($item->type); ?>
- - - - - - - @@ -84,9 +84,9 @@ - diff --git a/administrator/components/com_fields/tmpl/groups/default.php b/administrator/components/com_fields/tmpl/groups/default.php index 5cf3010c98589..1ca38a584ad40 100644 --- a/administrator/components/com_fields/tmpl/groups/default.php +++ b/administrator/components/com_fields/tmpl/groups/default.php @@ -61,27 +61,27 @@
+ + + + + + +
+ escape($item->title); ?> - + group_id ? $this->escape($item->group_title) : Text::_('JNONE'); ?>
- - - - - - @@ -123,7 +123,7 @@ state, $i, 'groups.', $canChange, 'cb'); ?> - diff --git a/administrator/components/com_finder/config.xml b/administrator/components/com_finder/config.xml index f2f61b38fe0e8..9bc869619cd2e 100644 --- a/administrator/components/com_finder/config.xml +++ b/administrator/components/com_finder/config.xml @@ -234,6 +234,17 @@ description="COM_FINDER_FIELDSET_INDEX_OPTIONS_DESCRIPTION" > + + + + + get('tuplecount', 1); + } + if (is_null($multilingual)) { $multilingual = Multilanguage::isEnabled(); @@ -127,33 +133,28 @@ public static function tokenize($input, $lang, $phrase = false) $tokens[] = new FinderIndexerToken($terms[$i], $language->language); } - // Create two and three word phrase tokens from the individual words. - for ($i = 0, $n = count($tokens); $i < $n; $i++) + // Create multi-word phrase tokens from the individual words. + if ($tuplecount > 1) { - // Setup the phrase positions. - $i2 = $i + 1; - $i3 = $i + 2; - - // Create the two word phrase. - if ($i2 < $n && isset($tokens[$i2])) + for ($i = 0, $n = count($tokens); $i < $n; $i++) { - // Tokenize the two word phrase. - $token = new FinderIndexerToken(array($tokens[$i]->term, $tokens[$i2]->term), $language->language, $language->spacer); - $token->derived = true; - - // Add the token to the stack. - $tokens[] = $token; - } - - // Create the three word phrase. - if ($i3 < $n && isset($tokens[$i3])) - { - // Tokenize the three word phrase. - $token = new FinderIndexerToken(array($tokens[$i]->term, $tokens[$i2]->term, $tokens[$i3]->term), $language->language, $language->spacer); - $token->derived = true; - - // Add the token to the stack. - $tokens[] = $token; + $temp = array($tokens[$i]->term); + + // Create tokens for 2 to $tuplecount length phrases + for ($j = 1; $j < $tuplecount; $j++) + { + if ($i + $j >= $n || !isset($tokens[$i + $j])) + { + break; + } + + $temp[] = $tokens[$i + $j]->term; + $token = new FinderIndexerToken($temp, $language->language, $language->spacer); + $token->derived = true; + + // Add the token to the stack. + $tokens[] = $token; + } } } } diff --git a/administrator/components/com_finder/helpers/indexer/query.php b/administrator/components/com_finder/helpers/indexer/query.php index 730837b451037..cccea43cc0401 100644 --- a/administrator/components/com_finder/helpers/indexer/query.php +++ b/administrator/components/com_finder/helpers/indexer/query.php @@ -9,6 +9,7 @@ defined('_JEXEC') or die; +use Joomla\CMS\Component\ComponentHelper; use Joomla\Registry\Registry; use Joomla\String\StringHelper; use Joomla\Utilities\ArrayHelper; @@ -738,11 +739,12 @@ protected function processDates($date1, $date2, $when1, $when2) protected function processString($input, $lang, $mode) { // Clean up the input string. - $input = html_entity_decode($input, ENT_QUOTES, 'UTF-8'); - $input = StringHelper::strtolower($input); - $input = preg_replace('#\s+#mi', ' ', $input); - $input = trim($input); - $debug = JFactory::getConfig()->get('debug_lang'); + $input = html_entity_decode($input, ENT_QUOTES, 'UTF-8'); + $input = StringHelper::strtolower($input); + $input = preg_replace('#\s+#mi', ' ', $input); + $input = trim($input); + $debug = JFactory::getConfig()->get('debug_lang'); + $params = ComponentHelper::getParams('com_finder'); /* * First, we need to handle string based modifiers. String based @@ -900,51 +902,33 @@ protected function processString($input, $lang, $mode) // Get the number of words in the phrase. $parts = explode(' ', $match); + $tuplecount = $params->get('tuplecount', 1); - // Check if the phrase is longer than three words. - if (count($parts) > 3) + // Check if the phrase is longer than our $tuplecount. + if (count($parts) > $tuplecount && $tuplecount > 1) { + $chunk = array_slice($parts, 0, $tuplecount); + $parts = array_slice($parts, $tuplecount); + + // If the chunk is not empty, add it as a phrase. + if (count($chunk)) + { + $phrases[] = implode(' ', $chunk); + $terms[] = implode(' ', $chunk); + } + /* - * If the phrase is longer than three words, we need to + * If the phrase is longer than $tuplecount words, we need to * break it down into smaller chunks of phrases that - * are less than or equal to three words. We overlap + * are less than or equal to $tuplecount words. We overlap * the chunks so that we can ensure that a match is * found for the complete phrase and not just portions * of it. */ - for ($i = 0, $c = count($parts); $i < $c; $i += 2) + for ($i = 0, $c = count($parts); $i < $c; $i++) { - // Set up the chunk. - $chunk = array(); - - // The chunk has to be assembled based on how many - // pieces are available to use. - switch ($c - $i) - { - /* - * If only one word is left, we can break from - * the switch and loop because the last word - * was already used at the end of the last - * chunk. - */ - case 1: - break 2; - - // If there words are left, we use them both as - // the last chunk of the phrase and we're done. - case 2: - $chunk[] = $parts[$i]; - $chunk[] = $parts[$i + 1]; - break; - - // If there are three or more words left, we - // build a three word chunk and continue on. - default: - $chunk[] = $parts[$i]; - $chunk[] = $parts[$i + 1]; - $chunk[] = $parts[$i + 2]; - break; - } + array_shift($chunk); + $chunk[] = array_shift($parts); // If the chunk is not empty, add it as a phrase. if (count($chunk)) @@ -956,7 +940,7 @@ protected function processString($input, $lang, $mode) } else { - // The phrase is <= 3 words so we can use it as is. + // The phrase is <= $tuplecount words so we can use it as is. $phrases[] = $match; $terms[] = $match; } @@ -1050,7 +1034,7 @@ protected function processString($input, $lang, $mode) { // Tokenize the current term. $token = FinderIndexerHelper::tokenize($terms[$i], $lang, true); - $token = $this->getTokenData($token); + $token = $this->getTokenData(array_shift($token)); // Set the required flag. $token->required = false; @@ -1071,7 +1055,7 @@ protected function processString($input, $lang, $mode) // Tokenize the term after the next term (current plus two). $other = FinderIndexerHelper::tokenize($terms[$i + 2], $lang, true); - $other = $this->getTokenData($other); + $other = $this->getTokenData(array_shift($other)); // Set the required flag. $other->required = false; @@ -1116,7 +1100,7 @@ protected function processString($input, $lang, $mode) // Tokenize the next term (current plus one). $other = FinderIndexerHelper::tokenize($terms[$i + 1], $lang, true); - $other = $this->getTokenData($other); + $other = $this->getTokenData(array_shift($other)); // Set the required flag. $other->required = false; diff --git a/administrator/components/com_finder/tmpl/filters/default.php b/administrator/components/com_finder/tmpl/filters/default.php index b2a812f8a0cdd..84c8b90f39e62 100644 --- a/administrator/components/com_finder/tmpl/filters/default.php +++ b/administrator/components/com_finder/tmpl/filters/default.php @@ -33,25 +33,25 @@
+ + - - + + + + + +
+
checked_out) : ?> editor, $item->checked_out_time, 'groups.', $canCheckin); ?> @@ -141,7 +141,7 @@
- +
escape($item->access_level); ?>
- - - - - - @@ -82,7 +82,7 @@ - diff --git a/administrator/components/com_finder/tmpl/index/default.php b/administrator/components/com_finder/tmpl/index/default.php index 2b0331aedf941..e86ad52e1d305 100644 --- a/administrator/components/com_finder/tmpl/index/default.php +++ b/administrator/components/com_finder/tmpl/index/default.php @@ -33,25 +33,25 @@
+ - - + + + + + + +
state, $i, 'filters.', $canChange); ?> + checked_out) : ?> editor, $item->checked_out_time, 'filters.', $canCheckIn); ?> @@ -92,7 +92,7 @@ - + created_by_alias ?: $item->user_name; ?>
- - - - - - @@ -73,11 +73,11 @@ -
+ - - + + + + + + +
published, $i, 'index.', $canChange, 'cb'); ?> + - + t_title); diff --git a/administrator/components/com_finder/tmpl/maps/default.php b/administrator/components/com_finder/tmpl/maps/default.php index 4001393ea1f0b..8696db27378e4 100644 --- a/administrator/components/com_finder/tmpl/maps/default.php +++ b/administrator/components/com_finder/tmpl/maps/default.php @@ -34,26 +34,26 @@ - - - + - - @@ -75,28 +75,28 @@ - +
+ - - + + + - - + + - + + - + +
state, $i, 'maps.', $canChange, 'cb'); ?> - parent_title, '**') === 'Language') - { - $title = FinderHelperLanguage::branchLanguageTitle($item->title); - } - else - { - $key = FinderHelperLanguage::branchSingular($item->title); - $title = $lang->hasKey($key) ? JText::_($key) : $item->title; - } - ?> - num_children === 0) : ?> - - - - escape(trim($title, '**')) === 'Language' && JLanguageMultilang::isEnabled()) : ?> - - - + parent_title, '**') === 'Language') + { + $title = FinderHelperLanguage::branchLanguageTitle($item->title); + } + else + { + $key = FinderHelperLanguage::branchSingular($item->title); + $title = $lang->hasKey($key) ? JText::_($key) : $item->title; + } + ?> + num_children === 0) : ?> + + + + escape(trim($title, '**')) === 'Language' && JLanguageMultilang::isEnabled()) : ?> + + + num_children !== 0) : ?> diff --git a/administrator/components/com_finder/tmpl/searches/default.php b/administrator/components/com_finder/tmpl/searches/default.php index 85dae2f684728..aff3a964570ce 100644 --- a/administrator/components/com_finder/tmpl/searches/default.php +++ b/administrator/components/com_finder/tmpl/searches/default.php @@ -31,13 +31,13 @@ - - - @@ -52,9 +52,9 @@ items as $i => $item) : ?> - diff --git a/administrator/components/com_finder/tmpl/statistics/default.php b/administrator/components/com_finder/tmpl/statistics/default.php index 39c495af22602..484d4fa079235 100644 --- a/administrator/components/com_finder/tmpl/statistics/default.php +++ b/administrator/components/com_finder/tmpl/statistics/default.php @@ -19,10 +19,10 @@
+ + +
+ escape($item->searchterm); ?> - + hits; ?>
- - @@ -30,13 +30,13 @@ data->type_list as $type) : ?> - diff --git a/administrator/components/com_installer/tmpl/database/default.php b/administrator/components/com_installer/tmpl/database/default.php index b411d2ba19cdd..33c6c6bbd5cf3 100644 --- a/administrator/components/com_installer/tmpl/database/default.php +++ b/administrator/components/com_installer/tmpl/database/default.php @@ -37,37 +37,37 @@
+ +
+ type_title); $lang_string = JText::_($lang_key); echo $lang_string === $lang_key ? $type->type_title : $lang_string; ?> - + link_count, 0, JText::_('DECIMALS_SEPARATOR'), JText::_('THOUSANDS_SEPARATOR')); ?>
- - - - - - - - @@ -88,14 +88,14 @@ - diff --git a/administrator/components/com_installer/tmpl/discover/default.php b/administrator/components/com_installer/tmpl/discover/default.php index e2e6966d4a9a1..cbb0549a305e5 100644 --- a/administrator/components/com_installer/tmpl/discover/default.php +++ b/administrator/components/com_installer/tmpl/discover/default.php @@ -36,31 +36,31 @@
+ - - + + + + + + + + +
extension_id); ?> + - + client_translated; ?>
- - - - - - - - @@ -76,11 +76,11 @@ - diff --git a/administrator/components/com_installer/tmpl/languages/default.php b/administrator/components/com_installer/tmpl/languages/default.php index 9f074e7c6a162..c3ad0a396c307 100644 --- a/administrator/components/com_installer/tmpl/languages/default.php +++ b/administrator/components/com_installer/tmpl/languages/default.php @@ -29,17 +29,17 @@
+ - - + + + + + + + + +
extension_id); ?> + - + client_translated; ?>
- - + - - - @@ -66,9 +66,9 @@ detailsurl . '\'; Joomla.submitbutton(\'install.install\');'; ?> - + diff --git a/administrator/components/com_installer/tmpl/manage/default.php b/administrator/components/com_installer/tmpl/manage/default.php index 1e380cbfad310..3216b5d448eeb 100644 --- a/administrator/components/com_installer/tmpl/manage/default.php +++ b/administrator/components/com_installer/tmpl/manage/default.php @@ -35,37 +35,37 @@
+ + + +
- name; ?> - + name; ?> + code; ?>
- - - - - - - - - - @@ -90,13 +90,13 @@ status, $i, $item->status < 2, 'cb'); ?> - diff --git a/administrator/components/com_installer/tmpl/update/default.php b/administrator/components/com_installer/tmpl/update/default.php index 36634606fa3de..fbf6e96977148 100644 --- a/administrator/components/com_installer/tmpl/update/default.php +++ b/administrator/components/com_installer/tmpl/update/default.php @@ -36,31 +36,31 @@
+ - - + + + + + + + + + + +
+ - + client_translated; ?>
- - - - - - - - @@ -83,13 +83,13 @@ - diff --git a/administrator/components/com_installer/tmpl/updatesites/default.php b/administrator/components/com_installer/tmpl/updatesites/default.php index 9727fec11102c..c96baf08883a2 100644 --- a/administrator/components/com_installer/tmpl/updatesites/default.php +++ b/administrator/components/com_installer/tmpl/updatesites/default.php @@ -29,28 +29,28 @@
+ - - + + + + + + + + +
update_id); ?> + - + client_translated; ?>
- - - - - - - @@ -75,7 +75,7 @@ enabled, $i, $item->enabled < 2, 'cb'); ?> -
+ - - + + + + + + + +
+ - + name; ?> diff --git a/administrator/components/com_installer/tmpl/warnings/default.php b/administrator/components/com_installer/tmpl/warnings/default.php index 47bd4fbd7767a..a5415eb9d412f 100644 --- a/administrator/components/com_installer/tmpl/warnings/default.php +++ b/administrator/components/com_installer/tmpl/warnings/default.php @@ -28,7 +28,6 @@

-
diff --git a/administrator/components/com_languages/tmpl/installed/default.php b/administrator/components/com_languages/tmpl/installed/default.php index 47286ba626eba..0ae5fb5fa2114 100644 --- a/administrator/components/com_languages/tmpl/installed/default.php +++ b/administrator/components/com_languages/tmpl/installed/default.php @@ -37,34 +37,34 @@ - - - - - - - - - @@ -89,11 +89,11 @@ - diff --git a/administrator/components/com_languages/tmpl/languages/default.php b/administrator/components/com_languages/tmpl/languages/default.php index 0e06fb065050f..056bf84d1d5af 100644 --- a/administrator/components/com_languages/tmpl/languages/default.php +++ b/administrator/components/com_languages/tmpl/languages/default.php @@ -44,37 +44,37 @@
+   - - + + + + + + + + + +
language); ?> + - + escape($row->nativeName); ?>
- - - - - - - - - - @@ -119,7 +119,7 @@ - diff --git a/administrator/components/com_languages/tmpl/overrides/default.php b/administrator/components/com_languages/tmpl/overrides/default.php index 580cf82ce68de..e8cd38283170e 100644 --- a/administrator/components/com_languages/tmpl/overrides/default.php +++ b/administrator/components/com_languages/tmpl/overrides/default.php @@ -55,19 +55,19 @@
+ + - - + + + + + + + + + +
published, $i, 'languages.', $canChange); ?> + @@ -128,7 +128,7 @@ escape($item->title); ?> - + escape($item->title_native); ?>
- - - - @@ -87,14 +87,14 @@ - diff --git a/administrator/components/com_menus/tmpl/items/default.php b/administrator/components/com_menus/tmpl/items/default.php index d753bc32e63f1..4d5afcd065733 100644 --- a/administrator/components/com_menus/tmpl/items/default.php +++ b/administrator/components/com_menus/tmpl/items/default.php @@ -63,43 +63,43 @@ - - - - state->get('filter.client_id') == 0) : ?> - state->get('filter.client_id') == 0) : ?> - - state->get('filter.client_id') == 0) && (Multilanguage::isEnabled())) : ?> - - @@ -184,7 +184,7 @@ $published = $item->protected ? 3 : $item->published; echo HTMLHelper::_('menus.state', $published, $i, $canChange && !$item->protected, 'cb'); ?> - diff --git a/administrator/components/com_menus/tmpl/items/modal.php b/administrator/components/com_menus/tmpl/items/modal.php index 0f4ef92ea54ab..6f0d6feb4ed6a 100644 --- a/administrator/components/com_menus/tmpl/items/modal.php +++ b/administrator/components/com_menus/tmpl/items/modal.php @@ -56,25 +56,25 @@
+ - - + + + + +
+ escape($key); ?> escape($key); ?> - + escape($text); ?>
+ + - - + + + + + + + + +
+ $item->level)); ?> checked_out) : ?> @@ -217,7 +217,7 @@ title="item_type_desc) ? htmlspecialchars($this->escape($item->item_type_desc), ENT_COMPAT, 'UTF-8') : ''; ?>"> escape($item->item_type); ?> - + escape($item->menutype_title ?: ucwords($item->menutype)); ?>
- - - - - - - @@ -109,7 +109,7 @@ - diff --git a/administrator/components/com_menus/tmpl/menus/default.php b/administrator/components/com_menus/tmpl/menus/default.php index 93f6069e419e0..d56468329ce96 100644 --- a/administrator/components/com_menus/tmpl/menus/default.php +++ b/administrator/components/com_menus/tmpl/menus/default.php @@ -54,29 +54,29 @@
+ + + + + + +
published, $i, 0); ?> + $item->level)); ?> @@ -131,7 +131,7 @@ escape($item->item_type); ?> - + escape($item->menutype_title); ?>
- - - - - - @@ -97,7 +97,7 @@ -