Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/4.0-dev' into 4.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Lodder committed Feb 10, 2018
2 parents 9f09d22 + f21c448 commit fe95bde
Show file tree
Hide file tree
Showing 506 changed files with 90,948 additions and 153,157 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Desktop.ini
/libraries/vendor/defuse/php-encryption/README.md
/libraries/vendor/defuse/php-encryption/psalm.xml
/libraries/vendor/defuse/php-encryption/test.sh
/libraries/vendor/doctrine/inflector/composer.json
/libraries/vendor/doctrine/inflector/README.md
/libraries/vendor/google/recaptcha/examples
/libraries/vendor/google/recaptcha/tests
/libraries/vendor/google/recaptcha/.gitignore
Expand Down Expand Up @@ -179,6 +181,7 @@ Desktop.ini
/libraries/vendor/phpmailer/phpmailer/ISSUE_TEMPLATE.md
/libraries/vendor/phpmailer/phpmailer/phpdoc.dist.xml
/libraries/vendor/phpmailer/phpmailer/README.md
/libraries/vendor/phpmailer/phpmailer/SECURITY.md
/libraries/vendor/phpmailer/phpmailer/travis.phpunit.xml.dist
/libraries/vendor/phpmailer/phpmailer/UPGRADING.md
/libraries/vendor/psr/container/.gitignore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
VALUES
INSERT INTO `#__extensions` (`extension_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `system_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`)
VALUES
(NULL, 487, 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheader', 1, 'action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_condition', '4.0.0', 1);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
VALUES
INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
(487, 'plg_system_httpheader', 'plugin', 'httpheader', 'system', 0, 0, 1, 0, '', '{}', '', '', 0, '0000-00-00 00:00:00', 0, 0);

INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled")
VALUES
(NULL, 487, 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_TITLE', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_BODY', 'PLG_SYSTEM_HTTPHEADER_POSTINSTALL_INTRODUCTION_ACTION', 'plg_system_httpheader', 1, 'action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_action', 'site://plugins/system/httpheader/postinstall/introduction.php', 'httpheader_postinstall_condition', '4.0.0', 1);
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\Form\FormHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
use Joomla\CMS\Language\LanguageHelper;

FormHelper::loadFieldClass('list');

Expand Down Expand Up @@ -60,7 +61,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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\Registry\Registry;
use Joomla\CMS\Language\LanguageHelper;

/**
* Associations component helper.
Expand Down Expand Up @@ -180,7 +181,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 @@ -448,18 +449,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
1 change: 0 additions & 1 deletion administrator/components/com_banners/forms/client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
label="COM_BANNERS_FIELD_EMAIL_LABEL"
size="40"
validate="email"
required="true"
/>

<field
Expand Down
7 changes: 7 additions & 0 deletions administrator/components/com_cache/access.xml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
filter="rules"
validate="rules"
component="com_cache"
section="component">
<action
name="core.admin"
title="JACTION_ADMIN"
/>
<action
name="core.manage"
title="JACTION_MANAGE"
/>
</field>
section="component" />
</fieldset>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));

$extension = $this->escape($this->state->get('filter.extension'));
$function = $app->input->getCmd('function', 'jSelectCategory');
Expand Down
3 changes: 0 additions & 3 deletions administrator/components/com_config/forms/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@
label="COM_CONFIG_FIELD_CACHE_TIME_LABEL"
min="1"
default="15"
required="true"
filter="integer"
validate="number"
size="6"
Expand Down Expand Up @@ -575,7 +574,6 @@
hint="25"
validate="number"
filter="integer"
required="true"
size="5"
/>

Expand Down Expand Up @@ -939,7 +937,6 @@
min="1"
max="16383"
default="15"
required="true"
filter="integer"
validate="number"
size="6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected function getStoreId($id = '')
// Compile the store id.
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.category_id');
$id .= ':' . serialize($this->getState('filter.category_id'));
$id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.language');
$id .= ':' . $this->getState('filter.tag');
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_contact/forms/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,7 @@

<fields name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">

<fieldset name="display" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS"
addfieldpath="/administrator/components/com_fields/models/fields">
<fieldset name="display" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS">

<field
name="show_contact_category"
Expand Down Expand Up @@ -661,13 +660,14 @@
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>

<field
name="show_user_custom_fields"
type="fieldgroups"
label="COM_CONTACT_FIELD_USER_CUSTOM_FIELDS_SHOW_LABEL"
multiple="true"
context="com_users.user"
addfieldprefix="Joomla\Component\Fields\Administrator\Field"
>
<option value="-1">JALL</option>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

JHtml::_('behavior.core');
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));
JHtml::_('script', 'com_contact/admin-contacts-modal.min.js', array('version' => 'auto', 'relative' => true));

$function = $app->input->getCmd('function', 'jSelectContact');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

JHtml::_('behavior.core');
JHtml::_('script', 'com_content/admin-articles-modal.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY')));
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_fields/helpers/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function ($f)

if (is_array($value))
{
$value = implode($value, ' ');
$value = implode(' ', $value);
}

/*
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_fields/tmpl/fields/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

JHtml::_('behavior.core');
JHtml::_('formbehavior.chosen', '.advancedSelect');
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));
JHtml::_('script', 'com_fields/admin-fields-modal.js', array('version' => 'auto', 'relative' => true));

$listOrder = $this->escape($this->state->get('list.ordering'));
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/Table/FilterTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public function store($updateNulls = false)
}

// Verify that the alias is unique
$table = new Filter($this->getDbo());
$table = new static($this->getDbo());

if ($table->load(array('alias' => $this->alias)) && ($table->filter_id != $this->filter_id || $this->filter_id == 0))
{
Expand Down
18 changes: 15 additions & 3 deletions administrator/components/com_finder/helpers/indexer/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,15 @@ public static function getContentExtras(FinderIndexerResult &$item)
/**
* Method to process content text using the onContentPrepare event trigger.
*
* @param string $text The content to process.
* @param Registry $params The parameters object. [optional]
* @param string $text The content to process.
* @param Registry $params The parameters object. [optional]
* @param FinderIndexerResult $item The item which get prepared. [optional]
*
* @return string The processed content.
*
* @since 2.5
*/
public static function prepareContent($text, $params = null)
public static function prepareContent($text, $params = null, FinderIndexerResult $item = null)
{
static $loaded;

Expand All @@ -482,6 +483,17 @@ public static function prepareContent($text, $params = null)
$content = JTable::getInstance('Content');
$content->text = $text;

if ($item)
{
$content->bind((array) $item);
$content->bind($item->getElements());
}

if ($item && !empty($item->context))
{
$content->context = $item->context;
}

// Fire the onContentPrepare event.
JFactory::getApplication()->triggerEvent('onContentPrepare', array('com_finder.indexer', &$content, &$params, 0));

Expand Down
12 changes: 12 additions & 0 deletions administrator/components/com_finder/helpers/indexer/result.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,18 @@ public function getElement($name)
return null;
}

/**
* Method to retrieve all elements.
*
* @return array The elements
*
* @since __DEPLOY_VERSION__
*/
public function getElements()
{
return $this->elements;
}

/**
* Method to set additional element values in the elements array.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
JHtml::_('jquery.framework');

// Load the scripts
JHtml::_('script', 'com_joomlaupdate/json2.js', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'com_joomlaupdate/encryption.js', array('version' => 'auto', 'relative' => true));
JHtml::_('script', 'com_joomlaupdate/update.js', array('version' => 'auto', 'relative' => true));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HtmlView extends BaseHtmlView
/**
* True, if FTP settings should be shown, or an exception.
*
* @var boolean|\JException
* @var boolean|\Exception
*/
protected $ftp = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function rebuild()
/**
* Temporary method. This should go into the 1.5 to 1.6 upgrade routines.
*
* @return \JException|void \JException instance on error
* @return void
*
* @since 1.6
*/
Expand Down
10 changes: 7 additions & 3 deletions administrator/components/com_menus/Model/ItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ protected function preprocessForm(\JForm $form, $data, $group = 'content')
/**
* Method rebuild the entire nested set tree.
*
* @return boolean|\JException Boolean true on success, boolean false or \JException instance on error
* @return boolean Boolean true on success, boolean false
*
* @since 1.6
*/
Expand Down Expand Up @@ -1304,7 +1304,9 @@ public function rebuild()
}
catch (\RuntimeException $e)
{
return \JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
\JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');

return false;
}

foreach ($items as &$item)
Expand All @@ -1323,7 +1325,9 @@ public function rebuild()
}
catch (\RuntimeException $e)
{
return \JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
\JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');

return false;
}

unset($registry);
Expand Down
1 change: 0 additions & 1 deletion administrator/components/com_menus/forms/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
id="client_id"
default="0"
class="switcher switcher-primary"
required="true"
>
<option value="0">JSITE</option>
<option value="1">JADMINISTRATOR</option>
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_menus/tmpl/items/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

JHtml::_('behavior.core');
JHtml::_('script', 'com_menus/admin-items-modal.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));

$function = $app->input->get('function', 'jSelectMenuItem', 'cmd');
$editor = $app->input->getCmd('editor', '');
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_modules/Model/ModuleModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function delete(&$pks)
*
* @param array &$pks An array of primary key IDs.
*
* @return boolean|\JException Boolean true on success, \JException instance on error
* @return boolean Boolean true on success
*
* @since 1.6
* @throws \Exception
Expand Down Expand Up @@ -463,7 +463,9 @@ public function duplicate(&$pks)
}
catch (\RuntimeException $e)
{
return \JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
\JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');

return false;
}
}

Expand Down

0 comments on commit fe95bde

Please sign in to comment.