1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

New method: e107::getPlugLan(pluginDir,type) - retrieve global LAN for a specific plugin. eg. e107::getPlugLan('download','name');

This commit is contained in:
Cameron
2017-04-12 15:52:43 -07:00
parent e9111e3c4c
commit e7f9ede900
2 changed files with 18 additions and 1 deletions

View File

@@ -546,7 +546,9 @@ class eurl_admin_ui extends e_admin_controller_ui
$selector = $form->select('eurl_profile['.$plug.']',$arr,$sel, array('size'=>'block-level'));
$text .= "<tr><td>".$plug."</td><td>".$selector."</td></tr>";
$label = e107::getPlugLan($plug,'name');
$text .= "<tr><td>".$label."</td><td>".$selector."</td></tr>";
}

View File

@@ -1026,6 +1026,21 @@ class e107
return self::$_plug_config_arr[$plug_name.$multi_row];
}
/**
* Retrieve the global LAN for a specific plugin.
* @param $dir
* @param string $type
* @return mixed
*/
public static function getPlugLan($dir, $type='name')
{
$lan = "LAN_PLUGIN_".strtoupper($dir)."_".strtoupper($type);
return defset($lan,false);
}
/**
* Retrieve plugin preference value.
* Shorthand of self::getPluginConfig()->get()