From ab3de984e904b7871ef50e41b15165615897119a Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 26 May 2013 15:48:16 -0700 Subject: [PATCH] Issue #360 - e107::lan() path fix. --- e107_handlers/e107_class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 7e6384434..2a635c876 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2319,11 +2319,13 @@ class e107 } elseif($fname === true) // admin file. { - $fname = "admin/".e_LANGUAGE; + //$fname = "admin/".e_LANGUAGE; + $fname = ($flat === true) ? e_LANGUAGE."_admin" : "admin/".e_LANGUAGE; } else { - $fname = e_LANGUAGE; + // $fname = e_LANGUAGE; + $fname = ($flat === true) ? e_LANGUAGE."_front" : e_LANGUAGE; } if($flat === true && is_dir(e_PLUGIN.$plugin."/languages/".e_LANGUAGE)) // support for alt_auth/languages/English/English_log.php etc. @@ -2335,6 +2337,7 @@ class e107 $path = e_PLUGIN.$plugin.'/languages/'.$fname.'.php'; } + echo "
".$path; if(E107_DBG_INCLUDES) { e107::getMessage()->addDebug("Attempting to Load: ".$path); @@ -2405,6 +2408,9 @@ class e107 * @param $options : Set to True for admin. * @example e107::lan('theme'); // Loads THEME."languages/English.php (if English is the current language) * @example e107::lan('gallery'); // Loads e_PLUGIN."gallery/languages/English.php (if English is the current language) + * @example e107::lan('gallery', true); // Loads e_PLUGIN."gallery/languages/admin/English.php (if English is the current language) + * @example e107::lan('gallery', false, true); // Loads e_PLUGIN."gallery/languages/English/English_front.php (if English is the current language) + * @example e107::lan('gallery', true, true); // Loads e_PLUGIN."gallery/languages/English/English_admin.php (if English is the current language) * @example e107::lan('gallery',e_LANGUAGE."_something.php"); // Loads e_PLUGIN."gallery/languages/English_something.php (if English is the current language) */ public static function lan($type, $fname = null, $options = null) @@ -2420,7 +2426,6 @@ class e107 self::themeLan($fname, null, $options); break; default : - self::plugLan($type, $fname, $options); break; }