Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Drop support for the legacy plug-in path.
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking committed May 3, 2012
1 parent 5d1a16c commit a82d620
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libraries/joomla/plugin/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,12 @@ protected static function _import($plugin, $autocreate = true, JEventDispatcher
$plugin->type = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->type);
$plugin->name = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->name);

$legacypath = JPATH_PLUGINS . '/' . $plugin->type . '/' . $plugin->name . '.php';
$path = JPATH_PLUGINS . '/' . $plugin->type . '/' . $plugin->name . '/' . $plugin->name . '.php';

if (!isset($paths[$path]) || !isset($paths[$legacypath]))
if (!isset($paths[$path]))
{
$pathExists = file_exists($path);
if ($pathExists || file_exists($legacypath))
if (file_exists($path))
{
$path = $pathExists ? $path : $legacypath;

if (!isset($paths[$path]))
{
require_once $path;
Expand Down

0 comments on commit a82d620

Please sign in to comment.