1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 08:51:50 +02:00

Issue #6 Fixed global LAN loading issue on list_new, pm and others not using an "English" folder. Corrected global LAN definition on list_new.

This commit is contained in:
Cameron
2017-12-16 12:25:18 -08:00
parent 6d401be7e5
commit 973e0dc009
7 changed files with 31 additions and 20 deletions

View File

@@ -690,7 +690,11 @@ if(isset($pref['lan_global_list']))
{
foreach($pref['lan_global_list'] as $path)
{
e107::plugLan($path,'global',true);
if(e107::plugLan($path, 'global', true) === false)
{
e107::plugLan($path, 'global', false);
}
}
}

View File

@@ -3103,7 +3103,7 @@ class e107
*
* @param string $fname filename without the extension part (e.g. 'comment')
* @param boolean $admin true if it's an administration language file
* @return void
* @return bool
*/
public static function coreLan($fname, $admin = false)
{
@@ -3114,7 +3114,8 @@ class e107
$path = e_LANGUAGEDIR.e_LANGUAGE.'/'.$fname;
self::setRegistry($cstring, true);
self::includeLan($path, false);
return self::includeLan($path, false);
}
/**
@@ -3143,7 +3144,7 @@ class e107
* @param string $plugin plugin name
* @param string $fname filename without the extension part (e.g. 'common')
* @param boolean $flat false (default, preferred) Language folder structure; true - prepend Language to file name
* @return void
* @return bool
*/
public static function plugLan($plugin, $fname = '', $flat = false)
{
@@ -3152,8 +3153,11 @@ class e107
$plugin = preg_replace('/[^\w]/', '', $plugin);
if($fname && is_string($fname))
if($fname === 'global') // fix ambiguity
{
$fname = e_LANGUAGE."_global";
}
elseif($fname && is_string($fname))
{
$fname = e_LANGUAGE.($flat ? '_' : '/').preg_replace('#[^\w/]#', '', trim($fname, '/'));
}
@@ -3184,7 +3188,8 @@ class e107
self::setRegistry($cstring, true);
self::includeLan($path, false);
return self::includeLan($path, false);
}
/**
@@ -3212,7 +3217,7 @@ class e107
* @param string $fname filename without the extension part (e.g. 'common' for common.php)
* @param string $theme theme name, if null current theme will be used
* @param boolean $flat false (default, preferred) Language folder structure; true - prepend Language to file name
* @return void
* @return bool
*/
public static function themeLan($fname = '', $theme = null, $flat = false)
{
@@ -3233,7 +3238,8 @@ class e107
}
self::setRegistry($cstring, true);
self::includeLan($path, false);
return self::includeLan($path, false);
}

View File

@@ -4769,8 +4769,9 @@ class e107plugin
if(E107_DEBUG_LEVEL > 0)
{
$dbgArr = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2);
e107::getDebug()->log("Legacy Plugin Parse (xml): ".$plugName. print_a($dbgArr[1],true));
$dbgArr = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,3);
unset($dbgArr[0]);
e107::getDebug()->log("Legacy Plugin Parse (xml): ".$plugName. print_a($dbgArr,true));
}
// $xml->setOptArrayTags('extendedField,userclass,menuLink,commentID'); // always arrays for these tags.

View File

@@ -62,7 +62,7 @@ if(isset($message))
//display admin page
$text = $rc->admin->display();
e107::getRender()->tablerender(LAN_PLUGIN_LISTNEW_NAME, $mes->render(). $text);
e107::getRender()->tablerender(LAN_PLUGIN_LIST_NEW_NAME, $mes->render(). $text);
/**
* Display admin menu

View File

@@ -5,6 +5,6 @@
*
* 'List new items' global language defines
*/
define("LAN_PLUGIN_LISTNEW_NAME", "List New Items");
define("LAN_PLUGIN_LISTNEW_DESCRIPTION", "This plugin allows you to view a list and/or menu of recent additions in all e107 categories. You can either view the list with data since your last visit, or view a general latest additions list.");
?>
define("LAN_PLUGIN_LIST_NEW_NAME", "List New Items");
define("LAN_PLUGIN_LIST_NEW_DESCRIPTION", "This plugin allows you to view a list and/or menu of recent additions in all e107 categories. You can either view the list with data since your last visit, or view a general latest additions list.");

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<e107Plugin name="List Latest" lan="LAN_PLUGIN_LISTNEW_NAME" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<e107Plugin name="List Latest" lan="LAN_PLUGIN_LIST_NEW_NAME" version="1.0.1" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc." url="http://e107.org" />
<description lan="LAN_PLUGIN_LISTNEW_DESCRIPTION">This plugin allows you to view a list and/or menu of recent additions in all e107 categories. You can either view the list with data since your last visit, or view a general latest additions list.</description>
<description lan="LAN_PLUGIN_LIST_NEW_DESCRIPTION">This plugin allows you to view a list and/or menu of recent additions in all e107 categories. You can either view the list with data since your last visit, or view a general latest additions list.</description>
<category>content</category>
<copyright>Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)</copyright>
<adminLinks>
<link url='admin_list_config.php#nav-list-new-recent-page' description='LIST_PLUGIN_3' icon='icon/list_32.png' iconSmall='icon/list_16.png' primary='true'>LIST_PLUGIN_3</link>
</adminLinks>
<siteLinks>
<link url="{e_PLUGIN}list_new/list.php" >LAN_PLUGIN_LISTNEW_NAME</link>
<link url="{e_PLUGIN}list_new/list.php" >LAN_PLUGIN_LIST_NEW_NAME</link>
</siteLinks>
<pluginPrefs>
</pluginPrefs>

View File

@@ -396,7 +396,7 @@ code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}
code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}
kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}
kbd kbd{padding:0;font-size:100%;box-shadow:none}
pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;color:#999;background-color:#f5f5f5;border:1px solid inherit;border-radius:4px}
pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid inherit;border-radius:4px}
.container,.container-fluid{margin-right:auto;margin-left:auto}
pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}
.container,.container-fluid{padding-left:15px;padding-right:15px}
@@ -1495,7 +1495,7 @@ optgroup{background-color:#494949}
.alert .alert-link,.alert a{color:#fff;text-decoration:underline}
.alert .close,.alert a.btn{text-decoration:none}
.alert .close{color:#000}
.alert pre{background-color:rgba(0,0,0,.4);margin-top:10px;color:#fff}
pre{background-color:rgba(0,0,0,.4);margin-top:10px;color:#fff}
a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#0f0f0f}
.jumbotron{border:1px solid rgba(0,0,0,.6)}
.panel-danger .panel-heading,.panel-info .panel-heading,.panel-primary .panel-heading,.panel-success .panel-heading,.panel-warning .panel-heading{border-color:#000}