Skip to content

Commit a459e7f

Browse files
committed
Merge branch '4.4-dev' into 5/upmerge/1506
# Conflicts: # administrator/components/com_finder/src/Controller/IndexerController.php # components/com_content/tmpl/category/blog_children.php # components/com_content/tmpl/category/default_children.php
2 parents 2dfe0c7 + 87c7b1a commit a459e7f

File tree

212 files changed

+2229
-487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+2229
-487
lines changed

administrator/components/com_admin/tmpl/help/langforum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Joomla\CMS\Factory;
1414
use Joomla\CMS\Language\Text;
1515

16-
Factory::getLanguage()->load('mod_menu', JPATH_ADMINISTRATOR);
16+
$this->getLanguage()->load('mod_menu', JPATH_ADMINISTRATOR);
1717

1818
$forumId = (int) Text::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE');
1919

administrator/components/com_associations/src/View/Association/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function display($tpl = null): void
318318
* Let's put the target src into a variable to use in the javascript code
319319
* to avoid race conditions when the reference iframe loads.
320320
*/
321-
$this->document->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId));
321+
$this->getDocument()->addScriptOptions('targetSrc', Route::_($this->editUri . '&task=' . $task . '&id=' . (int) $this->targetId));
322322
$this->form->setValue('itemlanguage', '', $this->targetLanguage . ':' . $this->targetId . ':' . $this->targetAction);
323323
}
324324

administrator/components/com_banners/src/View/Tracks/RawView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function display($tpl = null): void
5353
throw new GenericDataException(implode("\n", $errors), 500);
5454
}
5555

56-
$this->document->setMimeEncoding($mimeType);
56+
$this->getDocument()->setMimeEncoding($mimeType);
5757

5858
/** @var CMSApplication $app */
5959
$app = Factory::getApplication();

administrator/components/com_categories/src/View/Categories/HtmlView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected function addToolbar()
176176
}
177177

178178
// Need to load the menu language file as mod_menu hasn't been loaded yet.
179-
$lang = Factory::getLanguage();
179+
$lang = $this->getLanguage();
180180
$lang->load($component, JPATH_BASE)
181181
|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component);
182182

@@ -192,7 +192,7 @@ protected function addToolbar()
192192

193193
// Load specific css component
194194
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
195-
$wa = $this->document->getWebAssetManager();
195+
$wa = $this->getDocument()->getWebAssetManager();
196196
$wa->getRegistry()->addExtensionRegistryFile($component);
197197

198198
if ($wa->assetExists('style', $component . '.admin-categories')) {

administrator/components/com_categories/src/View/Category/HtmlView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ protected function addToolbar()
152152
$componentParams = ComponentHelper::getParams($component);
153153

154154
// Need to load the menu language file as mod_menu hasn't been loaded yet.
155-
$lang = Factory::getLanguage();
155+
$lang = $this->getLanguage();
156156
$lang->load($component, JPATH_BASE)
157157
|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component);
158158

@@ -173,7 +173,7 @@ protected function addToolbar()
173173

174174
// Load specific css component
175175
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
176-
$wa = $this->document->getWebAssetManager();
176+
$wa = $this->getDocument()->getWebAssetManager();
177177
$wa->getRegistry()->addExtensionRegistryFile($component);
178178

