Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load global admin language file in Editors-XTD modals #25472

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/com_contact/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ class ContactController extends JControllerLegacy
*/
public function __construct($config = array())
{
$this->input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$this->input = $app->input;

// Contact frontpage Editor contacts proxying:
if ($this->input->get('view') === 'contacts' && $this->input->get('layout') === 'modal')
{
JHtml::_('stylesheet', 'system/adminlist.css', array(), true);
$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;

// Load global backend language file.
$app->getLanguage()->load('joomla', JPATH_ADMINISTRATOR);
}

parent::__construct($config);
Expand Down
6 changes: 5 additions & 1 deletion components/com_content/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class ContentController extends JControllerLegacy
*/
public function __construct($config = array())
{
$this->input = JFactory::getApplication()->input;
$app = JFactory::getApplication();
$this->input = $app->input;

// Article frontpage Editor pagebreak proxying:
if ($this->input->get('view') === 'article' && $this->input->get('layout') === 'pagebreak')
Expand All @@ -41,6 +42,9 @@ public function __construct($config = array())
{
JHtml::_('stylesheet', 'system/adminlist.css', array('version' => 'auto', 'relative' => true));
$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;

// Load global backend language file.
$app->getLanguage()->load('joomla', JPATH_ADMINISTRATOR);
}

parent::__construct($config);
Expand Down
3 changes: 2 additions & 1 deletion components/com_fields/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ public function __construct($config = array())
// Frontpage Editor Fields Button proxying:
if ($this->input->get('view') === 'fields' && $this->input->get('layout') === 'modal')
{
// Load the backend language file.
// Load backend language files.
$lang = JFactory::getLanguage();
$lang->load('joomla', JPATH_ADMINISTRATOR);
$lang->load('com_fields', JPATH_ADMINISTRATOR);

$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
Expand Down