Skip to content

Commit

Permalink
Merge branch '4.1-dev' into mail_templates_html
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Apr 30, 2022
2 parents 36adda1 + 7e2e034 commit 594d6b9
Show file tree
Hide file tree
Showing 73 changed files with 340 additions and 174 deletions.
7 changes: 0 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ clone_folder: C:\projects\joomla-cms
environment:
PHPBuild: "x64"
matrix:
- php_ver_target: 7.2
- php_ver_target: 7.3
- php_ver_target: 7.4
- php_ver_target: 8.0
- php_ver_target: 8.1

matrix:
allow_failures:
- php_ver_target: 8.1

init:
- SET PATH=C:\Tools\php;%PATH%
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_cache/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
filter="rules"
validate="rules"
component="com_cache"
section="component" />
section="component"
/>
</fieldset>
</config>
6 changes: 4 additions & 2 deletions administrator/components/com_config/forms/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
filter="integer"
validate="number"
showon="caching:1,2"
/>
/>

<field
name="cache_path"
Expand Down Expand Up @@ -173,7 +173,8 @@
label="COM_CONFIG_FIELD_DATABASE_TYPE_LABEL"
description="COM_CONFIG_FIELD_DATABASE_TYPE_DESC"
supported="mysql,mysqli,pgsql,postgresql"
filter="string" />
filter="string"
/>

<field
name="host"
Expand Down Expand Up @@ -1117,6 +1118,7 @@
name="log_path"
type="text"
label="COM_CONFIG_FIELD_LOG_PATH_LABEL"
description="COM_CONFIG_FIELD_LOG_PATH_DESC"
required="true"
filter="string"
/>
Expand Down
30 changes: 15 additions & 15 deletions administrator/components/com_contact/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -838,22 +838,22 @@
</field>

<field
name="contacts_display_num"
type="list"
label="COM_CONTACT_NUMBER_CONTACTS_LIST_LABEL"
default="10"
name="contacts_display_num"
type="list"
label="COM_CONTACT_NUMBER_CONTACTS_LIST_LABEL"
default="10"
validate="options"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="100">J100</option>
<option value="0">JALL</option>
</field>
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="100">J100</option>
<option value="0">JALL</option>
</field>

<field
name="initial_sort"
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_contact/forms/contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
type="text"
label="COM_CONTACT_FIELD_NAME_LABEL"
required="true"
/>
/>

<field
name="alias"
Expand Down Expand Up @@ -167,7 +167,7 @@
label="JFIELD_META_KEYWORDS_LABEL"
rows="3"
cols="30"
/>
/>

<field
name="metadesc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
step="1"
languages="*"
onchange="this.form.submit();"
>
>
<option value="">JOPTION_SELECT_MAX_LEVELS</option>
</field>
</fields>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ protected function addToolbar()

if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete', $component))
{
ToolbarHelper::deleteList('', 'fields.delete', 'JTOOLBAR_EMPTY_TRASH');
$toolbar->delete('fields.delete')
->text('JTOOLBAR_EMPTY_TRASH')
->message('JGLOBAL_CONFIRM_DELETE')
->listCheck(true);
}

if ($canDo->get('core.admin') || $canDo->get('core.options'))
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/forms/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
readonly="true"
filter="unset"
validate="UserId"
/>
/>

<field
name="checked_out"
Expand Down
93 changes: 59 additions & 34 deletions administrator/components/com_finder/src/Indexer/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,35 @@ public function setLanguage()
*/
public function serialize()
{
$taxonomy = array();
return serialize($this->__serialize());
}

/**
* Helper function to unserialise the data for this object
*
* @param string $serialized Serialised data to unserialise
*
* @return void
*
* @since 4.0.0
*/
public function unserialize($serialized): void
{
$this->__unserialize(unserialize($serialized));
}

/**
* Magic method used for serializing.
*
* @since __DEPLOY_VERSION__
*/
public function __serialize(): array
{
$taxonomy = [];

foreach ($this->taxonomy as $branch => $nodes)
{
$taxonomy[$branch] = array();
$taxonomy[$branch] = [];

foreach ($nodes as $node)
{
Expand All @@ -487,8 +511,8 @@ public function serialize()
}
}

return serialize(
[
// This order must match EXACTLY the order of the $properties in the self::__unserialize method
return [
$this->access,
$this->defaultLanguage,
$this->description,
Expand All @@ -508,42 +532,43 @@ public function serialize()
$this->title,
$this->type_id,
$this->url
]
);
];
}