179179
if ($wa->assetExists('style', $component . '.admin-categories')) {

administrator/components/com_config/src/Model/ApplicationModel.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
use Joomla\CMS\Language\Text;
2424
use Joomla\CMS\Log\Log;
2525
use Joomla\CMS\Mail\Exception\MailDisabledException;
26+
use Joomla\CMS\Mail\MailerFactoryAwareInterface;
27+
use Joomla\CMS\Mail\MailerFactoryAwareTrait;
2628
use Joomla\CMS\Mail\MailTemplate;
2729
use Joomla\CMS\MVC\Model\FormModel;
2830
use Joomla\CMS\Table\Asset;
@@ -45,8 +47,10 @@
4547
*
4648
* @since 3.2
4749
*/
48-
class ApplicationModel extends FormModel
50+
class ApplicationModel extends FormModel implements MailerFactoryAwareInterface
4951
{
52+
use MailerFactoryAwareTrait;
53+
5054
/**
5155
* Array of protected password fields from the configuration.php
5256
*
@@ -1178,22 +1182,23 @@ public function sendTestMail()
11781182
$input = $app->getInput()->json;
11791183
$smtppass = $input->get('smtppass', null, 'RAW');
11801184

1181-
$app->set('smtpauth', $input->get('smtpauth'));
1182-
$app->set('smtpuser', $input->get('smtpuser', '', 'STRING'));
1183-
$app->set('smtphost', $input->get('smtphost'));
1184-
$app->set('smtpsecure', $input->get('smtpsecure'));
1185-
$app->set('smtpport', $input->get('smtpport'));
1186-
$app->set('mailfrom', $input->get('mailfrom', '', 'STRING'));
1187-
$app->set('fromname', $input->get('fromname', '', 'STRING'));
1188-
$app->set('mailer', $input->get('mailer'));
1189-
$app->set('mailonline', $input->get('mailonline'));
1185+
$config = new Registry();
1186+
$config->set('smtpauth', $input->get('smtpauth'));
1187+
$config->set('smtpuser', $input->get('smtpuser', '', 'STRING'));
1188+
$config->set('smtphost', $input->get('smtphost'));
1189+
$config->set('smtpsecure', $input->get('smtpsecure'));
1190+
$config->set('smtpport', $input->get('smtpport'));
1191+
$config->set('mailfrom', $input->get('mailfrom', '', 'STRING'));
1192+
$config->set('fromname', $input->get('fromname', '', 'STRING'));
1193+
$config->set('mailer', $input->get('mailer'));
1194+
$config->set('mailonline', $input->get('mailonline'));
11901195

11911196
// Use smtppass only if it was submitted
11921197
if ($smtppass !== null) {
1193-
$app->set('smtppass', $smtppass);
1198+
$config->set('smtppass', $smtppass);
11941199
}
11951200

1196-
$mail = Factory::getMailer();
1201+
$mail = $this->getMailerFactory()->createMailer($config);
11971202

11981203
// Prepare email and try to send it
11991204
$mailer = new MailTemplate('com_config.test_mail', $user->getParam('language', $app->get('language')), $mail);

administrator/components/com_content/tmpl/articles/default.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@
7878
?>
7979
<?php if (empty($this->items)) : ?>
8080
<div class="alert alert-info">
81-
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
82-
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
81+
<span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo $this->_('INFO'); ?></span>
82+
<?php echo $this->_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
8383
</div>
8484
<?php else : ?>
8585
<table class="table itemList" id="articleList">
8686
<caption class="visually-hidden">
87-
<?php echo Text::_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>,
88-
<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
89-
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
87+
<?php echo $this->_('COM_CONTENT_ARTICLES_TABLE_CAPTION'); ?>,
88+
<span id="orderedBy"><?php echo $this->_('JGLOBAL_SORTED_BY'); ?> </span>,
89+
<span id="filteredBy"><?php echo $this->_('JGLOBAL_FILTERED_BY'); ?></span>
9090
</caption>
9191
<thead>
9292
<tr>
@@ -179,7 +179,7 @@
179179
if (!$canChange) {
180180
$iconClass = ' inactive';
181181
} elseif (!$saveOrder) {
182-
$iconClass = ' inactive" title="' . Text::_('JORDERINGDISABLED');
182+
$iconClass = ' inactive" title="' . $this->_('JORDERINGDISABLED');
183183
}
184184
?>
185185
<span class="sortable-handler<?php echo $iconClass ?>">
@@ -194,8 +194,8 @@
194194
<?php
195195
$options = [
196196
'transitions' => $transitions,
197-
'title' => Text::_($item->stage_title),
198-
'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)),
197+
'title' => $this->_($item->stage_title),
198+
'tip_content' => Text::sprintf('JWORKFLOW', $this->_($item->workflow_title)),
199199
'id' => 'workflow-' . $item->id,
200200
'task' => 'articles.runTransition'
201201
];
@@ -204,7 +204,7 @@
204204
->render(0, $i);
205205
?>
206206
<div class="small">
207-
<?php echo Text::_($item->stage_title); ?>
207+
<?php echo $this->_($item->stage_title); ?>
208208
</div>
209209
</td>
210210
<?php endif; ?>
@@ -238,7 +238,7 @@
238238
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?>
239239
<?php endif; ?>
240240
<?php if ($canEdit || $canEditOwn) : ?>
241-
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->title); ?>">
241+
<a href="<?php echo Route::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo $this->_('JACTION_EDIT'); ?> <?php echo $this->escape($item->title); ?>">
242242
<?php echo $this->escape($item->title); ?></a>
243243
<?php else : ?>
244244
<span title="<?php echo Text::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
@@ -254,14 +254,14 @@
254254
<?php
255255
$ParentCatUrl = Route::_('index.php?option=com_categories&task=category.edit&id=' . $item->parent_category_id . '&extension=com_content');
256256
$CurrentCatUrl = Route::_('index.php?option=com_categories&task=category.edit&id=' . $item->catid . '&extension=com_content');
257-
$EditCatTxt = Text::_('COM_CONTENT_EDIT_CATEGORY');
258-
echo Text::_('JCATEGORY') . ': ';
257+
$EditCatTxt = $this->_('COM_CONTENT_EDIT_CATEGORY');
258+
echo $this->_('JCATEGORY') . ': ';
259259
if ($item->category_level != '1') :
260260
if ($item->parent_category_level != '1') :
261261
echo ' &#187; ';
262262
endif;
263263
endif;
264-
if (Factory::getLanguage()->isRtl()) {
264+
if ($this->getLanguage()->isRtl()) {
265265
if ($canEditCat || $canEditOwnCat) :
266266
echo '<a href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
267267
endif;
@@ -299,7 +299,7 @@
299299
endif;
300300
}
301301
if ($item->category_published < '1') :
302-
echo $item->category_published == '0' ? ' (' . Text::_('JUNPUBLISHED') . ')' : ' (' . Text::_('JTRASHED') . ')';
302+
echo $item->category_published == '0' ? ' (' . $this->_('JUNPUBLISHED') . ')' : ' (' . $this->_('JTRASHED') . ')';
303303
endif;
304304
?>
305305
</div>
@@ -314,7 +314,7 @@
314314
<?php echo $this->escape($item->author_name); ?>
315315
</a>
316316
<?php else : ?>
317-
<?php echo Text::_('JNONE'); ?>
317+
<?php echo $this->_('JNONE'); ?>
318318
<?php endif; ?>
319319
<?php if ($item->created_by_alias) : ?>
320320
<div class="smallsub"><?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->created_by_alias)); ?></div>
@@ -335,7 +335,7 @@
335335
<td class="small d-none d-md-table-cell text-center">
336336
<?php
337337
$date = $item->{$orderingColumn};
338-
echo $date > 0 ? HTMLHelper::_('date', $date, Text::_('DATE_FORMAT_LC4')) : '-';
338+
echo $date > 0 ? HTMLHelper::_('date', $date, $this->_('DATE_FORMAT_LC4')) : '-';
339339
?>
340340
</td>
341341
<?php if ($this->hits) : ?>
@@ -379,7 +379,7 @@
379379
'bootstrap.renderModal',
380380
'collapseModal',
381381
[
382-
'title' => Text::_('COM_CONTENT_BATCH_OPTIONS'),
382+
'title' => $this->_('COM_CONTENT_BATCH_OPTIONS'),
383383
'footer' => $this->loadTemplate('batch_footer'),
384384
],
385385
$this->loadTemplate('batch_body')

administrator/components/com_content/tmpl/featured/default.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265
echo ' &#187; ';
266266
endif;
267267
endif;
268-
if (Factory::getLanguage()->isRtl()) {
268+
if ($this->getLanguage()->isRtl()) {
269269
if ($canEditCat || $canEditOwnCat) :
270270
echo '<a href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
271271
endif;

administrator/components/com_contenthistory/src/View/Preview/HtmlView.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Joomla\Component\Contenthistory\Administrator\View\Preview;
1212

13-
use Joomla\CMS\Factory;
1413
use Joomla\CMS\Language\Text;
1514
use Joomla\CMS\MVC\View\GenericDataException;
1615
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@@ -55,7 +54,7 @@ public function display($tpl = null)
5554
$this->item = $this->get('Item');
5655

5756
if (false === $this->item) {
58-
Factory::getLanguage()->load('com_content', JPATH_SITE, null, true);
57+
$this->getLanguage()->load('com_content', JPATH_SITE, null, true);
5958

6059
throw new \Exception(Text::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND'), 404);
6160
}

administrator/components/com_cpanel/src/View/Cpanel/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function display($tpl = null)
7575
}
7676

7777
// Need to load the language file
78-
$lang = Factory::getLanguage();
78+
$lang = $this->getLanguage();
7979
$lang->load($component, JPATH_BASE)
8080
|| $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component);
8181
$lang->load($component);

0 commit comments

Comments
 (0)