Skip to content

Commit

Permalink
dev: make clear argument should be the classname and not a pretty name
Browse files Browse the repository at this point in the history
  • Loading branch information
mennodekker committed Apr 2, 2013
1 parent cd5c60d commit 90f18a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions application/libraries/PluginManager/PluginManager.php
Expand Up @@ -187,20 +187,20 @@ public function scanPlugins()
* Gets the description of a plugin. The description is accessed via a
* static function inside the plugin file.
*
* @param string $pluginName
* @param string $pluginClass The classname of the plugin
*/
public function getPluginInfo($pluginName, $pluginDir = null)
public function getPluginInfo($pluginClass, $pluginDir = null)
{
$result = array();
$class = "{$pluginName}";
$class = "{$pluginClass}";
if (!class_exists($class, false)) {
if (!is_null($pluginDir)) {
Yii::import($pluginDir . ".$pluginName.*");
Yii::import($pluginDir . ".$pluginClass.*");
} else {
foreach ($this->pluginDirs as $pluginDir) {
$file = Yii::getPathOfAlias($pluginDir . ".$pluginName.{$pluginName}") . ".php";
$file = Yii::getPathOfAlias($pluginDir . ".$pluginClass.{$pluginClass}") . ".php";
if (file_exists($file)) {
Yii::import($pluginDir . ".$pluginName.*");
Yii::import($pluginDir . ".$pluginClass.*");
break;
}
}
Expand Down

0 comments on commit 90f18a3

Please sign in to comment.