Skip to content

Commit

Permalink
Merge remote-tracking branch 'joomla/staging' into com_fields_fix
Browse files Browse the repository at this point in the history
# Conflicts:
#	plugins/system/fields/fields.php
  • Loading branch information
Denitz committed Dec 26, 2017
2 parents 2dfebca + f96a132 commit 6f9adf4
Show file tree
Hide file tree
Showing 531 changed files with 5,093 additions and 3,370 deletions.
Expand Up @@ -84,7 +84,7 @@

<field
name="id"
type="text"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
class="readonly"
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_admin/models/sysinfo.php
Expand Up @@ -256,7 +256,6 @@ public function &getPhpSettings()
'zip' => function_exists('zip_open') && function_exists('zip_read'),
'mbstring' => extension_loaded('mbstring'),
'iconv' => function_exists('iconv'),
'mcrypt' => extension_loaded('mcrypt'),
'max_input_vars' => ini_get('max_input_vars'),
);

Expand Down
Expand Up @@ -16,6 +16,7 @@ ALTER TABLE `#__banners` DROP KEY `idx_metakey_prefix`;
ALTER TABLE `#__banner_clients` DROP KEY `idx_metakey_prefix`;
ALTER TABLE `#__categories` DROP KEY `idx_path`;
ALTER TABLE `#__categories` DROP KEY `idx_alias`;
ALTER TABLE `#__content` DROP KEY `idx_alias`;
ALTER TABLE `#__content_types` DROP KEY `idx_alias`;
ALTER TABLE `#__fields` DROP KEY `idx_context`;
ALTER TABLE `#__fields_groups` DROP KEY `idx_context`;
Expand Down
Expand Up @@ -224,6 +224,7 @@ ALTER TABLE `#__banners` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100));
ALTER TABLE `#__banner_clients` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100));
ALTER TABLE `#__categories` ADD KEY `idx_path` (`path`(100));
ALTER TABLE `#__categories` ADD KEY `idx_alias` (`alias`(100));
ALTER TABLE `#__content` ADD KEY `idx_alias` (`alias`(191));
ALTER TABLE `#__content_types` ADD KEY `idx_alias` (`type_alias`(100));
ALTER TABLE `#__fields` ADD KEY `idx_context` (`context`(191));
ALTER TABLE `#__fields_groups` ADD KEY `idx_context` (`context`(191));
Expand Down
@@ -0,0 +1,5 @@
--
-- Add index for alias check #__content
--

ALTER TABLE `#__content` ADD INDEX `idx_alias` (`alias`(191));
@@ -0,0 +1,5 @@
--
-- Add index for alias check #__content
--

CREATE INDEX "#__content_idx_alias" ON "#__content" ("alias");
@@ -0,0 +1,8 @@
--
-- Add index for alias check #__content
--

