diff --git a/administrator/components/com_associations/Field/Modal/AssociationField.php b/administrator/components/com_associations/Field/Modal/AssociationField.php index 02de1179ad6f6..d75d9f08f594c 100644 --- a/administrator/components/com_associations/Field/Modal/AssociationField.php +++ b/administrator/components/com_associations/Field/Modal/AssociationField.php @@ -69,11 +69,11 @@ protected function getInput() // Clear association button $html[] = '' - . ' ' . \JText::_('JCLEAR') - . ''; + . ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"' + . ' onclick="return Joomla.submitbutton(\'undo-association\');"' + . ' id="remove-assoc">' + . ' ' . \JText::_('JCLEAR') + . ''; $html[] = ''; diff --git a/administrator/components/com_config/Field/FiltersField.php b/administrator/components/com_config/Field/FiltersField.php index 82416875bb9dd..5867959ce2ad3 100644 --- a/administrator/components/com_config/Field/FiltersField.php +++ b/administrator/components/com_config/Field/FiltersField.php @@ -55,16 +55,13 @@ protected function getInput() $html[] = ' ' . \JText::_('JGLOBAL_FILTER_GROUPS_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . \JText::_('JGLOBAL_FILTER_TYPE_LABEL') . ''; + $html[] = ' ' . \JText::_('JGLOBAL_FILTER_TYPE_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . ''; + $html[] = ' ' . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . ''; $html[] = ' '; $html[] = ' '; - $html[] = ' ' - . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . ''; + $html[] = ' ' . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . ''; $html[] = ' '; $html[] = ' '; $html[] = ' '; @@ -111,7 +108,6 @@ protected function getInput() . ' name="' . $this->name . '[' . $group->value . '][filter_tags]"' . ' type="text"' . ' id="' . $this->id . $group->value . '_filter_tags" class="novalidate form-control"' - . ' title="' . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '"' . ' value="' . $group_filter['filter_tags'] . '"' . '>'; $html[] = ' '; @@ -120,7 +116,6 @@ protected function getInput() . ' name="' . $this->name . '[' . $group->value . '][filter_attributes]"' . ' type="text"' . ' id="' . $this->id . $group->value . '_filter_attributes" class="novalidate form-control"' - . ' title="' . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '"' . ' value="' . $group_filter['filter_attributes'] . '"' . '>'; $html[] = ' '; diff --git a/administrator/components/com_config/Model/ApplicationModel.php b/administrator/components/com_config/Model/ApplicationModel.php index eaf21b316dea6..c661faf8e0923 100644 --- a/administrator/components/com_config/Model/ApplicationModel.php +++ b/administrator/components/com_config/Model/ApplicationModel.php @@ -730,7 +730,6 @@ public function storePermissions($permission = null) return false; } - // All checks done. $result = array( 'text' => '', diff --git a/administrator/components/com_content/services/provider.php b/administrator/components/com_content/services/provider.php index 4e1557bdea22e..42b6537f735c0 100644 --- a/administrator/components/com_content/services/provider.php +++ b/administrator/components/com_content/services/provider.php @@ -19,7 +19,6 @@ use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface; use Joomla\Component\Content\Administrator\Extension\ContentComponent; use Joomla\Component\Content\Administrator\Helper\AssociationsHelper; -use Joomla\Component\Content\Administrator\Service\Provider\Component; use Joomla\Component\Content\Site\Service\Category; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; diff --git a/administrator/components/com_content/tmpl/article/edit.php b/administrator/components/com_content/tmpl/article/edit.php index 79d11bb1416dc..6cae1bc2d5eab 100644 --- a/administrator/components/com_content/tmpl/article/edit.php +++ b/administrator/components/com_content/tmpl/article/edit.php @@ -21,7 +21,7 @@ $this->ignore_fieldsets = array('jmetadata', 'item_associations'); // Create shortcut to parameters. -$params = clone($this->state->get('params')); +$params = clone $this->state->get('params'); $params->merge(new Registry($this->item->attribs)); $app = JFactory::getApplication(); diff --git a/administrator/components/com_fields/Plugin/FieldsListPlugin.php b/administrator/components/com_fields/Plugin/FieldsListPlugin.php index c662aa403c2ad..d0a1aae0c16f8 100644 --- a/administrator/components/com_fields/Plugin/FieldsListPlugin.php +++ b/administrator/components/com_fields/Plugin/FieldsListPlugin.php @@ -65,7 +65,7 @@ public function getOptionsFromField($field) $data = array(); // Fetch the options from the plugin - $params = clone($this->params); + $params = clone $this->params; $params->merge($field->fieldparams); foreach ($params->get('options', array()) as $option) diff --git a/administrator/components/com_languages/Model/OverrideModel.php b/administrator/components/com_languages/Model/OverrideModel.php index 4abf61fad8e7e..a04bccf5f7a4e 100644 --- a/administrator/components/com_languages/Model/OverrideModel.php +++ b/administrator/components/com_languages/Model/OverrideModel.php @@ -48,7 +48,7 @@ public function getForm($data = array(), $loadData = true) if (!$langName) { - // If a language only exists in frontend, it's meta data cannot be + // If a language only exists in frontend, its metadata cannot be // loaded in backend at the moment, so fall back to the language tag. $langName = $language; } diff --git a/administrator/components/com_menus/layouts/joomla/menu/edit_modules.php b/administrator/components/com_menus/layouts/joomla/menu/edit_modules.php index 256a76125027b..839274aa82ba8 100644 --- a/administrator/components/com_menus/layouts/joomla/menu/edit_modules.php +++ b/administrator/components/com_menus/layouts/joomla/menu/edit_modules.php @@ -1,6 +1,6 @@ escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?> - escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?> + escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?> diff --git a/administrator/components/com_plugins/forms/plugin.xml b/administrator/components/com_plugins/forms/plugin.xml index 02b24768f24fa..3e592fa4072f9 100644 --- a/administrator/components/com_plugins/forms/plugin.xml +++ b/administrator/components/com_plugins/forms/plugin.xml @@ -37,7 +37,7 @@ diff --git a/administrator/components/com_redirect/layouts/toolbar/batch.php b/administrator/components/com_redirect/layouts/toolbar/batch.php index 7d37df9147d7c..54e503019d1ec 100644 --- a/administrator/components/com_redirect/layouts/toolbar/batch.php +++ b/administrator/components/com_redirect/layouts/toolbar/batch.php @@ -15,6 +15,6 @@ ?> diff --git a/administrator/components/com_templates/tmpl/template/default_modal_delete_body.php b/administrator/components/com_templates/tmpl/template/default_modal_delete_body.php index a482b47a6273d..fd4641647386c 100644 --- a/administrator/components/com_templates/tmpl/template/default_modal_delete_body.php +++ b/administrator/components/com_templates/tmpl/template/default_modal_delete_body.php @@ -11,8 +11,8 @@ ?>
-
-

fileName); ?>

-
+
+

fileName); ?>

