Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/com_contact/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
JLoader::register('ContactHelperRoute', JPATH_COMPONENT . '/helpers/route.php');

$controller = JControllerLegacy::getInstance('Contact');
$controller->execute(JFactory::getApplication()->input->get('task'));
Expand Down
4 changes: 2 additions & 2 deletions components/com_contact/models/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ protected function buildContactExtendedData($contact)
}

// Get the profile information for the linked user
require_once JPATH_ADMINISTRATOR . '/components/com_users/models/user.php';
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models', 'UsersModel');
$userModel = JModelLegacy::getInstance('User', 'UsersModel', array('ignore_request' => true));
$data = $userModel->getItem((int) $contact->user_id);

Expand Down Expand Up @@ -542,7 +542,7 @@ protected function getContactQuery($pk = null)
}

// Get the profile information for the linked user
require_once JPATH_ADMINISTRATOR . '/components/com_users/models/user.php';
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models', 'UsersModel');
$userModel = JModelLegacy::getInstance('User', 'UsersModel', array('ignore_request' => true));
$data = $userModel->getItem((int) $result->user_id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

?>
<?php if ($this->params->get('show_articles')) : ?>
Expand Down
2 changes: 0 additions & 2 deletions components/com_contact/views/contact/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/models/category.php';

/**
* HTML Contact View class for the Contact component
*
Expand Down
4 changes: 2 additions & 2 deletions components/com_content/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
require_once JPATH_COMPONENT . '/helpers/query.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
JLoader::register('ContentHelperQuery', JPATH_SITE . '/components/com_content/helpers/query.php');

$input = JFactory::getApplication()->input;
$user = JFactory::getUser();
Expand Down
4 changes: 2 additions & 2 deletions components/com_content/helpers/icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ public static function create($category, $params, $attribs = array(), $legacy =
*/
public static function email($article, $params, $attribs = array(), $legacy = false)
{
require_once JPATH_SITE . '/components/com_mailto/helpers/mailto.php';
JLoader::register('MailtoHelper', JPATH_SITE . '/components/com_mailto/helpers/mailto.php');

$uri = JUri::getInstance();
$base = $uri->toString(array('scheme', 'host', 'port'));
$template = JFactory::getApplication()->getTemplate();
$link = $base . JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language), false);
$url = 'index.php?option=com_mailto&tmpl=component&template=' . $template . '&link=' . MailToHelper::addLink($link);
$url = 'index.php?option=com_mailto&tmpl=component&template=' . $template . '&link=' . MailtoHelper::addLink($link);

$status = 'width=400,height=350,menubar=yes,resizable=yes';

Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once __DIR__ . '/articles.php';
JLoader::register('ContentModelArticles', __DIR__ . '/articles.php');

