- $this)); ?>
+ $this)); ?>
items)) : ?>
diff --git a/administrator/components/com_menus/Model/MenuModel.php b/administrator/components/com_menus/Model/MenuModel.php
index 6a26a56a08086..7266c2ff4b19f 100644
--- a/administrator/components/com_menus/Model/MenuModel.php
+++ b/administrator/components/com_menus/Model/MenuModel.php
@@ -14,7 +14,9 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\FormModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
@@ -81,7 +83,7 @@ protected function canEditState($record)
*/
public function getTable($type = 'MenuType', $prefix = '\JTable', $config = array())
{
- return \JTable::getInstance($type, $prefix, $config);
+ return Table::getInstance($type, $prefix, $config);
}
/**
@@ -138,7 +140,7 @@ public function &getItem($itemId = null)
}
$properties = $table->getProperties(1);
- $value = ArrayHelper::toObject($properties, 'JObject');
+ $value = ArrayHelper::toObject($properties, CMSObject::class);
return $value;
}
diff --git a/administrator/components/com_menus/Model/MenutypesModel.php b/administrator/components/com_menus/Model/MenutypesModel.php
index 5148e853d16ed..464b756ddadf8 100644
--- a/administrator/components/com_menus/Model/MenutypesModel.php
+++ b/administrator/components/com_menus/Model/MenutypesModel.php
@@ -15,6 +15,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
/**
@@ -206,7 +207,7 @@ protected function getTypeOptionsFromXml($file, $component)
if (!empty($menu['options']) && $menu['options'] == 'none')
{
// Create the menu option for the component.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = (string) $menu['name'];
$o->description = (string) $menu['msg'];
$o->request = array('option' => $component);
@@ -238,7 +239,7 @@ protected function getTypeOptionsFromXml($file, $component)
if ($child->getName() == 'option')
{
// Create the menu option for the component.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = (string) $child['name'];
$o->description = (string) $child['msg'];
$o->request = array('option' => $component, (string) $optionsNode['var'] => (string) $child['value']);
@@ -248,7 +249,7 @@ protected function getTypeOptionsFromXml($file, $component)
elseif ($child->getName() == 'default')
{
// Create the menu option for the component.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = (string) $child['name'];
$o->description = (string) $child['msg'];
$o->request = array('option' => $component);
@@ -326,7 +327,7 @@ protected function getTypeOptionsFromMvc($component)
if ($child->getName() == 'option')
{
// Create the menu option for the component.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = (string) $child['name'];
$o->description = (string) $child['msg'];
$o->request = array('option' => $component, 'view' => $view, (string) $optionsNode['var'] => (string) $child['value']);
@@ -336,7 +337,7 @@ protected function getTypeOptionsFromMvc($component)
elseif ($child->getName() == 'default')
{
// Create the menu option for the component.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = (string) $child['name'];
$o->description = (string) $child['msg'];
$o->request = array('option' => $component, 'view' => $view);
@@ -446,7 +447,7 @@ protected function getTypeOptionsFromManifest($component)
}
$o->request = array_filter($request, 'strlen');
- $options[] = new \JObject($o);
+ $options[] = new CMSObject($o);
// Do not repeat the default view link (index.php?option=com_abc).
if (count($o->request) == 1)
@@ -457,7 +458,7 @@ protected function getTypeOptionsFromManifest($component)
if ($ro)
{
- $options[] = new \JObject($ro);
+ $options[] = new CMSObject($ro);
}
return $options;
@@ -556,7 +557,7 @@ protected function getTypeOptionsFromLayouts($component, $view)
$layout = basename($layout, '.xml');
// Create the menu option for the layout.
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = ucfirst($layout);
$o->description = '';
$o->request = array('option' => $component, 'view' => $view);
diff --git a/administrator/components/com_menus/View/Menutypes/HtmlView.php b/administrator/components/com_menus/View/Menutypes/HtmlView.php
index 4277e4d8b25a7..1c88a803f0982 100644
--- a/administrator/components/com_menus/View/Menutypes/HtmlView.php
+++ b/administrator/components/com_menus/View/Menutypes/HtmlView.php
@@ -14,6 +14,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
@@ -123,28 +124,28 @@ protected function addCustomTypes(&$types)
// Adding System Links
$list = array();
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = 'COM_MENUS_TYPE_EXTERNAL_URL';
$o->type = 'url';
$o->description = 'COM_MENUS_TYPE_EXTERNAL_URL_DESC';
$o->request = null;
$list[] = $o;
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = 'COM_MENUS_TYPE_ALIAS';
$o->type = 'alias';
$o->description = 'COM_MENUS_TYPE_ALIAS_DESC';
$o->request = null;
$list[] = $o;
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = 'COM_MENUS_TYPE_SEPARATOR';
$o->type = 'separator';
$o->description = 'COM_MENUS_TYPE_SEPARATOR_DESC';
$o->request = null;
$list[] = $o;
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = 'COM_MENUS_TYPE_HEADING';
$o->type = 'heading';
$o->description = 'COM_MENUS_TYPE_HEADING_DESC';
@@ -153,7 +154,7 @@ protected function addCustomTypes(&$types)
if ($this->get('state')->get('client_id') == 1)
{
- $o = new \JObject;
+ $o = new CMSObject;
$o->title = 'COM_MENUS_TYPE_CONTAINER';
$o->type = 'container';
$o->description = 'COM_MENUS_TYPE_CONTAINER_DESC';
diff --git a/administrator/components/com_messages/Model/ConfigModel.php b/administrator/components/com_messages/Model/ConfigModel.php
index a3ee60b80034e..ddaeffb86588f 100644
--- a/administrator/components/com_messages/Model/ConfigModel.php
+++ b/administrator/components/com_messages/Model/ConfigModel.php
@@ -14,6 +14,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\FormModel;
+use Joomla\CMS\Object\CMSObject;
/**
* Message configuration model.
@@ -55,7 +56,7 @@ protected function populateState()
*/
public function &getItem()
{
- $item = new \JObject;
+ $item = new CMSObject;
$db = $this->getDbo();
$query = $db->getQuery(true)
diff --git a/administrator/components/com_modules/Controller/ModuleController.php b/administrator/components/com_modules/Controller/ModuleController.php
index 47d51f1e8db71..c777cf57196b9 100644
--- a/administrator/components/com_modules/Controller/ModuleController.php
+++ b/administrator/components/com_modules/Controller/ModuleController.php
@@ -12,6 +12,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
@@ -234,7 +235,7 @@ public function save($key = null, $urlVar = null)
$this->input->post->set('jform', $data);
// Add path of forms directory
- \JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/com_modules/models/forms');
+ Form::addFormPath(JPATH_ADMINISTRATOR . '/components/com_modules/models/forms');
}
return parent::save($key, $urlVar);
diff --git a/administrator/components/com_modules/Model/ModuleModel.php b/administrator/components/com_modules/Model/ModuleModel.php
index 2d9a3533f382e..af673a4eb583a 100644
--- a/administrator/components/com_modules/Model/ModuleModel.php
+++ b/administrator/components/com_modules/Model/ModuleModel.php
@@ -15,9 +15,11 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Path;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Table\Table;
@@ -545,7 +547,7 @@ public function getForm($data = array(), $loadData = true)
// Add the default fields directory
$baseFolder = $clientId ? JPATH_ADMINISTRATOR : JPATH_SITE;
- \JForm::addFieldPath($baseFolder . '/modules' . '/' . $module . '/field');
+ Form::addFieldPath($baseFolder . '/modules' . '/' . $module . '/field');
// These variables are used to add data from the plugin XML files.
$this->setState('item.client_id', $clientId);
@@ -718,7 +720,7 @@ public function getItem($pk = null)
// Convert to the \JObject before adding other data.
$properties = $table->getProperties(1);
- $this->_cache[$pk] = ArrayHelper::toObject($properties, 'JObject');
+ $this->_cache[$pk] = ArrayHelper::toObject($properties, CMSObject::class);
// Convert the params field to an array.
$registry = new Registry($table->params);
@@ -833,7 +835,7 @@ protected function prepareTable($table)
* @since 1.6
* @throws \Exception if there is an error loading the form.
*/
- protected function preprocessForm(\JForm $form, $data, $group = 'content')
+ protected function preprocessForm(Form $form, $data, $group = 'content')
{
$lang = Factory::getLanguage();
$clientId = $this->getState('item.client_id');
@@ -874,7 +876,7 @@ protected function preprocessForm(\JForm $form, $data, $group = 'content')
}
// Load the default advanced params
- \JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/com_modules/models/forms');
+ Form::addFormPath(JPATH_ADMINISTRATOR . '/components/com_modules/models/forms');
$form->loadFile('advanced', false);
// Trigger the default form events.
diff --git a/administrator/components/com_newsfeeds/Model/NewsfeedModel.php b/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
index 7feb29271b83d..3f1e9c7aad896 100644
--- a/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
+++ b/administrator/components/com_newsfeeds/Model/NewsfeedModel.php
@@ -13,6 +13,7 @@
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\LanguageHelper;
@@ -394,7 +395,7 @@ protected function getReorderConditions($table)
*
* @since 1.6
*/
- protected function preprocessForm(\JForm $form, $data, $group = 'content')
+ protected function preprocessForm(Form $form, $data, $group = 'content')
{
if ($this->canCreateCategory())
{
diff --git a/administrator/components/com_plugins/Model/PluginModel.php b/administrator/components/com_plugins/Model/PluginModel.php
index 91b256ecedae6..1ba500651ab72 100644
--- a/administrator/components/com_plugins/Model/PluginModel.php
+++ b/administrator/components/com_plugins/Model/PluginModel.php
@@ -13,9 +13,11 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Path;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Table\Table;
use Joomla\Registry\Registry;
@@ -96,7 +98,7 @@ public function getForm($data = array(), $loadData = true)
}
// Add the default fields directory
- \JForm::addFieldPath(JPATH_PLUGINS . '/' . $folder . '/' . $element . '/field');
+ Form::addFieldPath(JPATH_PLUGINS . '/' . $folder . '/' . $element . '/field');
// These variables are used to add data from the plugin XML files.
$this->setState('item.folder', $folder);
@@ -177,7 +179,7 @@ public function getItem($pk = null)
// Convert to the \JObject before adding other data.
$properties = $table->getProperties(1);
- $this->_cache[$pk] = ArrayHelper::toObject($properties, 'JObject');
+ $this->_cache[$pk] = ArrayHelper::toObject($properties, CMSObject::class);
// Convert the params field to an array.
$registry = new Registry($table->params);
@@ -246,7 +248,7 @@ protected function populateState()
* @throws \Exception if there is an error in the form event.
* @since 1.6
*/
- protected function preprocessForm(\JForm $form, $data, $group = 'content')
+ protected function preprocessForm(Form $form, $data, $group = 'content')
{
$folder = $this->getState('item.folder');
$element = $this->getState('item.element');
diff --git a/administrator/components/com_privacy/tmpl/capabilities/default.php b/administrator/components/com_privacy/tmpl/capabilities/default.php
index 4eaadf703dbac..d99b1379315c1 100644
--- a/administrator/components/com_privacy/tmpl/capabilities/default.php
+++ b/administrator/components/com_privacy/tmpl/capabilities/default.php
@@ -9,27 +9,30 @@
defined('_JEXEC') or die;
+use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Language\Text;
+
/** @var PrivacyViewCapabilities $this */
?>
-
-
+
+
capabilities)) : ?>
-
+
- 'slide-0')); ?>
+ 'slide-0')); ?>
capabilities as $extension => $capabilities) : ?>
-
+
-
+
-
+
-
+
diff --git a/administrator/components/com_privacy/tmpl/consents/default.php b/administrator/components/com_privacy/tmpl/consents/default.php
index 9ce8d93ecd3d5..ad534c7fcab78 100644
--- a/administrator/components/com_privacy/tmpl/consents/default.php
+++ b/administrator/components/com_privacy/tmpl/consents/default.php
@@ -10,6 +10,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Date\Date;
+use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
@@ -21,10 +22,10 @@
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.multiselect');
-$user = JFactory::getUser();
+$user = Factory::getUser();
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
-$now = JFactory::getDate();
+$now = Factory::getDate();
$stateIcons = array(-1 => 'trash', 0 => 'archive', 1 => 'publish');
$stateMsgs = array(
-1 => Text::_('COM_PRIVACY_CONSENTS_STATE_INVALIDATED'),
diff --git a/administrator/components/com_templates/Controller/StyleController.php b/administrator/components/com_templates/Controller/StyleController.php
index 3cce8bf6052c6..fd17d79087572 100644
--- a/administrator/components/com_templates/Controller/StyleController.php
+++ b/administrator/components/com_templates/Controller/StyleController.php
@@ -11,6 +11,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
@@ -72,7 +73,7 @@ public function save($key = null, $urlVar = null)
return false;
}
- \JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/com_templates/forms');
+ Form::addFormPath(JPATH_ADMINISTRATOR . '/components/com_templates/forms');
// Validate the posted data.
// Sometimes the form needs some posted data, such as for plugins and modules.
diff --git a/administrator/components/com_templates/Helper/TemplatesHelper.php b/administrator/components/com_templates/Helper/TemplatesHelper.php
index cbd022b9e55d9..f9d3d43513f42 100644
--- a/administrator/components/com_templates/Helper/TemplatesHelper.php
+++ b/administrator/components/com_templates/Helper/TemplatesHelper.php
@@ -16,6 +16,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Object\CMSObject;
/**
* Templates component helper.
@@ -103,7 +104,7 @@ public static function getTemplateOptions($clientId = '*')
*/
public static function parseXMLTemplateFile($templateBaseDir, $templateDir)
{
- $data = new \JObject;
+ $data = new CMSObject;
// Check of the xml file exists
$filePath = Path::clean($templateBaseDir . '/templates/' . $templateDir . '/templateDetails.xml');
diff --git a/administrator/components/com_templates/Model/StyleModel.php b/administrator/components/com_templates/Model/StyleModel.php
index bda0477881cf7..11784a7b7276e 100644
--- a/administrator/components/com_templates/Model/StyleModel.php
+++ b/administrator/components/com_templates/Model/StyleModel.php
@@ -19,6 +19,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\Registry\Registry;
@@ -365,7 +366,7 @@ public function getItem($pk = null)
// Convert to the \JObject before adding other data.
$properties = $table->getProperties(1);
- $this->_cache[$pk] = ArrayHelper::toObject($properties, 'JObject');
+ $this->_cache[$pk] = ArrayHelper::toObject($properties, CMSObject::class);
// Convert the params field to an array.
$registry = new Registry($table->params);
diff --git a/administrator/components/com_users/Model/GroupModel.php b/administrator/components/com_users/Model/GroupModel.php
index fbf760efa653c..0dec6b39c3efe 100644
--- a/administrator/components/com_users/Model/GroupModel.php
+++ b/administrator/components/com_users/Model/GroupModel.php
@@ -13,9 +13,11 @@
use Joomla\CMS\Access\Access;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\String\StringHelper;
@@ -128,9 +130,9 @@ protected function loadFormData()
* @since 1.6
* @throws \Exception if there is an error loading the form.
*/
- protected function preprocessForm(\JForm $form, $data, $group = '')
+ protected function preprocessForm(Form $form, $data, $group = '')
{
- $obj = is_array($data) ? ArrayHelper::toObject($data, 'JObject') : $data;
+ $obj = is_array($data) ? ArrayHelper::toObject($data, CMSObject::class) : $data;
if (isset($obj->parent_id) && $obj->parent_id == 0 && $obj->id > 0)
{
diff --git a/administrator/components/com_users/Model/MailModel.php b/administrator/components/com_users/Model/MailModel.php
index bfb3b8301b174..930ddf79ae885 100644
--- a/administrator/components/com_users/Model/MailModel.php
+++ b/administrator/components/com_users/Model/MailModel.php
@@ -15,6 +15,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\MVC\Model\AdminModel;
@@ -79,7 +80,7 @@ protected function loadFormData()
* @since 1.6
* @throws \Exception if there is an error loading the form.
*/
- protected function preprocessForm(\JForm $form, $data, $group = 'user')
+ protected function preprocessForm(Form $form, $data, $group = 'user')
{
parent::preprocessForm($form, $data, $group);
}
diff --git a/administrator/components/com_users/Model/UserModel.php b/administrator/components/com_users/Model/UserModel.php
index 1535c17a51ee8..3803941a0c964 100644
--- a/administrator/components/com_users/Model/UserModel.php
+++ b/administrator/components/com_users/Model/UserModel.php
@@ -16,6 +16,7 @@
use Joomla\CMS\Crypt\Crypt;
use Joomla\CMS\Encrypt\Aes;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
@@ -204,7 +205,7 @@ protected function loadFormData()
* @since 1.6
* @throws \Exception if there is an error in the form event.
*/
- protected function preprocessForm(\JForm $form, $data, $group = 'user')
+ protected function preprocessForm(Form $form, $data, $group = 'user')
{
parent::preprocessForm($form, $data, $group);
}
diff --git a/administrator/components/com_users/tmpl/group/edit.php b/administrator/components/com_users/tmpl/group/edit.php
index dd42bfa68d893..65c969ecd3798 100644
--- a/administrator/components/com_users/tmpl/group/edit.php
+++ b/administrator/components/com_users/tmpl/group/edit.php
@@ -11,6 +11,7 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
HTMLHelper::_('behavior.formvalidator');
@@ -23,7 +24,7 @@
form->renderField('parent_id'); ?>
ignore_fieldsets = array('group_details'); ?>
-
+
diff --git a/administrator/components/com_workflow/Controller/WorkflowController.php b/administrator/components/com_workflow/Controller/WorkflowController.php
index 71727219a0fab..b63a79a6341d8 100644
--- a/administrator/components/com_workflow/Controller/WorkflowController.php
+++ b/administrator/components/com_workflow/Controller/WorkflowController.php
@@ -15,6 +15,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
/**
* Workflow controller
@@ -155,7 +156,7 @@ protected function getRedirectToListAppend()
*
* @since 4.0.0
*/
- public function postSaveHook(\JModelLegacy $model, $validData = array())
+ public function postSaveHook(BaseDatabaseModel $model, $validData = array())
{
$task = $this->getTask();
diff --git a/administrator/components/com_workflow/Helper/WorkflowHelper.php b/administrator/components/com_workflow/Helper/WorkflowHelper.php
index 6dc7ec5554bb4..f446dc49ccdb5 100644
--- a/administrator/components/com_workflow/Helper/WorkflowHelper.php
+++ b/administrator/components/com_workflow/Helper/WorkflowHelper.php
@@ -12,6 +12,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
+use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Helper\ContentHelper;
/**
@@ -52,7 +53,7 @@ public static function addSubmenu($vName)
// Loading language file from the administrator/language directory then
// loading language file from the administrator/components/*extension*/language directory
$lang->load($component, JPATH_BASE, null, false, true)
- || $lang->load($component, \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true);
+ || $lang->load($component, Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true);
call_user_func([$class, 'addSubmenu'], $vName);
}
diff --git a/administrator/includes/framework.php b/administrator/includes/framework.php
index dc0f1f826ae44..100000ee9dd58 100644
--- a/administrator/includes/framework.php
+++ b/administrator/includes/framework.php
@@ -8,13 +8,15 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Version;
+
// System includes
require_once JPATH_LIBRARIES . '/bootstrap.php';
// Installation check, and check on removal of the install directory.
if (!file_exists(JPATH_CONFIGURATION . '/configuration.php')
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10)
- || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new JVersion)->isInDevelopmentState())))
+ || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new Version)->isInDevelopmentState())))
{
if (file_exists(JPATH_INSTALLATION . '/index.php'))
{
diff --git a/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php b/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php
index 7320064d409d4..e702ad3fc6cf4 100644
--- a/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php
+++ b/administrator/modules/mod_privacy_dashboard/mod_privacy_dashboard.php
@@ -9,25 +9,29 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
+use Joomla\CMS\Helper\ModuleHelper;
+use Joomla\CMS\HTML\HTMLHelper;
+
// Only super user can view this data
-if (!JFactory::getUser()->authorise('core.admin'))
+if (!Factory::getUser()->authorise('core.admin'))
{
return;
}
// Boot component to ensure HTML helpers are loaded
-JFactory::getApplication()->bootComponent('com_privacy');
+Factory::getApplication()->bootComponent('com_privacy');
// Load the privacy component language file.
-$lang = JFactory::getLanguage();
+$lang = Factory::getLanguage();
$lang->load('com_privacy', JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load('com_privacy', JPATH_ADMINISTRATOR . '/components/com_privacy', null, false, true);
-JHtml::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/html');
+HTMLHelper::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_privacy/helpers/html');
JLoader::register('ModPrivacyDashboardHelper', __DIR__ . '/helper.php');
$list = ModPrivacyDashboardHelper::getData();
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
-require JModuleHelper::getLayoutPath('mod_privacy_dashboard', $params->get('layout', 'default'));
+require ModuleHelper::getLayoutPath('mod_privacy_dashboard', $params->get('layout', 'default'));
diff --git a/administrator/modules/mod_stats_admin/tmpl/default.php b/administrator/modules/mod_stats_admin/tmpl/default.php
index b89022aaf77bc..df64d31bfba2f 100644
--- a/administrator/modules/mod_stats_admin/tmpl/default.php
+++ b/administrator/modules/mod_stats_admin/tmpl/default.php
@@ -9,10 +9,11 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
HTMLHelper::_('jquery.framework');
-JFactory::getDocument()->addScriptDeclaration('
+Factory::getDocument()->addScriptDeclaration('
jQuery(document).ready(function($) {
$("a.js-revert").on("click", function(e) {
e.preventDefault();
diff --git a/administrator/templates/atum/login.php b/administrator/templates/atum/login.php
index 8c5e6bb6d8e93..d3998ea38da88 100644
--- a/administrator/templates/atum/login.php
+++ b/administrator/templates/atum/login.php
@@ -86,7 +86,7 @@
-
+
diff --git a/api/includes/framework.php b/api/includes/framework.php
index d55daeb367b41..22dd7274c4040 100644
--- a/api/includes/framework.php
+++ b/api/includes/framework.php
@@ -8,13 +8,15 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Version;
+
// System includes
require_once JPATH_LIBRARIES . '/bootstrap.php';
// Installation check, and check on removal of the install directory.
if (!file_exists(JPATH_CONFIGURATION . '/configuration.php')
|| (filesize(JPATH_CONFIGURATION . '/configuration.php') < 10)
- || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new JVersion)->isInDevelopmentState())))
+ || (file_exists(JPATH_INSTALLATION . '/index.php') && (false === (new Version)->isInDevelopmentState())))
{
if (file_exists(JPATH_INSTALLATION . '/index.php'))
{
diff --git a/cli/finder_indexer.php b/cli/finder_indexer.php
index 4170efcd7ab10..8c38f3cad8788 100644
--- a/cli/finder_indexer.php
+++ b/cli/finder_indexer.php
@@ -22,6 +22,9 @@
const _JEXEC = 1;
use Joomla\CMS\Factory;
+use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\CMS\Plugin\PluginHelper;
// Load system defines
if (file_exists(dirname(__DIR__) . '/defines.php'))
@@ -89,7 +92,7 @@ class FinderCli extends \Joomla\CMS\Application\CliApplication
protected function doExecute()
{
// Print a blank line.
- $this->out(JText::_('FINDER_CLI'));
+ $this->out(Text::_('FINDER_CLI'));
$this->out('============================');
// Initialize the time value.
@@ -123,8 +126,8 @@ protected function doExecute()
}
// Total reporting.
- $this->out(JText::sprintf('FINDER_CLI_PROCESS_COMPLETE', round(microtime(true) - $this->time, 3)), true);
- $this->out(JText::sprintf('FINDER_CLI_PEAK_MEMORY_USAGE', number_format(memory_get_peak_usage(true))));
+ $this->out(Text::sprintf('FINDER_CLI_PROCESS_COMPLETE', round(microtime(true) - $this->time, 3)), true);
+ $this->out(Text::sprintf('FINDER_CLI_PEAK_MEMORY_USAGE', number_format(memory_get_peak_usage(true))));
// Print a blank line at the end.
$this->out();
@@ -150,11 +153,11 @@ private function index()
FinderIndexer::resetState();
// Import the plugins.
- JPluginHelper::importPlugin('system');
- JPluginHelper::importPlugin('finder');
+ PluginHelper::importPlugin('system');
+ PluginHelper::importPlugin('finder');
// Starting Indexer.
- $this->out(JText::_('FINDER_CLI_STARTING_INDEXER'), true);
+ $this->out(Text::_('FINDER_CLI_STARTING_INDEXER'), true);
// Trigger the onStartIndex event.
Factory::getApplication()->triggerEvent('onStartIndex');
@@ -166,13 +169,13 @@ private function index()
$state = FinderIndexer::getState();
// Setting up plugins.
- $this->out(JText::_('FINDER_CLI_SETTING_UP_PLUGINS'), true);
+ $this->out(Text::_('FINDER_CLI_SETTING_UP_PLUGINS'), true);
// Trigger the onBeforeIndex event.
Factory::getApplication()->triggerEvent('onBeforeIndex');
// Startup reporting.
- $this->out(JText::sprintf('FINDER_CLI_SETUP_ITEMS', $state->totalItems, round(microtime(true) - $this->time, 3)), true);
+ $this->out(Text::sprintf('FINDER_CLI_SETUP_ITEMS', $state->totalItems, round(microtime(true) - $this->time, 3)), true);
// Get the number of batches.
$t = (int) $state->totalItems;
@@ -194,7 +197,7 @@ private function index()
Factory::getApplication()->triggerEvent('onBuildIndex');
// Batch reporting.
- $this->out(JText::sprintf('FINDER_CLI_BATCH_COMPLETE', $i + 1, round(microtime(true) - $this->qtime, 3)), true);
+ $this->out(Text::sprintf('FINDER_CLI_BATCH_COMPLETE', $i + 1, round(microtime(true) - $this->qtime, 3)), true);
}
}
catch (Exception $e)
@@ -222,11 +225,11 @@ private function index()
*/
private function purge()
{
- $this->out(JText::_('FINDER_CLI_INDEX_PURGE'));
+ $this->out(Text::_('FINDER_CLI_INDEX_PURGE'));
// Load the model.
- JModelLegacy::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/models', 'FinderModel');
- $model = JModelLegacy::getInstance('Index', 'FinderModel');
+ BaseDatabaseModel::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/models', 'FinderModel');
+ $model = BaseDatabaseModel::getInstance('Index', 'FinderModel');
// Attempt to purge the index.
$return = $model->purge();
@@ -234,12 +237,12 @@ private function purge()
// If unsuccessful then abort.
if (!$return)
{
- $message = JText::_('FINDER_CLI_INDEX_PURGE_FAILED', $model->getError());
+ $message = Text::_('FINDER_CLI_INDEX_PURGE_FAILED', $model->getError());
$this->out($message);
exit();
}
- $this->out(JText::_('FINDER_CLI_INDEX_PURGE_SUCCESS'));
+ $this->out(Text::_('FINDER_CLI_INDEX_PURGE_SUCCESS'));
}
/**
@@ -254,7 +257,7 @@ private function purge()
*/
private function putFilters()
{
- $this->out(JText::_('FINDER_CLI_RESTORE_FILTERS'));
+ $this->out(Text::_('FINDER_CLI_RESTORE_FILTERS'));
$db = Factory::getDbo();
@@ -282,7 +285,7 @@ private function putFilters()
}
else
{
- $this->out(JText::sprintf('FINDER_CLI_FILTER_RESTORE_WARNING', $element['parent'], $element['title'], $element['filter']));
+ $this->out(Text::sprintf('FINDER_CLI_FILTER_RESTORE_WARNING', $element['parent'], $element['title'], $element['filter']));
}
}
@@ -298,7 +301,7 @@ private function putFilters()
$db->setQuery($query)->execute();
}
- $this->out(JText::sprintf('FINDER_CLI_RESTORE_FILTER_COMPLETED', count($this->filters)));
+ $this->out(Text::sprintf('FINDER_CLI_RESTORE_FILTER_COMPLETED', count($this->filters)));
}
/**
@@ -315,7 +318,7 @@ private function putFilters()
*/
private function getFilters()
{
- $this->out(JText::_('FINDER_CLI_SAVE_FILTERS'));
+ $this->out(Text::_('FINDER_CLI_SAVE_FILTERS'));
// Get the taxonomy ids used by the filters.
$db = Factory::getDbo();
@@ -354,7 +357,7 @@ private function getFilters()
}
}
- $this->out(JText::sprintf('FINDER_CLI_SAVE_FILTER_COMPLETED', count($filters)));
+ $this->out(Text::sprintf('FINDER_CLI_SAVE_FILTER_COMPLETED', count($filters)));
}
}
diff --git a/components/com_content/tmpl/category/default_articles.php b/components/com_content/tmpl/category/default_articles.php
index 79b75d9ae009e..1ef15d5a5bcfd 100644
--- a/components/com_content/tmpl/category/default_articles.php
+++ b/components/com_content/tmpl/category/default_articles.php
@@ -35,7 +35,7 @@
switch ($tagfilter)
{
case 'current_language' :
- $langFilter = JFactory::getApplication()->getLanguage()->getTag();
+ $langFilter = Factory::getApplication()->getLanguage()->getTag();
break;
case 'all' :
diff --git a/components/com_finder/Controller/DisplayController.php b/components/com_finder/Controller/DisplayController.php
index c315e667dbe3e..70d8d3355d3c9 100644
--- a/components/com_finder/Controller/DisplayController.php
+++ b/components/com_finder/Controller/DisplayController.php
@@ -11,6 +11,7 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Component\Finder\Administrator\Helper\FinderHelperLanguage;
@@ -34,7 +35,7 @@ class DisplayController extends BaseController
*/
public function display($cachable = false, $urlparams = array())
{
- $input = \JFactory::getApplication()->input;
+ $input = Factory::getApplication()->input;
$cachable = true;
// Load plugin language files.
diff --git a/components/com_finder/Helper/FinderHelper.php b/components/com_finder/Helper/FinderHelper.php
index 95d058534e080..511e4665d164e 100644
--- a/components/com_finder/Helper/FinderHelper.php
+++ b/components/com_finder/Helper/FinderHelper.php
@@ -12,6 +12,7 @@
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Factory;
/**
* Helper class for Joomla! Finder components
@@ -45,7 +46,7 @@ public static function logSearch(\FinderIndexerQuery $searchquery, $resultCount
}
// Initialise our variables
- $db = \JFactory::getDbo();
+ $db = Factory::getDbo();
$query = $db->getQuery(true);
// Sanitise the term for the database
diff --git a/components/com_finder/Model/SearchModel.php b/components/com_finder/Model/SearchModel.php
index 70842fb018c49..e41b5fe798e4b 100644
--- a/components/com_finder/Model/SearchModel.php
+++ b/components/com_finder/Model/SearchModel.php
@@ -11,6 +11,7 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\String\StringHelper;
@@ -129,7 +130,7 @@ public function getQuery()
protected function getListQuery()
{
// Get the current user for authorisation checks
- $user = \JFactory::getUser();
+ $user = Factory::getUser();
$groups = implode(',', $user->getAuthorisedViewLevels());
// Create a new query object.
@@ -152,7 +153,7 @@ protected function getListQuery()
// Get the null date and the current date, minus seconds.
$nullDate = $db->quote($db->getNullDate());
- $nowDate = $db->quote(substr_replace(\JFactory::getDate()->toSql(), '00', -2));
+ $nowDate = $db->quote(substr_replace(Factory::getDate()->toSql(), '00', -2));
// Add the publish up and publish down filters.
$query->where('(l.publish_start_date = ' . $nullDate . ' OR l.publish_start_date <= ' . $nowDate . ')')
@@ -228,7 +229,7 @@ protected function getListQuery()
// Filter by language
if ($this->getState('filter.language'))
{
- $query->where('l.language IN (' . $db->quote(\JFactory::getLanguage()->getTag()) . ', ' . $db->quote('*') . ')');
+ $query->where('l.language IN (' . $db->quote(Factory::getLanguage()->getTag()) . ', ' . $db->quote('*') . ')');
}
// Get the result ordering and direction.
@@ -382,11 +383,11 @@ protected function getStoreId($id = '', $page = true)
protected function populateState($ordering = null, $direction = null)
{
// Get the configuration options.
- $app = \JFactory::getApplication();
+ $app = Factory::getApplication();
$input = $app->input;
$params = $app->getParams();
- $user = \JFactory::getUser();
- $language = \JFactory::getLanguage();
+ $user = Factory::getUser();
+ $language = Factory::getLanguage();
$this->setState('filter.language', Multilanguage::isEnabled());
@@ -513,7 +514,7 @@ protected function retrieve($id, $persistent = true)
// Use the external cache if data is persistent.
if ($persistent)
{
- $data = \JFactory::getCache($this->context, 'output')->get($id);
+ $data = Factory::getCache($this->context, 'output')->get($id);
$data = $data ? unserialize($data) : null;
}
@@ -545,7 +546,7 @@ protected function store($id, $data, $persistent = true)
// Store the data in external cache if data is persistent.
if ($persistent)
{
- return \JFactory::getCache($this->context, 'output')->store(serialize($data), $id);
+ return Factory::getCache($this->context, 'output')->store(serialize($data), $id);
}
return true;
diff --git a/components/com_finder/Model/SuggestionsModel.php b/components/com_finder/Model/SuggestionsModel.php
index 9f6ad04e17a6d..41aa780c98f01 100644
--- a/components/com_finder/Model/SuggestionsModel.php
+++ b/components/com_finder/Model/SuggestionsModel.php
@@ -12,6 +12,7 @@
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\Model\ListModel;
@@ -119,10 +120,10 @@ protected function getStoreId($id = '')
protected function populateState($ordering = null, $direction = null)
{
// Get the configuration options.
- $app = \JFactory::getApplication();
+ $app = Factory::getApplication();
$input = $app->input;
$params = ComponentHelper::getParams('com_finder');
- $user = \JFactory::getUser();
+ $user = Factory::getUser();
// Get the query input.
$this->setState('input', $input->request->get('q', '', 'string'));
@@ -130,7 +131,7 @@ protected function populateState($ordering = null, $direction = null)
// Set the query language
if (Multilanguage::isEnabled())
{
- $lang = \JFactory::getLanguage()->getTag();
+ $lang = Factory::getLanguage()->getTag();
}
else
{
diff --git a/components/com_finder/View/Search/FeedView.php b/components/com_finder/View/Search/FeedView.php
index 401f4cd499a09..64ae9407fb8ec 100644
--- a/components/com_finder/View/Search/FeedView.php
+++ b/components/com_finder/View/Search/FeedView.php
@@ -11,7 +11,9 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
@@ -34,7 +36,7 @@ class FeedView extends BaseHtmlView
public function display($tpl = null)
{
// Get the application
- $app = \JFactory::getApplication();
+ $app = Factory::getApplication();
// Adjust the list limit to the feed limit.
$app->input->set('limit', $app->get('feed_limit'));
@@ -59,11 +61,11 @@ public function display($tpl = null)
}
elseif ($app->get('sitename_pagetitles', 0) == 1)
{
- $title = \JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
+ $title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2)
{
- $title = \JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
+ $title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
}
$this->document->setTitle($title);
diff --git a/components/com_finder/View/Search/HtmlView.php b/components/com_finder/View/Search/HtmlView.php
index ce41d7019df35..cc8b64558a51b 100644
--- a/components/com_finder/View/Search/HtmlView.php
+++ b/components/com_finder/View/Search/HtmlView.php
@@ -219,7 +219,7 @@ protected function getFields()
$fields = null;
// Get the URI.
- $uri = \JUri::getInstance(Route::_($this->query->toUri()));
+ $uri = Uri::getInstance(Route::_($this->query->toUri()));
$uri->delVar('q');
$uri->delVar('o');
$uri->delVar('t');
@@ -286,7 +286,7 @@ protected function prepareDocument($query)
}
else
{
- $this->params->def('page_heading', \JText::_('COM_FINDER_DEFAULT_PAGE_TITLE'));
+ $this->params->def('page_heading', Text::_('COM_FINDER_DEFAULT_PAGE_TITLE'));
}
$title = $this->params->get('page_title', '');
@@ -297,11 +297,11 @@ protected function prepareDocument($query)
}
elseif ($app->get('sitename_pagetitles', 0) == 1)
{
- $title = \JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
+ $title = Text::sprintf('JPAGETITLE', $app->get('sitename'), $title);
}
elseif ($app->get('sitename_pagetitles', 0) == 2)
{
- $title = \JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
+ $title = Text::sprintf('JPAGETITLE', $title, $app->get('sitename'));
}
$this->document->setTitle($title);
diff --git a/components/com_finder/View/Search/OpensearchView.php b/components/com_finder/View/Search/OpensearchView.php
index 5e74916660bce..57ee00ac3a9d5 100644
--- a/components/com_finder/View/Search/OpensearchView.php
+++ b/components/com_finder/View/Search/OpensearchView.php
@@ -16,6 +16,7 @@
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\AbstractView;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Uri\Uri;
/**
* OpenSearch View class for Finder
@@ -51,7 +52,7 @@ public function display($tpl = null)
// Add the URL for the search
$searchUri = 'index.php?option=com_finder&view=search&q={searchTerms}';
$suggestionsUri = 'index.php?option=com_finder&task=suggestions.opensearchsuggest&format=json&q={searchTerms}';
- $baseUrl = \JUri::getInstance()->toString(array('host', 'port', 'scheme'));
+ $baseUrl = Uri::getInstance()->toString(array('host', 'port', 'scheme'));
$active = $app->getMenu()->getActive();
if ($active->component == 'com_finder')
diff --git a/components/com_finder/helpers/route.php b/components/com_finder/helpers/route.php
index ab30d004b44ec..f9315cd5496cd 100644
--- a/components/com_finder/helpers/route.php
+++ b/components/com_finder/helpers/route.php
@@ -9,6 +9,10 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Factory;
+use Joomla\CMS\Uri\Uri;
+
/**
* Finder route helper class.
*
@@ -33,7 +37,7 @@ public static function getSearchRoute($f = null, $q = null)
$item = self::getItemid($query);
// Get the base route.
- $uri = clone JUri::getInstance('index.php?option=com_finder&view=search');
+ $uri = clone Uri::getInstance('index.php?option=com_finder&view=search');
// Add the pre-defined search filter if present.
if ($f !== null)
@@ -73,7 +77,7 @@ public static function getAdvancedRoute($f = null, $q = null)
$item = self::getItemid($query);
// Get the base route.
- $uri = clone JUri::getInstance('index.php?option=com_finder&view=advanced');
+ $uri = clone Uri::getInstance('index.php?option=com_finder&view=advanced');
// Add the pre-defined search filter if present.
if ($q !== null)
@@ -113,8 +117,8 @@ public static function getItemid($query)
// Get the menu items for com_finder.
if (!$items || !$active)
{
- $app = JFactory::getApplication();
- $com = JComponentHelper::getComponent('com_finder');
+ $app = Factory::getApplication();
+ $com = ComponentHelper::getComponent('com_finder');
$menu = $app->getMenu();
$active = $menu->getActive();
$items = $menu->getItems('component_id', $com->id);
diff --git a/components/com_finder/tmpl/search/default.php b/components/com_finder/tmpl/search/default.php
index 486e68a28a051..8559a77c41ecd 100644
--- a/components/com_finder/tmpl/search/default.php
+++ b/components/com_finder/tmpl/search/default.php
@@ -10,11 +10,12 @@
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Language\Text;
HTMLHelper::_('behavior.core');
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html');
-JText::script('MOD_FINDER_SEARCH_VALUE', true);
+Text::script('MOD_FINDER_SEARCH_VALUE', true);
HTMLHelper::_('stylesheet', 'com_finder/finder.css', array('version' => 'auto', 'relative' => true));
HTMLHelper::_('script', 'com_finder/finder.js', array('version' => 'auto', 'relative' => true));
diff --git a/components/com_finder/tmpl/search/default_result.php b/components/com_finder/tmpl/search/default_result.php
index 7166902e500eb..d20043af3366f 100644
--- a/components/com_finder/tmpl/search/default_result.php
+++ b/components/com_finder/tmpl/search/default_result.php
@@ -9,11 +9,13 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
+use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\String\StringHelper;
-$user = JFactory::getUser();
+$user = Factory::getUser();
// Get the mime type class.
$mime = !empty($this->result->mime) ? 'mime-' . $this->result->mime : null;
@@ -91,7 +93,7 @@
result->start_date && $this->params->get('show_date', 1)) : ?>
- result->start_date, \JText::_('DATE_FORMAT_LC3')); ?>
+ result->start_date, Text::_('DATE_FORMAT_LC3')); ?>
params->get('show_url', 1)) : ?>
diff --git a/components/com_finder/tmpl/search/default_results.php b/components/com_finder/tmpl/search/default_results.php
index 857438d7462c7..56d4a850f7770 100644
--- a/components/com_finder/tmpl/search/default_results.php
+++ b/components/com_finder/tmpl/search/default_results.php
@@ -9,9 +9,11 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Uri\Uri;
?>
@@ -20,7 +22,7 @@
suggested && $this->params->get('show_suggested_query', 1)) : ?>
- query->toUri()); ?>
+ query->toUri()); ?>
setVar('q', $this->suggested); ?>
toString(array('path', 'query'))); ?>
@@ -35,9 +37,9 @@
total === 0) || ($this->total === null)) : ?>
@@ -49,7 +51,7 @@
- baseUrl = JUri::getInstance()->toString(array('scheme', 'host', 'port')); ?>
+ baseUrl = Uri::getInstance()->toString(array('scheme', 'host', 'port')); ?>
results as $i => $result) : ?>
result = &$result; ?>
result->counter = $i + 1; ?>
@@ -69,6 +71,6 @@
pagination->total; ?>
pagination->limit * $this->pagination->pagesCurrent; ?>
$total ? $total : $limit); ?>
-
+