+
\ No newline at end of file diff --git a/administrator/components/com_users/tmpl/users/default_batch_body.php b/administrator/components/com_users/tmpl/users/default_batch_body.php index 1dba33629206b..c544ca2449fab 100644 --- a/administrator/components/com_users/tmpl/users/default_batch_body.php +++ b/administrator/components/com_users/tmpl/users/default_batch_body.php @@ -25,23 +25,21 @@ ?>
-
-
-
diff --git a/administrator/language/en-GB/en-GB.com_finder.ini b/administrator/language/en-GB/en-GB.com_finder.ini index 7ad39d62fae75..e6980579faa03 100644 --- a/administrator/language/en-GB/en-GB.com_finder.ini +++ b/administrator/language/en-GB/en-GB.com_finder.ini @@ -17,7 +17,7 @@ COM_FINDER_CONFIG_FIELD_OPENSEARCH_NAME_LABEL="OpenSearch Name" COM_FINDER_CONFIG_GATHER_SEARCH_STATISTICS_LABEL="Gather Search Statistics" COM_FINDER_CONFIG_HILIGHT_CONTENT_SEARCH_TERMS_LABEL="Highlight Search Terms" COM_FINDER_CONFIG_MEMORY_TABLE_LIMIT_LABEL="Memory Table Limit" -COM_FINDER_CONFIG_META_MULTIPLIER_LABEL="Meta Data Weight Multiplier" +COM_FINDER_CONFIG_META_MULTIPLIER_LABEL="Metadata Weight Multiplier" COM_FINDER_CONFIG_MISC_MULTIPLIER_LABEL="Misc. Text Weight Multiplier" COM_FINDER_CONFIG_PATH_MULTIPLIER_LABEL="Path Text Weight Multiplier" COM_FINDER_CONFIG_SHOW_ADVANCED_LABEL="Advanced Search" diff --git a/administrator/language/en-GB/en-GB.com_menus.ini b/administrator/language/en-GB/en-GB.com_menus.ini index ed4030525f0dd..5aec5c31c1f0c 100644 --- a/administrator/language/en-GB/en-GB.com_menus.ini +++ b/administrator/language/en-GB/en-GB.com_menus.ini @@ -74,7 +74,7 @@ COM_MENUS_HTML_UNPUBLISH_URL="Unpublish the URL menu item" COM_MENUS_INTEGRATION_FIELDSET_LABEL="Integration" COM_MENUS_ITEM_DETAILS="Details" COM_MENUS_ITEM_FIELD_ALIAS_MENU_LABEL="Menu Item" -COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL="Link CSS Style" +COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL="Link Class" COM_MENUS_ITEM_FIELD_ANCHOR_TITLE_LABEL="Link Title Attribute" COM_MENUS_ITEM_FIELD_ANCHOR_REL_LABEL="Link Rel Attribute" COM_MENUS_ITEM_FIELD_ASSIGNED_LABEL=" Menu" diff --git a/administrator/language/en-GB/en-GB.lib_joomla.ini b/administrator/language/en-GB/en-GB.lib_joomla.ini index 6c0ed87ba3d4a..01b08e6af2ccf 100644 --- a/administrator/language/en-GB/en-GB.lib_joomla.ini +++ b/administrator/language/en-GB/en-GB.lib_joomla.ini @@ -387,6 +387,7 @@ JLIB_HTML_BEHAVIOR_HOLD_MOUSE="- Hold mouse button on any of the buttons above f JLIB_HTML_BEHAVIOR_MONTH_SELECT="- Use the < and > buttons to select month\n" JLIB_HTML_BEHAVIOR_NEXT_MONTH_HOLD_FOR_MENU="Select to move to the next month. Select and hold for a list of the months." JLIB_HTML_BEHAVIOR_NEXT_YEAR_HOLD_FOR_MENU="Select to move to the next year. Select and hold for a list of years." +JLIB_HTML_BEHAVIOR_OPEN_CALENDAR="Open the calendar" JLIB_HTML_BEHAVIOR_PREV_MONTH_HOLD_FOR_MENU="Select to move to the previous month. Select and hold for a list of the months." JLIB_HTML_BEHAVIOR_PREV_YEAR_HOLD_FOR_MENU="Select to move to the previous year. Select and hold for a list of years." JLIB_HTML_BEHAVIOR_SELECT_DATE="Select a date." diff --git a/administrator/language/en-GB/en-GB.plg_fields_sql.ini b/administrator/language/en-GB/en-GB.plg_fields_sql.ini index 32294ec0cd79b..e71b9f4ec110e 100644 --- a/administrator/language/en-GB/en-GB.plg_fields_sql.ini +++ b/administrator/language/en-GB/en-GB.plg_fields_sql.ini @@ -10,5 +10,5 @@ PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL="Multiple" ; In the string below the terms 'value' and 'text' should not be translated 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' containing the text in the dropdown list." PLG_FIELDS_SQL_PARAMS_QUERY_LABEL="Query" -PLG_FIELDS_SQL_RULES_ADAPTED="For increased security the edit permission for this SQL fields was set to denied for all non Super Users." +PLG_FIELDS_SQL_RULES_ADAPTED="For increased security the edit permission for this SQL field was set to denied for all non Super Users." PLG_FIELDS_SQL_XML_DESCRIPTION="This plugin lets you create new fields of type 'sql' in any extensions where custom fields are supported." diff --git a/build/stubGenerator.php b/build/stubGenerator.php index f8ab4f14462b6..d25ed373826c2 100644 --- a/build/stubGenerator.php +++ b/build/stubGenerator.php @@ -57,23 +57,34 @@ class StubGenerator extends CliApplication */ public function doExecute() { - // Get the aliased class names via Reflection as the property is protected - $refl = new ReflectionClass('JLoader'); - $property = $refl->getProperty('classAliases'); - $property->setAccessible(true); - $aliases = $property->getValue(); - $file = " $newName) + foreach (JLoader::getDeprecatedAliases() as $alias) { + $oldName = $alias['old']; + $newName = $alias['new']; + $deprecatedVersion = $alias['version']; + // Figure out if the alias is for a class or interface $reflection = new ReflectionClass($newName); - $type = $reflection->isInterface() ? 'interface' : 'class'; - $modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? 'abstract ' : ''; + $type = $reflection->isInterface() ? 'interface' : 'class'; + $modifier = (!$reflection->isInterface() && $reflection->isFinal()) ? 'final ' : ''; + $modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? $modifier . 'abstract ' : $modifier; + + // If a deprecated version is available, write a stub class doc block with a deprecated tag + if ($deprecatedVersion !== false) + { + $file .= <<
- - item['title'] ?> + + item['title']; ?>    - - item['module'] ?> + + item['module']; ?>

diff --git a/components/com_contact/Controller/ContactController.php b/components/com_contact/Controller/ContactController.php index c1da456ba6932..a25bb8b5a3474 100644 --- a/components/com_contact/Controller/ContactController.php +++ b/components/com_contact/Controller/ContactController.php @@ -175,68 +175,72 @@ public function submit() */ private function _sendEmail($data, $contact, $copy_email_activated) { - $app = $this->app; + $app = $this->app; - if ($contact->email_to == '' && $contact->user_id != 0) - { - $contact_user = \JUser::getInstance($contact->user_id); - $contact->email_to = $contact_user->get('email'); - } + if ($contact->email_to == '' && $contact->user_id != 0) + { + $contact_user = \JUser::getInstance($contact->user_id); + $contact->email_to = $contact_user->get('email'); + } - $mailfrom = $app->get('mailfrom'); - $fromname = $app->get('fromname'); - $sitename = $app->get('sitename'); + $mailfrom = $app->get('mailfrom'); + $fromname = $app->get('fromname'); + $sitename = $app->get('sitename'); - $name = $data['contact_name']; - $email = \JStringPunycode::emailToPunycode($data['contact_email']); - $subject = $data['contact_subject']; - $body = $data['contact_message']; + $name = $data['contact_name']; + $email = \JStringPunycode::emailToPunycode($data['contact_email']); + $subject = $data['contact_subject']; + $body = $data['contact_message']; - // Prepare email body - $prefix = \JText::sprintf('COM_CONTACT_ENQUIRY_TEXT', \JUri::base()); - $body = $prefix . "\n" . $name . ' <' . $email . '>' . "\r\n\r\n" . stripslashes($body); + // Prepare email body + $prefix = \JText::sprintf('COM_CONTACT_ENQUIRY_TEXT', \JUri::base()); + $body = $prefix . "\n" . $name . ' <' . $email . '>' . "\r\n\r\n" . stripslashes($body); - // Load the custom fields - if (!empty($data['com_fields']) && $fields = \FieldsHelper::getFields('com_contact.mail', $contact, true, $data['com_fields'])) + // Load the custom fields + if (!empty($data['com_fields']) && $fields = \FieldsHelper::getFields('com_contact.mail', $contact, true, $data['com_fields'])) + { + $output = \FieldsHelper::render( + 'com_contact.mail', + 'fields.render', + array( + 'context' => 'com_contact.mail', + 'item' => $contact, + 'fields' => $fields + ) + ); + + if ($output) { - $output = \FieldsHelper::render( - 'com_contact.mail', - 'fields.render', - array('context' => 'com_contact.mail', 'item' => $contact, 'fields' => $fields) - ); - - if ($output) - { - $body .= "\r\n\r\n" . $output; - } + $body .= "\r\n\r\n" . $output; } + } + + $mail = \JFactory::getMailer(); + $mail->addRecipient($contact->email_to); + $mail->addReplyTo($email, $name); + $mail->setSender(array($mailfrom, $fromname)); + $mail->setSubject($sitename . ': ' . $subject); + $mail->setBody($body); + $sent = $mail->Send(); + + // If we are supposed to copy the sender, do so. + + // Check whether email copy function activated + if ($copy_email_activated == true && !empty($data['contact_email_copy'])) + { + $copytext = \JText::sprintf('COM_CONTACT_COPYTEXT_OF', $contact->name, $sitename); + $copytext .= "\r\n\r\n" . $body; + $copysubject = \JText::sprintf('COM_CONTACT_COPYSUBJECT_OF', $subject); $mail = \JFactory::getMailer(); - $mail->addRecipient($contact->email_to); + $mail->addRecipient($email); $mail->addReplyTo($email, $name); $mail->setSender(array($mailfrom, $fromname)); - $mail->setSubject($sitename . ': ' . $subject); - $mail->setBody($body); + $mail->setSubject($copysubject); + $mail->setBody($copytext); $sent = $mail->Send(); + } - // If we are supposed to copy the sender, do so. - - // Check whether email copy function activated - if ($copy_email_activated == true && !empty($data['contact_email_copy'])) - { - $copytext = \JText::sprintf('COM_CONTACT_COPYTEXT_OF', $contact->name, $sitename); - $copytext .= "\r\n\r\n" . $body; - $copysubject = \JText::sprintf('COM_CONTACT_COPYSUBJECT_OF', $subject); - - $mail = \JFactory::getMailer(); - $mail->addRecipient($email); - $mail->addReplyTo($email, $name); - $mail->setSender(array($mailfrom, $fromname)); - $mail->setSubject($copysubject); - $mail->setBody($copytext); - $sent = $mail->Send(); - } - - return $sent; + return $sent; } } diff --git a/components/com_contact/Model/CategoryModel.php b/components/com_contact/Model/CategoryModel.php index f228ff05093b7..cd8e174205441 100644 --- a/components/com_contact/Model/CategoryModel.php +++ b/components/com_contact/Model/CategoryModel.php @@ -100,6 +100,7 @@ public function getItems() for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; + if (!isset($this->_params)) { $item->params = new Registry($item->params); @@ -181,6 +182,7 @@ protected function getListQuery() // Filter by search in title $search = $this->getState('list.filter'); + if (!empty($search)) { $search = $db->quote('%' . $db->escape($search, true) . '%'); @@ -259,10 +261,12 @@ protected function populateState($ordering = null, $direction = null) $mergedParams->merge($menuParams); $orderCol = $app->input->get('filter_order', $mergedParams->get('initial_sort', 'ordering')); + if (!in_array($orderCol, $this->filter_fields)) { $orderCol = 'ordering'; } + $this->setState('list.ordering', $orderCol); $listOrder = $app->input->get('filter_order_Dir', 'ASC'); @@ -319,6 +323,7 @@ public function getCategory() $options['countItems'] = $params->get('show_cat_items', 1) || $params->get('show_empty_categories', 0); $categories = \JCategories::getInstance('Contact', $options); $this->_item = $categories->get($this->getState('category.id', 'root')); + if (is_object($this->_item)) { $this->_children = $this->_item->getChildren(); diff --git a/components/com_contact/Model/ContactModel.php b/components/com_contact/Model/ContactModel.php index d3f88c0524a30..4c6976e893628 100644 --- a/components/com_contact/Model/ContactModel.php +++ b/components/com_contact/Model/ContactModel.php @@ -203,6 +203,7 @@ public function getItem($pk = null) // Filter by published state. $published = $this->getState('filter.published'); $archived = $this->getState('filter.archived'); + if (is_numeric($published)) { $query->where('(a.published = ' . (int) $published . ' OR a.published =' . (int) $archived . ')') @@ -247,7 +248,6 @@ public function getItem($pk = null) // Compute access permissions. if (($access = $this->getState('filter.access'))) { - // If the access filter has been set, we already know this user can view. $data->params->set('access-view', true); } @@ -311,7 +311,6 @@ protected function buildContactExtendedData($contact) // Get the com_content articles by the linked user if ((int) $contact->user_id && $this->getState('params')->get('show_articles')) { - $query->select('a.id') ->select('a.title') ->select('a.state') @@ -466,7 +465,6 @@ protected function getContactQuery($pk = null) if ($result) { - $contactParams = new Registry($result->params); // If we are showing a contact list, then the contact parameters take priority diff --git a/components/com_contact/Model/FeaturedModel.php b/components/com_contact/Model/FeaturedModel.php index 5a070e60d4432..bc56549b9cb4f 100644 --- a/components/com_contact/Model/FeaturedModel.php +++ b/components/com_contact/Model/FeaturedModel.php @@ -61,6 +61,7 @@ public function getItems() for ($i = 0, $n = count($items); $i < $n; $i++) { $item = &$items[$i]; + if (!isset($this->_params)) { $item->params = new Registry($item->params); @@ -105,6 +106,7 @@ protected function getListQuery() // Filter by state $state = $this->getState('filter.published'); + if (is_numeric($state)) { $query->where('a.published = ' . (int) $state); @@ -155,20 +157,25 @@ protected function populateState($ordering = null, $direction = null) $this->setState('list.start', $limitstart); $orderCol = $app->input->get('filter_order', 'ordering'); + if (!in_array($orderCol, $this->filter_fields)) { $orderCol = 'ordering'; } + $this->setState('list.ordering', $orderCol); $listOrder = $app->input->get('filter_order_Dir', 'ASC'); + if (!in_array(strtoupper($listOrder), array('ASC', 'DESC', ''))) { $listOrder = 'ASC'; } + $this->setState('list.direction', $listOrder); $user = \JFactory::getUser(); + if ((!$user->authorise('core.edit.state', 'com_contact')) && (!$user->authorise('core.edit', 'com_contact'))) { // Limit to published for people who can't edit or edit.state. diff --git a/components/com_contact/View/Contact/HtmlView.php b/components/com_contact/View/Contact/HtmlView.php index 9ceabfed91c25..3db4077703aec 100644 --- a/components/com_contact/View/Contact/HtmlView.php +++ b/components/com_contact/View/Contact/HtmlView.php @@ -119,7 +119,7 @@ public function display($tpl = null) $state = $this->get('State'); $item = $this->get('Item'); $this->form = $this->get('Form'); - $params = $state->get('params'); + $params = $state->get('params'); $temp = clone $params; @@ -418,6 +418,7 @@ public function display($tpl = null) } $this->_prepareDocument(); + return parent::display($tpl); } diff --git a/components/com_contact/View/Contact/VcfView.php b/components/com_contact/View/Contact/VcfView.php index 039f6e866e345..c251d753d6a65 100644 --- a/components/com_contact/View/Contact/VcfView.php +++ b/components/com_contact/View/Contact/VcfView.php @@ -53,13 +53,14 @@ public function display($tpl = null) // e.g. "de Gaulle, Charles" $namearray = explode(',', $item->name); - if (count($namearray) > 1 ) + if (count($namearray) > 1) { $lastname = $namearray[0]; $card_name = $lastname; $name_and_midname = trim($namearray[1]); $firstname = ''; + if (!empty($name_and_midname)) { $namearray = explode(' ', $name_and_midname); diff --git a/components/com_content/Controller/ArticleController.php b/components/com_content/Controller/ArticleController.php index 4271867042d7f..07602fc26ff3a 100644 --- a/components/com_content/Controller/ArticleController.php +++ b/components/com_content/Controller/ArticleController.php @@ -375,7 +375,7 @@ public function save($key = null, $urlVar = 'a_id') if (Multilanguage::isEnabled()) { $item = $app->getMenu()->getItem($menuitem); - $lang = !is_null($item) && $item->language != '*' ? '&lang=' . $item->language : ''; + $lang = !is_null($item) && $item->language != '*' ? '&lang=' . $item->language : ''; } // If ok, redirect to the return page. diff --git a/components/com_content/Helper/QueryHelper.php b/components/com_content/Helper/QueryHelper.php index 4fb5e0bb7a833..d4b0616a7e762 100644 --- a/components/com_content/Helper/QueryHelper.php +++ b/components/com_content/Helper/QueryHelper.php @@ -121,6 +121,7 @@ public static function orderbySecondary($orderby, $orderDate = 'created') case 'vote' : $orderby = 'a.id DESC '; + if (PluginHelper::isEnabled('content', 'vote')) { $orderby = 'rating_count DESC '; @@ -129,6 +130,7 @@ public static function orderbySecondary($orderby, $orderDate = 'created') case 'rvote' : $orderby = 'a.id ASC '; + if (PluginHelper::isEnabled('content', 'vote')) { $orderby = 'rating_count ASC '; @@ -137,6 +139,7 @@ public static function orderbySecondary($orderby, $orderDate = 'created') case 'rank' : $orderby = 'a.id DESC '; + if (PluginHelper::isEnabled('content', 'vote')) { $orderby = 'rating DESC '; @@ -145,6 +148,7 @@ public static function orderbySecondary($orderby, $orderDate = 'created') case 'rrank' : $orderby = 'a.id ASC '; + if (PluginHelper::isEnabled('content', 'vote')) { $orderby = 'rating ASC '; diff --git a/components/com_content/Model/ArchiveModel.php b/components/com_content/Model/ArchiveModel.php index 7f9cb52229f79..8242cef0c264e 100644 --- a/components/com_content/Model/ArchiveModel.php +++ b/components/com_content/Model/ArchiveModel.php @@ -197,6 +197,7 @@ public function getYears() ->order('1 ASC'); $db->setQuery($query); + return $db->loadColumn(); } diff --git a/components/com_content/Model/ArticlesModel.php b/components/com_content/Model/ArticlesModel.php index b1262e656f750..6738edbb3271e 100644 --- a/components/com_content/Model/ArticlesModel.php +++ b/components/com_content/Model/ArticlesModel.php @@ -525,6 +525,7 @@ protected function getListQuery() { ArrayHelper::toInteger($tagId); $tagId = implode(',', $tagId); + if (!empty($tagId)) { $hasTag = true; diff --git a/components/com_content/View/Article/HtmlView.php b/components/com_content/View/Article/HtmlView.php index 100c89fde7f48..3c1776d24e00b 100644 --- a/components/com_content/View/Article/HtmlView.php +++ b/components/com_content/View/Article/HtmlView.php @@ -199,6 +199,7 @@ public function display($tpl = null) { $app->enqueueMessage(\JText::_('JERROR_ALERTNOAUTHOR'), 'error'); $app->setHeader('status', 403, true); + return; } } diff --git a/components/com_content/View/Category/FeedView.php b/components/com_content/View/Category/FeedView.php index 78525d6e718b3..efe69d2350176 100644 --- a/components/com_content/View/Category/FeedView.php +++ b/components/com_content/View/Category/FeedView.php @@ -46,7 +46,7 @@ protected function reconcileNames($item) if (isset($introImage) && ($introImage != '')) { - $image = preg_match('/http/', $introImage)? $introImage : \JURI::root() . $introImage; + $image = preg_match('/http/', $introImage) ? $introImage : \JURI::root() . $introImage; $item->description = '

'; } diff --git a/components/com_content/View/Featured/FeedView.php b/components/com_content/View/Featured/FeedView.php index 8fa540baad448..af41f99e6936e 100644 --- a/components/com_content/View/Featured/FeedView.php +++ b/components/com_content/View/Featured/FeedView.php @@ -68,7 +68,7 @@ public function display($tpl = null) if (isset($introImage) && ($introImage != '')) { - $image = preg_match('/http/', $introImage)? $introImage : JURI::root() . $introImage; + $image = preg_match('/http/', $introImage) ? $introImage : JURI::root() . $introImage; $description = '

'; } diff --git a/components/com_content/View/Featured/HtmlView.php b/components/com_content/View/Featured/HtmlView.php index 520aa33626313..17d818a56f8d8 100644 --- a/components/com_content/View/Featured/HtmlView.php +++ b/components/com_content/View/Featured/HtmlView.php @@ -76,7 +76,7 @@ class HtmlView extends BaseHtmlView * @var \JDatabaseDriver * @since 3.6.3 */ - protected $db; + protected $db; /** * The user object diff --git a/components/com_finder/Model/SearchModel.php b/components/com_finder/Model/SearchModel.php index 9cc4695061625..cac17f5eb3791 100644 --- a/components/com_finder/Model/SearchModel.php +++ b/components/com_finder/Model/SearchModel.php @@ -301,11 +301,13 @@ protected function getListQuery() $query->where($db->quoteName('l.start_date') . ' = ' . $date2); } } + // Filter by language if ($this->getState('filter.language')) { $query->where('l.language IN (' . $db->quote(\JFactory::getLanguage()->getTag()) . ', ' . $db->quote('*') . ')'); } + // Push the data into cache. $this->store($store, $query, false); @@ -387,6 +389,7 @@ protected function getResultsTotal() { $maps[$suffix] = array(); } + // Add the terms to the mapping group. $maps[$suffix] = array_merge($maps[$suffix], $ids); } @@ -568,6 +571,7 @@ protected function getResultsTotal() continue; } + // Otherwise, end the loop. { // Merge the found items. @@ -789,6 +793,7 @@ protected function getResultsData() // Sort the results. natcasesort($items); + if ($direction === 'DESC') { $items = array_reverse($items, true); @@ -897,7 +902,8 @@ protected function getResultsData() $more = false; } - // End do-while loop. + + // End do-while loop. } while ($more === true); @@ -962,12 +968,13 @@ protected function getExcludedLinkIds() * Iterate through the mapping groups and load the excluded links ids * from each mapping table. */ + // Create a new query object. $db = $this->getDbo(); $query = $db->getQuery(true); + foreach ($maps as $suffix => $ids) { - // Create the query to get the links ids. $query->clear() ->select('link_id') @@ -1106,6 +1113,7 @@ protected function populateState($ordering = null, $direction = null) */ $order = $input->getWord('filter_order', $params->get('sort_order', 'relevance')); $order = StringHelper::strtolower($order); + switch ($order) { case 'date': @@ -1137,6 +1145,7 @@ protected function populateState($ordering = null, $direction = null) */ $dirn = $input->getWord('filter_order_Dir', $params->get('sort_direction', 'desc')); $dirn = StringHelper::strtolower($dirn); + switch ($dirn) { case 'asc': diff --git a/components/com_finder/View/Search/HtmlView.php b/components/com_finder/View/Search/HtmlView.php index 165c4eb6d7ecf..d71402ff42169 100644 --- a/components/com_finder/View/Search/HtmlView.php +++ b/components/com_finder/View/Search/HtmlView.php @@ -173,6 +173,7 @@ public function display($tpl = null) // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); + if (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) diff --git a/components/com_finder/helpers/html/filter.php b/components/com_finder/helpers/html/filter.php index 56fbdd9a4d47e..8e684e22a9762 100644 --- a/components/com_finder/helpers/html/filter.php +++ b/components/com_finder/helpers/html/filter.php @@ -148,6 +148,7 @@ public static function slider($options = array()) // Translate node titles if possible. $lang = JFactory::getLanguage(); + foreach ($nodes as $nk => $nv) { if (trim($nv->parent_title, '**') === 'Language') @@ -159,6 +160,7 @@ public static function slider($options = array()) $key = FinderHelperLanguage::branchPlural($nv->title); $title = $lang->hasKey($key) ? JText::_($key) : $nv->title; } + $nodes[$nk]->title = $title; } @@ -190,8 +192,10 @@ public static function slider($options = array()) $html .= ''; $html .= '
'; } + $html .= JHtml::_('bootstrap.endSlide'); } + $html .= JHtml::_('bootstrap.endAccordion'); return $html; @@ -336,6 +340,7 @@ public static function select($idxQuery, $options) // Translate branch nodes if possible. $language = JFactory::getLanguage(); + foreach ($branches[$bk]->nodes as $node_id => $node) { if (trim($node->parent_title, '**') === 'Language') @@ -347,6 +352,7 @@ public static function select($idxQuery, $options) $key = FinderHelperLanguage::branchPlural($node->title); $title = $language->hasKey($key) ? JText::_($key) : $node->title; } + $branches[$bk]->nodes[$node_id]->title = $title; } @@ -357,6 +363,7 @@ public static function select($idxQuery, $options) // Store the data in cache. $cache->store($branches, $cacheId); } + $html = ''; // Add the dates if enabled. @@ -375,6 +382,7 @@ public static function select($idxQuery, $options) { continue; } + $active = null; // Check if the branch is in the filter. diff --git a/components/com_finder/helpers/html/query.php b/components/com_finder/helpers/html/query.php index 2e28d0ba4b8e1..693a549a914f5 100644 --- a/components/com_finder/helpers/html/query.php +++ b/components/com_finder/helpers/html/query.php @@ -83,10 +83,12 @@ public static function explained(FinderIndexerQuery $query) { // Process the taxonomy nodes. $lang = JFactory::getLanguage(); + foreach ($nodes as $title => $id) { // Translate the title for Types $key = FinderHelperLanguage::branchPlural($title); + if ($lang->hasKey($key)) { $title = JText::_($key); diff --git a/components/com_menus/menus.php b/components/com_menus/menus.php index 1be92eff56347..59878c1905e4f 100644 --- a/components/com_menus/menus.php +++ b/components/com_menus/menus.php @@ -18,6 +18,7 @@ if (!JFactory::getUser()->authorise('core.create', 'com_menus')) { $app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'warning'); + return; } } diff --git a/components/com_newsfeeds/router.php b/components/com_newsfeeds/router.php index 0d12d1935b1fb..2e6c895e92f4f 100644 --- a/components/com_newsfeeds/router.php +++ b/components/com_newsfeeds/router.php @@ -66,6 +66,7 @@ public function __construct($app = null, $menu = null) public function getCategorySegment($id, $query) { $category = \JCategories::getInstance($this->getName())->get($id); + if ($category) { $path = array_reverse($category->getPath(), true); diff --git a/components/com_tags/View/Tag/HtmlView.php b/components/com_tags/View/Tag/HtmlView.php index 1a319ce7e6977..269bb93b95908 100644 --- a/components/com_tags/View/Tag/HtmlView.php +++ b/components/com_tags/View/Tag/HtmlView.php @@ -161,7 +161,7 @@ public function display($tpl = null) $itemElement->event = new \stdClass; // For some plugins. - !empty($itemElement->core_body)? $itemElement->text = $itemElement->core_body : $itemElement->text = null; + !empty($itemElement->core_body) ? $itemElement->text = $itemElement->core_body : $itemElement->text = null; Factory::getApplication()->triggerEvent('onContentPrepare', ['com_tags.tag', &$itemElement, &$itemElement->core_params, 0]); diff --git a/components/com_tags/View/Tags/HtmlView.php b/components/com_tags/View/Tags/HtmlView.php index acd6cce47229a..c4a42a255bc52 100644 --- a/components/com_tags/View/Tags/HtmlView.php +++ b/components/com_tags/View/Tags/HtmlView.php @@ -321,6 +321,7 @@ protected function _prepareDocument() { $title = \JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } + $this->document->setTitle($title); } diff --git a/components/com_tags/router.php b/components/com_tags/router.php index 08cfac69e008a..8510e08413960 100644 --- a/components/com_tags/router.php +++ b/components/com_tags/router.php @@ -168,7 +168,7 @@ public function parse(&$segments) * @return string The segment with founded id * * @since 3.7 - */ + */ protected function fixSegment($segment) { $db = \JFactory::getDbo(); diff --git a/components/com_users/Controller/RegistrationController.php b/components/com_users/Controller/RegistrationController.php index 7a918a6bcfdd3..c335b1529a21d 100644 --- a/components/com_users/Controller/RegistrationController.php +++ b/components/com_users/Controller/RegistrationController.php @@ -68,7 +68,7 @@ public function activate() if ($return === false) { // Redirect back to the home page. - $this->setMessage(\JText::sprintf('COM_USERS_REGISTRATION_SAVE_FAILED', $model->getError()), 'warning'); + $this->setMessage(\JText::sprintf('COM_USERS_REGISTRATION_SAVE_FAILED', $model->getError()), 'error'); $this->setRedirect('index.php'); return false; @@ -122,7 +122,7 @@ public function register() } $app = $this->app; - /* @var \Joomla\Component\Users\Site\Model\Registration $model */ + /* @var \Joomla\Component\Users\Site\Model\RegistrationModel $model */ $model = $this->getModel('Registration', 'Site'); // Get the user data. @@ -151,11 +151,11 @@ public function register() { if ($errors[$i] instanceof \Exception) { - $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); + $app->enqueueMessage($errors[$i]->getMessage(), 'error'); } else { - $app->enqueueMessage($errors[$i], 'warning'); + $app->enqueueMessage($errors[$i], 'error'); } } @@ -178,7 +178,7 @@ public function register() $app->setUserState('com_users.registration.data', $data); // Redirect back to the edit screen. - $this->setMessage($model->getError(), 'warning'); + $this->setMessage($model->getError(), 'error'); $this->setRedirect(\JRoute::_('index.php?option=com_users&view=registration', false)); return false; diff --git a/installation/language/en-GB/en-GB.ini b/installation/language/en-GB/en-GB.ini index 6bd8983e12e97..fc6491f29c347 100644 --- a/installation/language/en-GB/en-GB.ini +++ b/installation/language/en-GB/en-GB.ini @@ -41,6 +41,7 @@ INSTL_DATABASE_PASSWORD_DESC="Either a password you created or a password provid INSTL_DATABASE_PREFIX_DESC="Enter a table prefix or use the randomly generated one." INSTL_DATABASE_TYPE_DESC="Select the database type." INSTL_DATABASE_USER_DESC="Either a username you created or a username provided by your host." +INSTL_DATABASE_VALIDATION_ERROR="Check your database credentials, database type, database name or hostname" INSTL_INSTALL_JOOMLA="Install Joomla" INSTL_CONNECT_DB="Setup database connection" diff --git a/installation/language/en-US/en-US.ini b/installation/language/en-US/en-US.ini index a8159a1ac587f..25356917f14b3 100644 --- a/installation/language/en-US/en-US.ini +++ b/installation/language/en-US/en-US.ini @@ -162,6 +162,7 @@ INSTL_DATABASE_INVALID_NAME="MySQL versions previous to 5.1.6 may not contain pe INSTL_DATABASE_NAME_INVALID_SPACES="MySQL database names and table names may not begin or end with spaces." INSTL_DATABASE_NAME_INVALID_CHAR="No MySQL identifier can contain a NULL ASCII(0x00)." INSTL_DATABASE_FILE_DOES_NOT_EXIST="File %s does not exist" +INSTL_DATABASE_VALIDATION_ERROR="Check your database credentials, database type, database name or hostname" ;controllers INSTL_COOKIES_NOT_ENABLED="Cookies do not appear to be enabled on your browser client. You will not be able to install the application with this feature disabled. Alternatively, there could also be a problem with the server's session.save_path. If this is the case, please consult your hosting provider if you don't know how to check or fix this yourself." diff --git a/installation/sql/mysql/sample_testing.sql b/installation/sql/mysql/sample_testing.sql index b0d9b1c133d2f..d6b35a75af641 100644 --- a/installation/sql/mysql/sample_testing.sql +++ b/installation/sql/mysql/sample_testing.sql @@ -314,7 +314,7 @@ INSERT INTO `#__contact_details` (`id`, `name`, `alias`, `con_position`, `addres -- INSERT IGNORE INTO `#__content` (`id`, `asset_id`, `title`, `alias`, `introtext`, `fulltext`, `state`, `catid`, `created`, `created_by`, `created_by_alias`, `modified`, `modified_by`, `checked_out`, `checked_out_time`, `publish_up`, `publish_down`, `images`, `urls`, `attribs`, `version`, `ordering`, `metakey`, `metadesc`, `access`, `hits`, `metadata`, `featured`, `language`, `xreference`) VALUES -(1, 89, 'Administrator Components', 'administrator-components', '

All components are also used in the administrator area of your website. In addition to the ones listed here, there are components in the administrator that do not have direct front end displays, but do help shape your site. The most important ones for most users are

  • Media Manager
  • Extensions Manager
  • Menu Manager
  • Global Configuration
  • Banners
  • Redirect

Media Manager

The media manager component lets you upload and insert images into content throughout your site. Optionally, you can enable the flash uploader which will allow you to to upload multiple images. Help


Extensions Manager

The extensions manager lets you install, update, uninstall and manage all of your extensions. The extensions manager has been extensively redesigned, although the core install and uninstall functionality remains the same as in Joomla! 1.5. Help


Menu Manager

The menu manager lets you create the menus you see displayed on your site. It also allows you to assign modules and template styles to specific menu links. Help


Global Configuration

The global configuration is where the site administrator configures things such as whether search engine friendly urls are enabled, the site meta data (descriptive text used by search engines and indexers) and other functions. For many beginning users simply leaving the settings on default is a good way to begin, although when your site is ready for the public you will want to change the meta data to match its content. Help


Banners

The banners component provides a simple way to display a rotating image in a module and, if you wish to have advertising, a way to track the number of times an image is viewed and clicked. Help



Redirect

The redirect component is used to manage broken links that produce Page Not Found (404) errors. If enabled it will allow you to redirect broken links to specific pages. It can also be used to manage migration related URL changes. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 7, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(1, 89, 'Administrator Components', 'administrator-components', '

All components are also used in the administrator area of your website. In addition to the ones listed here, there are components in the administrator that do not have direct front end displays, but do help shape your site. The most important ones for most users are

  • Media Manager
  • Extensions Manager
  • Menu Manager
  • Global Configuration
  • Banners
  • Redirect

Media Manager

The media manager component lets you upload and insert images into content throughout your site. Optionally, you can enable the flash uploader which will allow you to to upload multiple images. Help


Extensions Manager

The extensions manager lets you install, update, uninstall and manage all of your extensions. The extensions manager has been extensively redesigned, although the core install and uninstall functionality remains the same as in Joomla! 1.5. Help


Menu Manager

The menu manager lets you create the menus you see displayed on your site. It also allows you to assign modules and template styles to specific menu links. Help


Global Configuration

The global configuration is where the site administrator configures things such as whether search engine friendly urls are enabled, the site metadata (descriptive text used by search engines and indexers) and other functions. For many beginning users simply leaving the settings on default is a good way to begin, although when your site is ready for the public you will want to change the metadata to match its content. Help


Banners

The banners component provides a simple way to display a rotating image in a module and, if you wish to have advertising, a way to track the number of times an image is viewed and clicked. Help



Redirect

The redirect component is used to manage broken links that produce Page Not Found (404) errors. If enabled it will allow you to redirect broken links to specific pages. It can also be used to manage migration related URL changes. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 7, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (2, 90, 'Archive Module', 'archive-module', '

This module shows a list of the calendar months containing archived articles. After you have changed the status of an article to archived, this list will be automatically generated. Help

{loadmodule articles_archive,Archived Articles}
', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 5, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (3, 91, 'Article Categories Module', 'article-categories-module', '

This module displays a list of categories from one parent category. Help

{loadmodule articles_categories,Articles Categories}

', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (4, 92, 'Articles Category Module', 'articles-category-module', '

This module allows you to display the articles in a specific category. Help

{loadmodule articles_category,Articles Category}
', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '0000-00-00 00:00:00', 0, 0, '0000-00-00 00:00:00', '2011-01-01 00:00:01', '0000-00-00 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 7, '', 'articles,content', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), diff --git a/installation/sql/postgresql/sample_testing.sql b/installation/sql/postgresql/sample_testing.sql index edaa12664afae..c3ea973bc76f5 100644 --- a/installation/sql/postgresql/sample_testing.sql +++ b/installation/sql/postgresql/sample_testing.sql @@ -319,7 +319,7 @@ SELECT setval('#__contact_details_id_seq', max(id)) FROM "#__contact_details"; -- INSERT INTO "#__content" ("id", "asset_id", "title", "alias", "introtext", "fulltext", "state", "catid", "created", "created_by", "created_by_alias", "modified", "modified_by", "checked_out", "checked_out_time", "publish_up", "publish_down", "images", "urls", "attribs", "version", "ordering", "metakey", "metadesc", "access", "hits", "metadata", "featured", "language", "xreference") VALUES -(1, 89, 'Administrator Components', 'administrator-components', '

All components are also used in the administrator area of your website. In addition to the ones listed here, there are components in the administrator that do not have direct front end displays, but do help shape your site. The most important ones for most users are

  • Media Manager
  • Extensions Manager
  • Menu Manager
  • Global Configuration
  • Banners
  • Redirect

Media Manager

The media manager component lets you upload and insert images into content throughout your site. Optionally, you can enable the flash uploader which will allow you to to upload multiple images. Help


Extensions Manager

The extensions manager lets you install, update, uninstall and manage all of your extensions. The extensions manager has been extensively redesigned, although the core install and uninstall functionality remains the same as in Joomla! 1.5. Help


Menu Manager

The menu manager lets you create the menus you see displayed on your site. It also allows you to assign modules and template styles to specific menu links. Help


Global Configuration

The global configuration is where the site administrator configures things such as whether search engine friendly urls are enabled, the site meta data (descriptive text used by search engines and indexers) and other functions. For many beginning users simply leaving the settings on default is a good way to begin, although when your site is ready for the public you will want to change the meta data to match its content. Help


Banners

The banners component provides a simple way to display a rotating image in a module and, if you wish to have advertising, a way to track the number of times an image is viewed and clicked. Help



Redirect

The redirect component is used to manage broken links that produce Page Not Found (404) errors. If enabled it will allow you to redirect broken links to specific pages. It can also be used to manage migration related URL changes. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '1970-01-01 00:00:00', 0, 0, '1970-01-01 00:00:00', '2011-01-01 00:00:01', '1970-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 7, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), +(1, 89, 'Administrator Components', 'administrator-components', '

All components are also used in the administrator area of your website. In addition to the ones listed here, there are components in the administrator that do not have direct front end displays, but do help shape your site. The most important ones for most users are

  • Media Manager
  • Extensions Manager
  • Menu Manager
  • Global Configuration
  • Banners
  • Redirect

Media Manager

The media manager component lets you upload and insert images into content throughout your site. Optionally, you can enable the flash uploader which will allow you to to upload multiple images. Help


Extensions Manager

The extensions manager lets you install, update, uninstall and manage all of your extensions. The extensions manager has been extensively redesigned, although the core install and uninstall functionality remains the same as in Joomla! 1.5. Help


Menu Manager

The menu manager lets you create the menus you see displayed on your site. It also allows you to assign modules and template styles to specific menu links. Help


Global Configuration

The global configuration is where the site administrator configures things such as whether search engine friendly urls are enabled, the site metadata (descriptive text used by search engines and indexers) and other functions. For many beginning users simply leaving the settings on default is a good way to begin, although when your site is ready for the public you will want to change the metadata to match its content. Help


Banners

The banners component provides a simple way to display a rotating image in a module and, if you wish to have advertising, a way to track the number of times an image is viewed and clicked. Help



Redirect

The redirect component is used to manage broken links that produce Page Not Found (404) errors. If enabled it will allow you to redirect broken links to specific pages. It can also be used to manage migration related URL changes. Help

', '', 1, 21, '2011-01-01 00:00:01', 42, 'Joomla', '1970-01-01 00:00:00', 0, 0, '1970-01-01 00:00:00', '2011-01-01 00:00:01', '1970-01-01 00:00:00', '{"image_intro":"","float_intro":"","image_intro_alt":"","image_intro_caption":"","image_fulltext":"","float_fulltext":"","image_fulltext_alt":"","image_fulltext_caption":""}', '{"urla":"","urlatext":"","targeta":"","urlb":"","urlbtext":"","targetb":"","urlc":"","urlctext":"","targetc":""}', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","alternative_readmore":"","article_layout":"","show_publishing_options":"","show_article_options":"","show_urls_images_backend":"","show_urls_images_frontend":""}', 1, 7, '', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (2, 90, 'Archive Module', 'archive-module', '

This module shows a list of the calendar months containing archived articles. After you have changed the status of an article to archived, this list will be automatically generated. Help

{loadmodule articles_archive,Archived Articles}
', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '1970-01-01 00:00:00', 0, 0, '1970-01-01 00:00:00', '2011-01-01 00:00:01', '1970-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 5, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (3, 91, 'Article Categories Module', 'article-categories-module', '

This module displays a list of categories from one parent category. Help

{loadmodule articles_categories,Articles Categories}

', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '1970-01-01 00:00:00', 0, 0, '1970-01-01 00:00:00', '2011-01-01 00:00:01', '1970-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 6, 'modules, content', '', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), (4, 92, 'Articles Category Module', 'articles-category-module', '

This module allows you to display the articles in a specific category. Help

{loadmodule articles_category,Articles Category}
', '', 1, 64, '2011-01-01 00:00:01', 42, 'Joomla', '1970-01-01 00:00:00', 0, 0, '1970-01-01 00:00:00', '2011-01-01 00:00:01', '1970-01-01 00:00:00', '', '', '{"show_title":"","link_titles":"","show_intro":"","show_category":"","link_category":"","show_parent_category":"","link_parent_category":"","show_author":"","link_author":"","show_create_date":"","show_modify_date":"","show_publish_date":"","show_item_navigation":"","show_icons":"","show_print_icon":"","show_email_icon":"","show_vote":"","show_hits":"","show_noauth":"","page_title":"","alternative_readmore":"","layout":""}', 1, 7, '', 'articles,content', 1, 0, '{"robots":"","author":"","rights":"","xreference":""}', 0, '*', ''), diff --git a/installation/src/Controller/InstallationController.php b/installation/src/Controller/InstallationController.php index 45fca7927e371..e2fa9cd7bb9ea 100644 --- a/installation/src/Controller/InstallationController.php +++ b/installation/src/Controller/InstallationController.php @@ -12,6 +12,7 @@ defined('_JEXEC') or die; use Joomla\CMS\Application\CMSApplication; +use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Factory\MVCFactoryInterface; use Joomla\Utilities\ArrayHelper; @@ -61,7 +62,7 @@ public function dbcheck() $model = $this->getModel('Setup'); if ($model->checkForm('setup') === false || $model->validateDbConnection() === false) { - $r->messages = 'Check your DB credentials, db type, db name or hostname'; + $r->messages = Text::_('INSTL_DATABASE_VALIDATION_ERROR'); $r->view = 'setup'; } diff --git a/installation/src/Controller/LanguageController.php b/installation/src/Controller/LanguageController.php index 42da0c513ba86..084a1fb6e5947 100644 --- a/installation/src/Controller/LanguageController.php +++ b/installation/src/Controller/LanguageController.php @@ -87,7 +87,7 @@ public function setdefault() $app = $this->app; - // Get the languages model. + /** @var \Joomla\CMS\Installation\Model\LanguagesModel $model */ $model = $this->getModel('Languages'); // Check for request forgeries in the administrator language @@ -133,7 +133,7 @@ public function setdefault() } // Check if user has activated the multilingual site - $data = $this->getInput()->post->get('jform', array(), 'array'); + $data = $this->input->post->get('jform', array(), 'array'); if ((int) $data['activateMultilanguage']) { @@ -249,6 +249,6 @@ public function setdefault() // Redirect to the final page. $r->view = 'remove'; - $app->sendJsonResponse($r); + $this->sendJsonResponse($r); } } diff --git a/installation/src/Model/DatabaseModel.php b/installation/src/Model/DatabaseModel.php index 220797a1e9762..20593caedaf45 100644 --- a/installation/src/Model/DatabaseModel.php +++ b/installation/src/Model/DatabaseModel.php @@ -202,7 +202,7 @@ public function initialise() { $remoteDbFileTestsPassed = Factory::getSession()->get('remoteDbFileTestsPassed', false); - // When all checks have been passed we don't need to do this here again. + // When all checks have been passed we don't need to do this here again. if ($remoteDbFileTestsPassed === false) { $generalRemoteDatabaseMessage = \JText::sprintf( diff --git a/installation/src/Model/SetupModel.php b/installation/src/Model/SetupModel.php index ca81cecac9d4c..06b6c4d35f16d 100644 --- a/installation/src/Model/SetupModel.php +++ b/installation/src/Model/SetupModel.php @@ -27,14 +27,6 @@ */ class SetupModel extends BaseInstallationModel { - /** - * The generated user ID. - * - * @var integer - * @since 3.1 - */ - protected static $userId = 0; - /** * Get the current setup options from the session. * diff --git a/language/en-GB/en-GB.lib_joomla.ini b/language/en-GB/en-GB.lib_joomla.ini index bb43e4c02525f..9d673a4886153 100644 --- a/language/en-GB/en-GB.lib_joomla.ini +++ b/language/en-GB/en-GB.lib_joomla.ini @@ -387,6 +387,7 @@ JLIB_HTML_BEHAVIOR_HOLD_MOUSE="- Hold mouse button on any of the buttons above f JLIB_HTML_BEHAVIOR_MONTH_SELECT="- Use the < and > buttons to select month\n" JLIB_HTML_BEHAVIOR_NEXT_MONTH_HOLD_FOR_MENU="Select to move to the next month. Select and hold for a list of the months." JLIB_HTML_BEHAVIOR_NEXT_YEAR_HOLD_FOR_MENU="Select to move to the next year. Select and hold for a list of years." +JLIB_HTML_BEHAVIOR_OPEN_CALENDAR="Open the calendar" JLIB_HTML_BEHAVIOR_PREV_MONTH_HOLD_FOR_MENU="Select to move to the previous month. Select and hold for a list of the months." JLIB_HTML_BEHAVIOR_PREV_YEAR_HOLD_FOR_MENU="Select to move to the previous year. Select and hold for a list of years." JLIB_HTML_BEHAVIOR_SELECT_DATE="Select a date." diff --git a/layouts/joomla/form/field/calendar.php b/layouts/joomla/form/field/calendar.php index f13279c8aed29..5e2c2407081b4 100644 --- a/layouts/joomla/form/field/calendar.php +++ b/layouts/joomla/form/field/calendar.php @@ -131,6 +131,7 @@ data-only-months-nav="" + title="" > diff --git a/layouts/joomla/form/field/radio/buttons.php b/layouts/joomla/form/field/radio/buttons.php index de82469a7fe9b..1ba322ba11a75 100644 --- a/layouts/joomla/form/field/radio/buttons.php +++ b/layouts/joomla/form/field/radio/buttons.php @@ -48,7 +48,8 @@ $btnClass = $isBtnGroup ? 'btn btn-outline-secondary' : 'form-check'; // Add the attributes of the fieldset in an array -$attribs = ['class="' . trim($class . ' radio') . $classToggle . '"', +$attribs = ['class="' . trim($class . ' radio' . ($readonly || $disabled ? ' disabled' : '') . + ($readonly ? ' readonly' : '')) . $classToggle . '"', ]; if (!empty($disabled)) @@ -71,11 +72,19 @@ $attribs[] = $dataToggle; } +if ($readonly || $disabled) +{ + $attribs[] = 'style="pointer-events: none"'; +} + ?>
> $option) : ?> disable) ? 'disabled' : ''; + $style = $disabled ? 'style="pointer-events: none"' : ''; + // Initialize some option attributes. if ($isBtnYesNo) { @@ -92,22 +101,22 @@ else { $optionClass = !empty($option->class) ? $option->class : $btnClass; + $optionClass = trim($optionClass . ' ' . $disabled); } $checked = ((string) $option->value === $value) ? 'checked="checked"' : ''; $optionClass .= $checked ? ' active' : ''; - $disabled = !empty($option->disable) || ($disabled && !$checked) ? 'disabled' : ''; // Initialize some JavaScript option attributes. $onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''; $onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''; $oid = $id . $i; $ovalue = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8'); - $attributes = array_filter(array($checked, $optionClass, $disabled, $onchange, $onclick)); + $attributes = array_filter(array($checked, $optionClass, $disabled, $style, $onchange, $onclick)); ?> -