From e7f9ede900aff37f8a21335cfbae253654dc9c8e Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 12 Apr 2017 15:52:43 -0700 Subject: [PATCH] New method: e107::getPlugLan(pluginDir,type) - retrieve global LAN for a specific plugin. eg. e107::getPlugLan('download','name'); --- e107_admin/eurl.php | 4 +++- e107_handlers/e107_class.php | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/e107_admin/eurl.php b/e107_admin/eurl.php index 12d0c8304..fd87ffec7 100644 --- a/e107_admin/eurl.php +++ b/e107_admin/eurl.php @@ -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 .= "".$plug."".$selector.""; + $label = e107::getPlugLan($plug,'name'); + + $text .= "".$label."".$selector.""; } diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 984639c8d..b2b490379 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -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()