/**
* Content Component Archive Model
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once __DIR__ . '/articles.php';
JLoader::register('ContentModelArticles', __DIR__ . '/articles.php');

/**
* Frontpage Component Model
Expand Down
2 changes: 1 addition & 1 deletion components/com_content/models/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Joomla\Utilities\ArrayHelper;

// Base this model on the backend version.
require_once JPATH_ADMINISTRATOR . '/components/com_content/models/article.php';
JLoader::register('ContentModelArticle', JPATH_ADMINISTRATOR . '/components/com_content/models/article.php');

/**
* Content Component Article Model
Expand Down
2 changes: 1 addition & 1 deletion components/com_finder/finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
JLoader::register('FinderHelperRoute', JPATH_COMPONENT . '/helpers/route.php');

$controller = JControllerLegacy::getInstance('Finder');
$controller->execute(JFactory::getApplication()->input->get('task'));
Expand Down
3 changes: 1 addition & 2 deletions components/com_mailto/mailto.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/mailto.php';
require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('MailtoHelper', JPATH_COMPONENT . '/helpers/mailto.php');

$controller = JControllerLegacy::getInstance('Mailto');
$controller->registerDefaultTask('mailto');
Expand Down
2 changes: 1 addition & 1 deletion components/com_newsfeeds/newsfeeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
JLoader::register('NewsfeedsHelperRoute', JPATH_COMPONENT . '/helpers/route.php');
JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables');

$controller = JControllerLegacy::getInstance('Newsfeeds');
Expand Down
4 changes: 2 additions & 2 deletions components/com_search/views/search/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SearchViewSearch extends JViewLegacy
*/
public function display($tpl = null)
{
require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/search.php';
JLoader::register('SearchHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/search.php');

$app = JFactory::getApplication();
$uri = JUri::getInstance();
Expand Down Expand Up @@ -140,7 +140,7 @@ public function display($tpl = null)
$total = $this->get('total');
$pagination = $this->get('pagination');

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

for ($i = 0, $count = count($results); $i < $count; $i++)
{
Expand Down
2 changes: 1 addition & 1 deletion components/com_tags/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
JLoader::register('TagsHelperRoute', JPATH_COMPONENT . '/helpers/route.php');

$controller = JControllerLegacy::getInstance('Tags');
$controller->execute(JFactory::getApplication()->input->get('task'));
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/profile.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_users/controllers/profile_base_json.php';
JLoader::register('UsersControllerProfile_Base_Json', __DIR__ . '/profile_base_json.php');

/**
* Profile controller class for Users.
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('UsersController', JPATH_COMPONENT . '/controller.php');

/**
* Profile controller class for Users.
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('UsersController', JPATH_COMPONENT . '/controller.php');

/**
* Registration controller class for Users.
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/remind.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('UsersController', JPATH_COMPONENT . '/controller.php');

/**
* Reset controller class for Users.
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/reset.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('UsersController', JPATH_COMPONENT . '/controller.php');

/**
* Reset controller class for Users.
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/controllers/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/controller.php';
JLoader::register('UsersController', JPATH_COMPONENT . '/controller.php');

/**
* Registration controller class for Users.
Expand Down
10 changes: 2 additions & 8 deletions components/com_users/models/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ public function __construct($config = array())

parent::__construct($config);

// Load the Joomla! RAD layer
if (!defined('FOF_INCLUDED'))
{
include_once JPATH_LIBRARIES . '/fof/include.php';
}

// Load the helper and model used for two factor authentication
require_once JPATH_ADMINISTRATOR . '/components/com_users/models/user.php';
require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
JLoader::register('UsersModelUser', JPATH_ADMINISTRATOR . '/components/com_users/models/user.php');
JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_COMPONENT . '/helpers/route.php';
JLoader::register('UsersHelperRoute', JPATH_COMPONENT . '/helpers/route.php');

$controller = JControllerLegacy::getInstance('Users');
$controller->execute(JFactory::getApplication()->input->get('task', 'display'));
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/views/profile/tmpl/default_custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

JLoader::register('JHtmlUsers', JPATH_COMPONENT . '/helpers/html/users.php');
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::register('users.spacer', array('JHtmlUsers', 'spacer'));

$fieldsets = $this->form->getFieldsets();
Expand Down
8 changes: 1 addition & 7 deletions components/com_users/views/profile/tmpl/default_params.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@

defined('_JEXEC') or die;

JLoader::register('JHtmlUsers', JPATH_COMPONENT . '/helpers/html/users.php');
JHtml::register('users.spacer', array('JHtmlUsers', 'spacer'));
JHtml::register('users.helpsite', array('JHtmlUsers', 'helpsite'));
JHtml::register('users.templatestyle', array('JHtmlUsers', 'templatestyle'));
JHtml::register('users.admin_language', array('JHtmlUsers', 'admin_language'));
JHtml::register('users.language', array('JHtmlUsers', 'language'));
JHtml::register('users.editor', array('JHtmlUsers', 'editor'));
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');

?>
<?php $fields = $this->form->getFieldset('params'); ?>
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_articles_archive/mod_articles_archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the archive functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArchiveHelper', __DIR__ . '/helper.php');

$params->def('count', 10);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
Expand Down
7 changes: 2 additions & 5 deletions modules/mod_articles_categories/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

/**
* Helper for mod_articles_categories
*
* @package Joomla.Site
* @subpackage mod_articles_categories
*
* @since 1.5
* @since 1.5
*/
abstract class ModArticlesCategoriesHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the helper functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArticlesCategoriesHelper', __DIR__ . '/helper.php');

JLoader::register('JCategoryNode', JPATH_BASE . '/libraries/legacy/categories/categories.php');

Expand Down
2 changes: 1 addition & 1 deletion modules/mod_articles_category/mod_articles_category.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the helper functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArticlesCategoryHelper', __DIR__ . '/helper.php');

$input = JFactory::getApplication()->input;

Expand Down
6 changes: 2 additions & 4 deletions modules/mod_articles_latest/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel');

Expand All @@ -18,9 +18,7 @@
/**
* Helper for mod_articles_latest
*
* @package Joomla.Site
* @subpackage mod_articles_latest
* @since 1.6
* @since 1.6
*/
abstract class ModArticlesLatestHelper
{
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_articles_latest/mod_articles_latest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the latest functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArticlesLatestHelper', __DIR__ . '/helper.php');

$list = ModArticlesLatestHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
Expand Down
7 changes: 2 additions & 5 deletions modules/mod_articles_news/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel');

/**
* Helper for mod_articles_news
*
* @package Joomla.Site
* @subpackage mod_articles_news
*
* @since 1.6
* @since 1.6
*/
abstract class ModArticlesNewsHelper
{
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_articles_news/mod_articles_news.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the news functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArticlesNewsHelper', __DIR__ . '/helper.php');

$list = ModArticlesNewsHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
Expand Down
7 changes: 2 additions & 5 deletions modules/mod_articles_popular/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@

defined('_JEXEC') or die;

require_once JPATH_SITE . '/components/com_content/helpers/route.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel');

/**
* Helper for mod_articles_popular
*
* @package Joomla.Site
* @subpackage mod_articles_popular
*
* @since 1.6.0
* @since 1.6.0
*/
abstract class ModArticlesPopularHelper
{
Expand Down
2 changes: 1 addition & 1 deletion modules/mod_articles_popular/mod_articles_popular.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;

// Include the popular functions only once
require_once __DIR__ . '/helper.php';
JLoader::register('ModArticlesPopularHelper', __DIR__ . '/helper.php');

$list = ModArticlesPopularHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
Expand Down
Loading