Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a regression with controllers for specific formats.

  • Loading branch information...
commit dd7c846ae31df7f5e56853dbfbc9cd0b56e04251 1 parent a3a9975
@realityking authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 libraries/joomla/application/component/controller.php
View
10 libraries/joomla/application/component/controller.php
@@ -270,8 +270,10 @@ public static function getInstance($prefix, $config = array())
$task = $command;
// Define the controller filename and path.
- $file = self::createFileName('controller', array('name' => 'controller', 'format' => $format));
- $path = $basePath . '/' . $file;
+ $file = self::createFileName('controller', array('name' => 'controller', 'format' => $format));
+ $path = $basePath . '/' . $file;
+ $backupfile = self::createFileName('controller', array('name' => 'controller'));
+ $backuppath = $basePath . '/' . $backupfile;
}
// Get the controller class name.
@@ -285,6 +287,10 @@ public static function getInstance($prefix, $config = array())
{
require_once $path;
}
+ elseif (isset($backuppath) && file_exists($backuppath))
+ {
+ require_once $backuppath;
+ }
else
{
throw new InvalidArgumentException(JText::sprintf('JLIB_APPLICATION_ERROR_INVALID_CONTROLLER', $type, $format));
Please sign in to comment.
Something went wrong with that request. Please try again.