diff --git a/administrator/components/com_admin/Controller/ProfileController.php b/administrator/components/com_admin/Controller/ProfileController.php
index de47ed2f108e4..24d3de41aa44f 100644
--- a/administrator/components/com_admin/Controller/ProfileController.php
+++ b/administrator/components/com_admin/Controller/ProfileController.php
@@ -11,6 +11,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\MVC\Controller\FormController;
+use Joomla\CMS\Router\Route;
/**
* User profile controller class.
@@ -48,14 +49,14 @@ protected function allowEdit($data = array(), $key = 'id')
*/
public function save($key = null, $urlVar = null)
{
- $this->setRedirect(\JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->app->getIdentity()->id, false));
+ $this->setRedirect(Route::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->app->getIdentity()->id, false));
$return = parent::save();
if ($this->getTask() != 'apply')
{
// Redirect to the main page.
- $this->setRedirect(\JRoute::_('index.php', false));
+ $this->setRedirect(Route::_('index.php', false));
}
return $return;
@@ -75,7 +76,7 @@ public function cancel($key = null)
$return = parent::cancel($key);
// Redirect to the main page.
- $this->setRedirect(\JRoute::_('index.php', false));
+ $this->setRedirect(Route::_('index.php', false));
return $return;
}
diff --git a/administrator/components/com_admin/Model/HelpModel.php b/administrator/components/com_admin/Model/HelpModel.php
index 422927dcef8f6..0b18ab9fcf391 100644
--- a/administrator/components/com_admin/Model/HelpModel.php
+++ b/administrator/components/com_admin/Model/HelpModel.php
@@ -10,9 +10,12 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Help\Help as JHelp;
+use Joomla\CMS\Help\Help;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\String\StringHelper;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Filesystem\Folder;
+use Joomla\CMS\Factory;
/**
* Admin Component Help Model
@@ -72,7 +75,7 @@ public function &getHelpSearch()
{
if (is_null($this->help_search))
{
- $this->help_search = \JFactory::getApplication()->input->getString('helpsearch');
+ $this->help_search = Factory::getApplication()->input->getString('helpsearch');
}
return $this->help_search;
@@ -89,7 +92,7 @@ public function &getPage()
{
if (is_null($this->page))
{
- $this->page = JHelp::createUrl(\JFactory::getApplication()->input->get('page', 'JHELP_START_HERE'));
+ $this->page = Help::createUrl(Factory::getApplication()->input->get('page', 'JHELP_START_HERE'));
}
return $this->page;
@@ -106,7 +109,7 @@ public function getLangTag()
{
if (is_null($this->lang_tag))
{
- $this->lang_tag = \JFactory::getLanguage()->getTag();
+ $this->lang_tag = Factory::getLanguage()->getTag();
if (!is_dir(JPATH_BASE . '/help/' . $this->lang_tag))
{
@@ -142,7 +145,7 @@ public function &getToc()
// Loop through the data array
foreach ($data as $key => $value)
{
- $this->toc[$key] = \JText::_('COM_ADMIN_HELP_' . $value);
+ $this->toc[$key] = Text::_('COM_ADMIN_HELP_' . $value);
}
// Sort the Table of Contents
@@ -153,7 +156,7 @@ public function &getToc()
// Get Help files
jimport('joomla.filesystem.folder');
- $files = \JFolder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
+ $files = Folder::files(JPATH_BASE . '/help/' . $lang_tag, '\.xml$|\.html$');
$this->toc = array();
foreach ($files as $file)
@@ -173,7 +176,7 @@ public function &getToc()
}
// Translate the page title
- $title = \JText::_($title);
+ $title = Text::_($title);
// Strip the extension
$file = preg_replace('#\.xml$|\.html$#', '', $file);
@@ -204,7 +207,7 @@ public function &getLatestVersionCheck()
{
$override = 'https://help.joomla.org/proxy/index.php?keyref=Help{major}{minor}:'
. 'Joomla_Version_{major}_{minor}_{maintenance}/{langcode}&lang={langcode}';
- $this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
+ $this->latest_version_check = Help::createUrl('JVERSION', false, $override);
}
return $this->latest_version_check;
diff --git a/administrator/components/com_admin/Model/ProfileModel.php b/administrator/components/com_admin/Model/ProfileModel.php
index 1fa6f6da2672e..9c7da619e1d8d 100644
--- a/administrator/components/com_admin/Model/ProfileModel.php
+++ b/administrator/components/com_admin/Model/ProfileModel.php
@@ -14,6 +14,7 @@
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Users\Administrator\Model\UserModel;
+use Joomla\CMS\Factory;
/**
* User model.
@@ -68,7 +69,7 @@ public function getForm($data = array(), $loadData = true)
}
// If the user needs to change their password, mark the password fields as required
- if (\JFactory::getUser()->requireReset)
+ if (Factory::getUser()->requireReset)
{
$form->setFieldAttribute('password', 'required', 'true');
$form->setFieldAttribute('password2', 'required', 'true');
@@ -87,7 +88,7 @@ public function getForm($data = array(), $loadData = true)
protected function loadFormData()
{
// Check the session for previously entered form data.
- $data = \JFactory::getApplication()->getUserState('com_users.edit.user.data', array());
+ $data = Factory::getApplication()->getUserState('com_users.edit.user.data', array());
if (empty($data))
{
@@ -113,7 +114,7 @@ protected function loadFormData()
*/
public function getItem($pk = null)
{
- return parent::getItem(\JFactory::getUser()->id);
+ return parent::getItem(Factory::getUser()->id);
}
/**
@@ -127,7 +128,7 @@ public function getItem($pk = null)
*/
public function save($data)
{
- $user = \JFactory::getUser();
+ $user = Factory::getUser();
unset($data['id']);
unset($data['groups']);
diff --git a/administrator/components/com_admin/Model/SysinfoModel.php b/administrator/components/com_admin/Model/SysinfoModel.php
index dd8c33b9423ed..2d5295441766d 100644
--- a/administrator/components/com_admin/Model/SysinfoModel.php
+++ b/administrator/components/com_admin/Model/SysinfoModel.php
@@ -14,6 +14,9 @@
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Version;
use Joomla\Registry\Registry;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Log\Log;
+use Joomla\CMS\Factory;
/**
* Model for the display of system information.
@@ -372,7 +375,7 @@ public function &getPHPInfo()
{
if (!$this->phpinfoEnabled())
{
- $this->php_info = \JText::_('COM_ADMIN_PHPINFO_DISABLED');
+ $this->php_info = Text::_('COM_ADMIN_PHPINFO_DISABLED');
return $this->php_info;
}
@@ -432,7 +435,7 @@ public function getPhpInfoArray()
public function getExtensions()
{
$installed = array();
- $db = \JFactory::getDbo();
+ $db = Factory::getDbo();
$query = $db->getQuery(true)
->select('*')
->from($db->qn('#__extensions'));
@@ -446,12 +449,12 @@ public function getExtensions()
{
try
{
- \JLog::add(\JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), \JLog::WARNING, 'jerror');
+ Log::add(Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()), Log::WARNING, 'jerror');
}
catch (\RuntimeException $exception)
{
- \JFactory::getApplication()->enqueueMessage(
- \JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()),
+ Factory::getApplication()->enqueueMessage(
+ Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()),
'warning'
);
}
@@ -474,7 +477,7 @@ public function getExtensions()
$installed[$extension->name] = array(
'name' => $extension->name,
'type' => $extension->type,
- 'state' => $extension->enabled ? \JText::_('JENABLED') : \JText::_('JDISABLED'),
+ 'state' => $extension->enabled ? Text::_('JENABLED') : Text::_('JDISABLED'),
'author' => 'unknown',
'version' => 'unknown',
'creationDate' => 'unknown',
@@ -514,7 +517,7 @@ public function getDirectory($public = false)
$this->directories = array();
- $registry = \JFactory::getApplication()->getConfig();
+ $registry = Factory::getApplication()->getConfig();
$cparams = ComponentHelper::getParams('com_media');
$this->addDirectory('administrator/components', JPATH_ADMINISTRATOR . '/components');
@@ -685,7 +688,7 @@ public function &getEditor()
return $this->editor;
}
- $this->editor = \JFactory::getApplication()->get('editor');
+ $this->editor = Factory::getApplication()->get('editor');
return $this->editor;
}
diff --git a/administrator/components/com_admin/View/Help/HtmlView.php b/administrator/components/com_admin/View/Help/HtmlView.php
index ff8ebec464e88..58b03325bd27d 100644
--- a/administrator/components/com_admin/View/Help/HtmlView.php
+++ b/administrator/components/com_admin/View/Help/HtmlView.php
@@ -11,6 +11,8 @@
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* HTML View class for the Admin component
@@ -98,6 +100,6 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- \JToolbarHelper::title(\JText::_('COM_ADMIN_HELP'), 'support help_header');
+ ToolbarHelper::title(Text::_('COM_ADMIN_HELP'), 'support help_header');
}
}
diff --git a/administrator/components/com_admin/View/Profile/HtmlView.php b/administrator/components/com_admin/View/Profile/HtmlView.php
index 3a7b216d37969..bc6e7accb827f 100644
--- a/administrator/components/com_admin/View/Profile/HtmlView.php
+++ b/administrator/components/com_admin/View/Profile/HtmlView.php
@@ -12,6 +12,8 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Factory;
/**
* View class to allow users edit their own profile.
@@ -82,9 +84,9 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- \JFactory::getApplication()->input->set('hidemainmenu', 1);
+ Factory::getApplication()->input->set('hidemainmenu', 1);
- ToolbarHelper::title(\JText::_('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user user-profile');
+ ToolbarHelper::title(Text::_('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user user-profile');
ToolbarHelper::saveGroup(
[
diff --git a/administrator/components/com_admin/View/Sysinfo/HtmlView.php b/administrator/components/com_admin/View/Sysinfo/HtmlView.php
index be18860d67dcb..83d3f179524fd 100644
--- a/administrator/components/com_admin/View/Sysinfo/HtmlView.php
+++ b/administrator/components/com_admin/View/Sysinfo/HtmlView.php
@@ -13,6 +13,9 @@
use Joomla\CMS\Access\Exception\Notallowed;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\Factory;
/**
* Sysinfo View class for the Admin component
@@ -73,9 +76,9 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null)
{
// Access check.
- if (!\JFactory::getUser()->authorise('core.admin'))
+ if (!Factory::getUser()->authorise('core.admin'))
{
- throw new Notallowed(\JText::_('JERROR_ALERTNOAUTHOR'), 403);
+ throw new Notallowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
$this->php_settings = $this->get('PhpSettings');
@@ -98,9 +101,9 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
- ToolbarHelper::title(\JText::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-2 systeminfo');
- ToolbarHelper::link(\JRoute::_('index.php?option=com_admin&view=sysinfo&format=text'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT', 'download');
- ToolbarHelper::link(\JRoute::_('index.php?option=com_admin&view=sysinfo&format=json'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON', 'download');
+ ToolbarHelper::title(Text::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-2 systeminfo');
+ ToolbarHelper::link(Route::_('index.php?option=com_admin&view=sysinfo&format=text'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT', 'download');
+ ToolbarHelper::link(Route::_('index.php?option=com_admin&view=sysinfo&format=json'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON', 'download');
ToolbarHelper::help('JHELP_SITE_SYSTEM_INFORMATION');
}
}
diff --git a/administrator/components/com_admin/View/Sysinfo/JsonView.php b/administrator/components/com_admin/View/Sysinfo/JsonView.php
index 51dd13c12e96c..17d9c278e9e50 100644
--- a/administrator/components/com_admin/View/Sysinfo/JsonView.php
+++ b/administrator/components/com_admin/View/Sysinfo/JsonView.php
@@ -12,6 +12,8 @@
use Joomla\CMS\Access\Exception\Notallowed;
use Joomla\CMS\MVC\View\AbstractView;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Factory;
/**
* Sysinfo View class for the Admin component
@@ -32,9 +34,9 @@ class JsonView extends AbstractView
public function display($tpl = null)
{
// Access check.
- if (!\JFactory::getUser()->authorise('core.admin'))
+ if (!Factory::getUser()->authorise('core.admin'))
{
- throw new Notallowed(\JText::_('JERROR_ALERTNOAUTHOR'), 403);
+ throw new Notallowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
header('MIME-Version: 1.0');
@@ -45,7 +47,7 @@ public function display($tpl = null)
echo json_encode($data);
- \JFactory::getApplication()->close();
+ Factory::getApplication()->close();
}
/**
diff --git a/administrator/components/com_admin/View/Sysinfo/TextView.php b/administrator/components/com_admin/View/Sysinfo/TextView.php
index 59006e2e0aca5..32e574911bb1c 100644
--- a/administrator/components/com_admin/View/Sysinfo/TextView.php
+++ b/administrator/components/com_admin/View/Sysinfo/TextView.php
@@ -12,6 +12,8 @@
use Joomla\CMS\Access\Exception\Notallowed;
use Joomla\CMS\MVC\View\AbstractView;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Factory;
/**
* Sysinfo View class for the Admin component
@@ -32,9 +34,9 @@ class TextView extends AbstractView
public function display($tpl = null)
{
// Access check.
- if (!\JFactory::getUser()->authorise('core.admin'))
+ if (!Factory::getUser()->authorise('core.admin'))
{
- throw new Notallowed(\JText::_('JERROR_ALERTNOAUTHOR'), 403);
+ throw new Notallowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
header('Content-Type: text/plain; charset=utf-8');
@@ -62,7 +64,7 @@ public function display($tpl = null)
echo str_replace(JPATH_ROOT, 'xxxxxx', implode("\n\n", $lines));
- \JFactory::getApplication()->close();
+ Factory::getApplication()->close();
}
/**
@@ -79,27 +81,27 @@ protected function getLayoutData()
return array(
'info' => array(
- 'title' => \JText::_('COM_ADMIN_SYSTEM_INFORMATION', true),
+ 'title' => Text::_('COM_ADMIN_SYSTEM_INFORMATION', true),
'data' => $model->getSafeData('info')
),
'phpSettings' => array(
- 'title' => \JText::_('COM_ADMIN_PHP_SETTINGS', true),
+ 'title' => Text::_('COM_ADMIN_PHP_SETTINGS', true),
'data' => $model->getSafeData('phpSettings')
),
'config' => array(
- 'title' => \JText::_('COM_ADMIN_CONFIGURATION_FILE', true),
+ 'title' => Text::_('COM_ADMIN_CONFIGURATION_FILE', true),
'data' => $model->getSafeData('config')
),
'directories' => array(
- 'title' => \JText::_('COM_ADMIN_DIRECTORY_PERMISSIONS', true),
+ 'title' => Text::_('COM_ADMIN_DIRECTORY_PERMISSIONS', true),
'data' => $model->getSafeData('directory', true)
),
'phpInfo' => array(
- 'title' => \JText::_('COM_ADMIN_PHP_INFORMATION', true),
+ 'title' => Text::_('COM_ADMIN_PHP_INFORMATION', true),
'data' => $model->getSafeData('phpInfoArray')
),
'extensions' => array(
- 'title' => \JText::_('COM_ADMIN_EXTENSIONS', true),
+ 'title' => Text::_('COM_ADMIN_EXTENSIONS', true),
'data' => $model->getSafeData('extensions')
)
);
diff --git a/administrator/components/com_admin/postinstall/eaccelerator.php b/administrator/components/com_admin/postinstall/eaccelerator.php
index 881cab6b9b9d9..c01ba08164f38 100644
--- a/administrator/components/com_admin/postinstall/eaccelerator.php
+++ b/administrator/components/com_admin/postinstall/eaccelerator.php
@@ -13,6 +13,11 @@
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Client\ClientHelper;
+use Joomla\CMS\Fileystem\File;
+use Joomla\CMS\Filesystem\Path;
+use Joomla\CMS\Factory;
/**
* Checks if the eAccelerator caching method is enabled.
@@ -28,7 +33,7 @@
*/
function admin_postinstall_eaccelerator_condition()
{
- $app = JFactory::getApplication();
+ $app = Factory::getApplication();
$cacheHandler = $app->get('cacheHandler', '');
return (ucfirst($cacheHandler) == 'Eaccelerator');
@@ -55,27 +60,27 @@ function admin_postinstall_eaccelerator_action()
$file = JPATH_CONFIGURATION . '/configuration.php';
// Get the new FTP credentials.
- $ftp = JClientHelper::getCredentials('ftp', true);
+ $ftp = ClientHelper::getCredentials('ftp', true);
// Attempt to make the file writeable if using FTP.
- if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644'))
+ if (!$ftp['enabled'] && Path::isOwner($file) && !Path::setPermissions($file, '0644'))
{
- JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'), 'notice');
+ Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'), 'notice');
}
// Attempt to write the configuration file as a PHP class named JConfig.
$configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false));
- if (!JFile::write($file, $configuration))
+ if (!File::write($file, $configuration))
{
- JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
+ Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_WRITE_FAILED'), 'error');
return;
}
// Attempt to make the file unwriteable if using FTP.
- if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444'))
+ if (!$ftp['enabled'] && Path::isOwner($file) && !Path::setPermissions($file, '0444'))
{
- JFactory::getApplication()->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'), 'notice');
+ Factory::getApplication()->enqueueMessage(Text::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'), 'notice');
}
}
diff --git a/administrator/components/com_admin/postinstall/languageaccess340.php b/administrator/components/com_admin/postinstall/languageaccess340.php
index 915379dfd9fad..b9fab5252bbf8 100644
--- a/administrator/components/com_admin/postinstall/languageaccess340.php
+++ b/administrator/components/com_admin/postinstall/languageaccess340.php
@@ -12,6 +12,8 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
+
/**
* Checks if the installation is affected by the issue with content languages access in 3.4.0
*
@@ -24,7 +26,7 @@
*/
function admin_postinstall_languageaccess340_condition()
{
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('access'))
->from($db->quoteName('#__languages'))
diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php
index 511948a680007..6e256ebb59a72 100644
--- a/administrator/components/com_admin/script.php
+++ b/administrator/components/com_admin/script.php
@@ -10,6 +10,12 @@
defined('_JEXEC') or die;
use Joomla\Database\UTF8MB4SupportInterface;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Extension\ExtensionHelper;
+use Joomla\CMS\Fileystem\File;
+use Joomla\CMS\Log\Log;
+use Joomla\CMS\Filesystem\Folder;
+use Joomla\CMS\Factory;
/**
* Script file of Joomla CMS
@@ -29,8 +35,8 @@ class JoomlaInstallerScript
/**
* Function to act prior to installation process begins
*
- * @param string $action Which action is happening (install|uninstall|discover_install|update)
- * @param JInstaller $installer The class calling this method
+ * @param string $action Which action is happening (install|uninstall|discover_install|update)
+ * @param Installer $installer The class calling this method
*
* @return boolean True on success
*
@@ -62,7 +68,7 @@ public function preflight($action, $installer)
/**
* Method to update Joomla!
*
- * @param JInstaller $installer The class calling this method
+ * @param Installer $installer The class calling this method
*
* @return void
*/
@@ -71,11 +77,11 @@ public function update($installer)
$options['format'] = '{DATE}\t{TIME}\t{LEVEL}\t{CODE}\t{MESSAGE}';
$options['text_file'] = 'joomla_update.php';
- JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror'));
+ Log::addLogger($options, Log::INFO, array('Update', 'databasequery', 'jerror'));
try
{
- JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update');
+ Log::add(Text::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), Log::INFO, 'Update');
}
catch (RuntimeException $exception)
{
@@ -105,7 +111,7 @@ public function update($installer)
*/
protected function clearStatsCache()
{
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
try
{
@@ -121,7 +127,7 @@ protected function clearStatsCache()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return;
}
@@ -149,7 +155,7 @@ protected function clearStatsCache()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return;
}
@@ -162,7 +168,7 @@ protected function clearStatsCache()
*/
protected function updateDatabase()
{
- if (JFactory::getDbo()->getServerType() === 'mysql')
+ if (Factory::getDbo()->getServerType() === 'mysql')
{
$this->updateDatabaseMysql();
}
@@ -175,7 +181,7 @@ protected function updateDatabase()
*/
protected function updateDatabaseMysql()
{
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
$db->setQuery('SHOW ENGINES');
@@ -185,7 +191,7 @@ protected function updateDatabaseMysql()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return;
}
@@ -205,7 +211,7 @@ protected function updateDatabaseMysql()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return;
}
@@ -221,10 +227,10 @@ protected function updateDatabaseMysql()
*/
protected function updateManifestCaches()
{
- $extensions = JExtensionHelper::getCoreExtensions();
+ $extensions = ExtensionHelper::getCoreExtensions();
// Attempt to refresh manifest caches
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
$query = $db->getQuery(true)
->select('*')
->from('#__extensions');
@@ -247,18 +253,18 @@ protected function updateManifestCaches()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return;
}
- $installer = new JInstaller;
+ $installer = new Installer;
foreach ($extensions as $extension)
{
if (!$installer->refreshManifestCache($extension->extension_id))
{
- echo JText::sprintf('FILES_JOOMLA_ERROR_MANIFEST', $extension->type, $extension->element, $extension->name, $extension->client_id) . '
';
+ echo Text::sprintf('FILES_JOOMLA_ERROR_MANIFEST', $extension->type, $extension->element, $extension->name, $extension->client_id) . '
';
}
}
}
@@ -3944,9 +3950,9 @@ public function deleteUnexistingFiles()
foreach ($files as $file)
{
- if (JFile::exists(JPATH_ROOT . $file) && !JFile::delete(JPATH_ROOT . $file))
+ if (File::exists(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file))
{
- echo JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file) . '
';
+ echo Text::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $file) . '
';
}
}
@@ -3954,9 +3960,9 @@ public function deleteUnexistingFiles()
foreach ($folders as $folder)
{
- if (JFolder::exists(JPATH_ROOT . $folder) && !JFolder::delete(JPATH_ROOT . $folder))
+ if (Folder::exists(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder))
{
- echo JText::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder) . '
';
+ echo Text::sprintf('FILES_JOOMLA_ERROR_FILE_FOLDER', $folder) . '
';
}
}
}
@@ -3964,7 +3970,7 @@ public function deleteUnexistingFiles()
/**
* Method to create assets for newly installed components
*
- * @param JInstaller $installer The class calling this method
+ * @param Installer $installer The class calling this method
*
* @return boolean
*
@@ -3996,7 +4002,7 @@ public function updateAssets($installer)
if (!$asset->store())
{
// Install failed, roll back changes
- $installer->abort(JText::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_ROLLBACK', $asset->getError(true)));
+ $installer->abort(Text::sprintf('JLIB_INSTALLER_ABORT_COMP_INSTALL_ROLLBACK', $asset->getError(true)));
return false;
}
@@ -4018,7 +4024,7 @@ public function flushSessions()
* The session may have not been started yet (e.g. CLI-based Joomla! update scripts). Let's make sure we do
* have a valid session.
*/
- $session = JFactory::getSession();
+ $session = Factory::getSession();
/**
* Restarting the Session require a new login for the current user so lets check if we have an active session
@@ -4036,7 +4042,7 @@ public function flushSessions()
return true;
}
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
try
{
@@ -4057,7 +4063,7 @@ public function flushSessions()
}
catch (Exception $e)
{
- echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
+ echo Text::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '
';
return false;
}
@@ -4076,7 +4082,7 @@ public function flushSessions()
*/
public function convertTablesToUtf8mb4($doDbFixMsg = false)
{
- $db = JFactory::getDbo();
+ $db = Factory::getDbo();
if (!($db instanceof UTF8MB4SupportInterface))
{
@@ -4105,12 +4111,12 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
catch (Exception $e)
{
// Render the error message from the Exception object
- JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+ Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
if ($doDbFixMsg)
{
// Show an error message telling to check database problems
- JFactory::getApplication()->enqueueMessage(JText::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
+ Factory::getApplication()->enqueueMessage(Text::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
}
return;
@@ -4167,7 +4173,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
$converted = 0;
// Still render the error message from the Exception object
- JFactory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+ Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
}
}
}
@@ -4176,7 +4182,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
if ($doDbFixMsg && $converted == 0)
{
// Show an error message telling to check database problems
- JFactory::getApplication()->enqueueMessage(JText::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
+ Factory::getApplication()->enqueueMessage(Text::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
}
// Set flag in database if the update is done.
diff --git a/administrator/components/com_admin/tmpl/help/default.php b/administrator/components/com_admin/tmpl/help/default.php
index ce3934e20e55d..cdb73458308a8 100644
--- a/administrator/components/com_admin/tmpl/help/default.php
+++ b/administrator/components/com_admin/tmpl/help/default.php
@@ -9,22 +9,27 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\Router\Route;
+use Joomla\CMS\Help\Help;
+use Joomla\CMS\HTML\HTMLHelper;
+
?>
-