Skip to content

Commit

Permalink
Merge pull request #12130 from zero-24/deprecate_fof
Browse files Browse the repository at this point in the history
[3.x] Deprecate fof for Joomla 4.0
  • Loading branch information
wilsonge authored Sep 22, 2016
2 parents 6340866 + 3e564b1 commit 43af0c4
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions installation/sql/mysql/sample_learn.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions installation/sql/mysql/sample_testing.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions installation/sql/postgresql/sample_learn.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions installation/sql/postgresql/sample_testing.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions installation/sql/sqlazure/sample_learn.sql

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions installation/sql/sqlazure/sample_testing.sql

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion libraries/cms/application/cms.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,13 @@ public function loadSession(JSession $session = null)

$this->registerEvent('onAfterSessionStart', array($this, 'afterSessionStart'));

// There's an internal coupling to the session object being present in JFactory, need to deal with this at some point
/*
* Note: The below code CANNOT change from instantiating a session via JFactory until there is a proper dependency injection container supported
* by the application. The current default behaviours result in this method being called each time an application class is instantiated meaning
* each application will attempt to start a new session. https://github.com/joomla/joomla-cms/issues/12108 explains why things will crash and
* burn if you ever attempt to make this change without a proper dependency injection container.
*/

$session = JFactory::getSession($options);
$session->initialise($this->input, $this->dispatcher);
$session->start();
Expand Down
8 changes: 5 additions & 3 deletions libraries/fof/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@
* @copyright Copyright (C) 2010-2015 Nicholas K. Dionysopoulos
* @license GNU General Public License version 2, or later
*
* @deprecated 4.0 Deprecated without replacement include FOF by your own if required
*
* Initializes FOF
*/

defined('_JEXEC') or die();

if (!defined('FOF_INCLUDED'))
{
define('FOF_INCLUDED', '2.5.5');
define('FOF_INCLUDED', '2.5.5');

// Register the FOF autoloader
require_once __DIR__ . '/autoloader/fof.php';
require_once __DIR__ . '/autoloader/fof.php';
FOFAutoloaderFof::init();

// Register a debug log
if (defined('JDEBUG') && JDEBUG)
{
FOFPlatform::getInstance()->logAddLogger('fof.log.php');
}
}
}

0 comments on commit 43af0c4

Please sign in to comment.