/**
* Helper function to unserialise the data for this object
*
* @param string $serialized Serialised data to unserialise
*
* @return void
* Magic method used for unserializing.
*
* @since 4.0.0
* @since __DEPLOY_VERSION__
*/
public function unserialize($serialized)
public function __unserialize(array $serialized): void
{
list(
$this->access,
$this->defaultLanguage,
$this->description,
$this->elements,
$this->end_date,
$this->instructions,
$this->language,
$this->list_price,
$this->publish_end_date,
$this->publish_start_date,
$this->published,
$this->route,
$this->sale_price,
$this->start_date,
$this->state,
$this->taxonomy,
$this->title,
$this->type_id,
$this->url
) = unserialize($serialized);
// This order must match EXACTLY the order of the array in the self::__serialize method
$properties = [
'access',
'defaultLanguage',
'description',
'elements',
'end_date',
'instructions',
'language',
'list_price',
'publish_end_date',
'publish_start_date',
'published',
'route',
'sale_price',
'start_date',
'state',
'taxonomy',
'title',
'type_id',
'url',
];

foreach ($properties as $k => $v)
{
$this->$v = $serialized[$k];
}

foreach ($this->taxonomy as $nodes)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
<?php endif; ?>
<?php endforeach; ?>
<table class="table table-sm">
<caption class="visually-hidden"><?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_TABLE_CAPTION'); ?></caption>
<thead>
<tr>
<th scope="col">
Expand Down Expand Up @@ -201,6 +202,7 @@
</tbody>
</table>
<table class="table table-sm">
<caption class="visually-hidden"><?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_CONTENT_TABLE_CAPTION'); ?></caption>
<thead>
<tr>
<th scope="col">
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_mails/forms/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/>
</form>
</field>
<fields name="params" label="COM_CATEGORIES_FIELD_BASIC_LABEL">
<fields name="params" label="COM_MAILS_FIELD_BASIC_LABEL">

<fieldset name="basic">

Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_media/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,6 @@
validate="rules"
component="com_media"
section="component"
/>
/>
</fieldset>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

\defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\Component\Media\Administrator\Adapter\AdapterInterface;

/**
Expand Down Expand Up @@ -96,7 +97,7 @@ public function getProvider($id)
{
if (!isset($this->providers[$id]))
{
throw new \Exception("Media Provider not found");
throw new \Exception(Text::_('COM_MEDIA_ERROR_MEDIA_PROVIDER_NOT_FOUND'));
}

return $this->providers[$id];
Expand All @@ -119,14 +120,14 @@ public function getAdapter($name)

if ($account == null)
{
throw new \Exception('Account was not set');
throw new \Exception(Text::_('COM_MEDIA_ERROR_ACCOUNT_NOT_SET'));
}

$adapters = $this->getProvider($provider)->getAdapters();

if (!isset($adapters[$account]))
{
throw new \Exception("The account was not found");
throw new \Exception(Text::_('COM_MEDIA_ERROR_ACCOUNT_NOT_FOUND'));
}

return $adapters[$account];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Media\Administrator\Adapter\AdapterInterface;
use Joomla\Component\Media\Administrator\Event\MediaProviderEvent;
Expand Down Expand Up @@ -117,7 +118,7 @@ protected function resolveAdapterAndPath(String $path): array

if (!$this->getDefaultAdapterName())
{
throw new \InvalidArgumentException('No adapter found');
throw new \InvalidArgumentException(Text::_('COM_MEDIA_ERROR_NO_ADAPTER_FOUND'));
}

// If we have less than 2 parts, we return a default adapter name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function display($tpl = null)
if (empty($this->file->content))
{
// @todo error handling controller redirect files
throw new \Exception('No content available!');
throw new \Exception(Text::_('COM_MEDIA_ERROR_NO_CONTENT_AVAILABLE'));
}

$this->addToolbar();
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_menus/forms/item_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
type="radio"
label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
layout="joomla.form.field.radio.switcher"
default="1" filter="integer"
default="1"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function duplicate()
$this->app->enqueueMessage($e->getMessage(), 'warning');
}

$this->setRedirect('index.php?option=com_modules&view=modules');
$this->setRedirect('index.php?option=com_modules&view=modules' . $this->getRedirectToListAppend());
}

/**
Expand Down
Loading

0 comments on commit 594d6b9

Please sign in to comment.