CREATE NONCLUSTERED INDEX [idx_alias] ON [#__content]
(
[alias] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF);
Expand Up @@ -21,7 +21,7 @@
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', 'https://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')); ?></li>
<hr class="hr-condensed" />
<li class="divider"></li>
<li class="nav-header"><?php echo JText::_('COM_ADMIN_ALPHABETICAL_INDEX'); ?></li>
<?php foreach ($this->toc as $k => $v) : ?>
<li>
Expand All @@ -33,7 +33,7 @@
</div>
</div>
<div class="span9">
<iframe name="helpFrame" height="2100px" src="<?php echo $this->page; ?>" class="helpFrame table table-bordered"></iframe>
<iframe name="helpFrame" title="helpFrame" height="2100px" src="<?php echo $this->page; ?>" class="helpFrame table table-bordered"></iframe>
</div>
</div>
<input class="textarea" type="hidden" name="option" value="com_admin" />
Expand Down
Expand Up @@ -157,14 +157,6 @@
<?php echo JHtml::_('phpsetting.set', $this->php_settings['iconv']); ?>
</td>
</tr>
<tr>
<td>
<?php echo JText::_('COM_ADMIN_MCRYPT_ENABLED'); ?>
</td>
<td>
<?php echo JHtml::_('phpsetting.set', $this->php_settings['mcrypt']); ?>
</td>
</tr>
<tr>
<td>
<?php echo JText::_('COM_ADMIN_MAX_INPUT_VARS'); ?>
Expand Down
Expand Up @@ -92,7 +92,7 @@ public function display($tpl = null)
*
* @since 1.6
* @note Necessary for Hathor compatibility
* @deprecated 4.0 To be removed with Hathor
* @deprecated 4.0 To be removed with Hathor
*/
protected function _setSubMenu()
{
Expand Down
16 changes: 3 additions & 13 deletions administrator/components/com_associations/helpers/associations.php
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\CMS\Language\LanguageHelper;

/**
* Associations component helper.
Expand Down Expand Up @@ -177,7 +178,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$titleFieldName = self::getTypeFieldName($extensionName, $typeName, 'title');

// Get all content languages.
$languages = self::getContentLanguages();
$languages = LanguageHelper::getContentLanguages(array(0, 1));

$canEditReference = self::allowEdit($extensionName, $typeName, $itemId);
$canCreate = self::allowAdd($extensionName, $typeName);
Expand Down Expand Up @@ -444,18 +445,7 @@ private static function getEnabledExtensions()
*/
public static function getContentLanguages()
{
$db = JFactory::getDbo();

// Get all content languages.
$query = $db->getQuery(true)
->select($db->quoteName(array('sef', 'lang_code', 'image', 'title', 'published')))
->from($db->quoteName('#__languages'))
->where($db->quoteName('published') . ' != -2')
->order($db->quoteName('ordering') . ' ASC');

$db->setQuery($query);

return $db->loadObjectList('lang_code');
return LanguageHelper::getContentLanguages(array(0, 1));
}

/**
Expand Down
Expand Up @@ -10,6 +10,7 @@
defined('JPATH_BASE') or die;

use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Language\LanguageHelper;

JLoader::register('AssociationsHelper', JPATH_ADMINISTRATOR . '/components/com_associations/helpers/associations.php');
JFormHelper::loadFieldClass('list');
Expand Down Expand Up @@ -57,7 +58,7 @@ protected function getOptions()
$canCreate = AssociationsHelper::allowAdd($extensionName, $typeName);

// Gets existing languages.
$existingLanguages = AssociationsHelper::getContentLanguages();
$existingLanguages = LanguageHelper::getContentLanguages(array(0, 1));

$options = array();

Expand Down
Expand Up @@ -26,7 +26,7 @@ class JFormFieldItemType extends JFormFieldGroupedList
* @since 3.7.0
*/
protected $type = 'ItemType';

/**
* Method to get the field input markup.
*
Expand Down
Expand Up @@ -75,11 +75,11 @@ protected function getInput()

// Clear association button
$html[] = '<button'
. ' class="btn' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
. '<span class="icon-remove" aria-hidden="true"></span>' . JText::_('JCLEAR')
. '</button>';
. ' class="btn' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
. '<span class="icon-remove" aria-hidden="true"></span>' . JText::_('JCLEAR')
. '</button>';

$html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $value . '" />';

Expand Down
Expand Up @@ -32,7 +32,7 @@
<div class="outer-panel" id="left-panel">
<div class="inner-panel">
<h3><?php echo JText::_('COM_ASSOCIATIONS_REFERENCE_ITEM'); ?></h3>
<iframe id="reference-association" name="reference-association"
<iframe id="reference-association" name="reference-association" title="reference-association"
src="<?php echo JRoute::_($this->editUri . '&task=' . $this->typeName . '.edit&id=' . (int) $this->referenceId); ?>"
height="400" width="400"
data-action="edit"
Expand All @@ -50,7 +50,7 @@
<?php echo $this->form->getInput('modalassociation'); ?>
<?php echo $this->form->getInput('itemlanguage'); ?>
</div>
<iframe id="target-association" name="target-association"
<iframe id="target-association" name="target-association" title="target-association"
src="<?php echo $this->defaultTargetSrc; ?>"
height="400" width="400"
data-action="<?php echo $this->targetAction; ?>"
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/config.xml
Expand Up @@ -75,7 +75,7 @@

<field
name="history_limit"
type="text"
type="number"
label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"
description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"
filter="integer"
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_banners/models/forms/banner.xml
Expand Up @@ -4,7 +4,7 @@

<field
name="id"
type="text"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
default="0"
Expand Down Expand Up @@ -342,15 +342,15 @@

<field
name="width"
type="text"
type="number"
label="COM_BANNERS_FIELD_WIDTH_LABEL"
description="COM_BANNERS_FIELD_WIDTH_DESC"
class="input-mini validate-numeric"
/>

<field
name="height"
type="text"
type="number"
label="COM_BANNERS_FIELD_HEIGHT_LABEL"
description="COM_BANNERS_FIELD_HEIGHT_DESC"
class="input-mini validate-numeric"
Expand Down
3 changes: 1 addition & 2 deletions administrator/components/com_banners/models/forms/client.xml
Expand Up @@ -3,7 +3,7 @@
<fieldset name="details" addfieldpath="/administrator/components/com_banners/models/fields">
<field
name="id"
type="text"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
default="0"
Expand Down Expand Up @@ -37,7 +37,6 @@
description="COM_BANNERS_FIELD_EMAIL_DESC"
size="40"
validate="email"
required="true"
/>

<field
Expand Down
Expand Up @@ -130,8 +130,8 @@
?>
</div>
</td>
<td class="nowrap has-context">
<div class="pull-left">
<td class="has-context">
<div class="pull-left break-word">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'banners.', $canCheckin); ?>
<?php endif; ?>
Expand All @@ -141,7 +141,7 @@
<?php else : ?>
<?php echo $this->escape($item->name); ?>
<?php endif; ?>
<span class="small">
<span class="small break-word">
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
</span>
<div class="small">
Expand Down
7 changes: 7 additions & 0 deletions administrator/components/com_cache/access.xml
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_cache">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
</section>
</access>
11 changes: 1 addition & 10 deletions administrator/components/com_cache/config.xml
Expand Up @@ -12,15 +12,6 @@
filter="rules"
validate="rules"
component="com_cache"
section="component">
<action
name="core.admin"
title="JACTION_ADMIN"
description="JACTION_MANAGE_COMPONENT_DESC" />
<action
name="core.manage"
title="JACTION_MANAGE"
description="JACTION_MANAGE_COMPONENT_DESC" />
</field>
section="component" />
</fieldset>
</config>
Expand Up @@ -56,11 +56,11 @@
foreach ($this->data as $folder => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<input type="checkbox" id="cb<?php echo $i; ?>" name="cid[]" value="<?php echo $item->group; ?>" onclick="Joomla.isChecked(this.checked);" />
<input type="checkbox" id="cb<?php echo $i; ?>" name="cid[]" value="<?php echo $this->escape($item->group); ?>" onclick="Joomla.isChecked(this.checked);" />
</td>
<td>
<label for="cb<?php echo $i; ?>">
<strong><?php echo $item->group; ?></strong>
<strong><?php echo $this->escape($item->group); ?></strong>
</label>
</td>
<td>
Expand Down
Expand Up @@ -65,7 +65,7 @@ public function setup(SimpleXMLElement $element, $value, $group = null)
/**
* Method to get certain otherwise inaccessible properties from the form field object.
*
* @param string $name The property name for which to the the value.
* @param string $name The property name for which to get the value.
*
* @return mixed The property value or null.
*
Expand All @@ -85,7 +85,7 @@ public function __get($name)
/**
* Method to set certain otherwise inaccessible properties of the form field object.
*
* @param string $name The property name for which to the the value.
* @param string $name The property name for which to set the value.
* @param mixed $value The value of the property.
*
* @return void
Expand Down
Expand Up @@ -3,7 +3,7 @@

<field
name="id"
type="text"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
default="0"
Expand All @@ -13,7 +13,7 @@

<field
name="hits"
type="text"
type="number"
label="JGLOBAL_HITS"
description="COM_CATEGORIES_FIELD_HITS_DESC"
default="0"
Expand Down
Expand Up @@ -219,25 +219,25 @@
</td>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_published > 0) echo 'badge-success'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_published > 0) echo 'badge-success'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=1'); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_unpublished > 0) echo 'badge-important'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_unpublished > 0) echo 'badge-important'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=1'); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_archived > 0) echo 'badge-info'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_archived > 0) echo 'badge-info'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=1'); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_trashed > 0) echo 'badge-inverse'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_trashed > 0) echo 'badge-inverse'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=1'); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif; ?>
Expand Down
Expand Up @@ -23,6 +23,7 @@

JHtml::_('behavior.core');
JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));
JHtml::_('formbehavior.chosen', 'select');

// Special case for the search field tooltip.
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_config/model/application.php
Expand Up @@ -659,7 +659,6 @@ public function storePermissions($permission = null)
return false;
}


// All checks done.
$result = array(
'text' => '',
Expand Down

0 comments on commit 6f9adf4

Please sign in to comment.