mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Improved e_CURRENT_PLUGIN detection when using SEF-URLs and other minor path fixes.
This commit is contained in:
@@ -37,7 +37,7 @@ e107::coreLan('footer', true);
|
||||
|
||||
foreach ($_plugins as $_p)
|
||||
{
|
||||
if(in_array($_p, $_globalLans) && e_CURRENT_PLUGIN != $_p) // filter out those with globals unless we are in a plugin folder.
|
||||
if(in_array($_p, $_globalLans) && defset('e_CURRENT_PLUGIN') != $_p) // filter out those with globals unless we are in a plugin folder.
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@@ -188,7 +188,7 @@ class admin_shortcodes
|
||||
|
||||
$e_icon_array = e107::getNav()->getIconArray();
|
||||
|
||||
if (e_CURRENT_PLUGIN)
|
||||
if (deftrue('e_CURRENT_PLUGIN'))
|
||||
{
|
||||
$eplug_icon = '';
|
||||
$eplug_folder = e_CURRENT_PLUGIN.'/';
|
||||
|
@@ -386,6 +386,7 @@ class eDispatcher
|
||||
{
|
||||
case 'plugin':
|
||||
//if($custom) $custom = 'url/'.$custom;
|
||||
define('e_CURRENT_PLUGIN', $module); // TODO Move to a better location.
|
||||
return $sc ? '{e_PLUGIN}'.$module.'url/'.$custom.'url.php' : e_PLUGIN.$module.'url/'.$custom.'url.php';
|
||||
break;
|
||||
|
||||
|
@@ -325,7 +325,7 @@ if (!function_exists('r_emote'))
|
||||
{
|
||||
$key = str_replace("!", ".", $key); // Usually '.' was replaced by '!' when saving
|
||||
$key = preg_replace("#_(\w{3})$#", ".\\1", $key); // '_' followed by exactly 3 chars is file extension
|
||||
$key = e_IMAGE."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
|
||||
$key = e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" .$key; // Add in the file path
|
||||
|
||||
$value2 = substr($value, 0, strpos($value, " "));
|
||||
$value = ($value2 ? $value2 : $value);
|
||||
|
@@ -3440,8 +3440,15 @@ class e_form
|
||||
$value = e107::unserialize($value); // (saved as array, return it as an array)
|
||||
}
|
||||
|
||||
$value = call_user_func_array(array($this, $method), array($value, 'read', $parms));
|
||||
|
||||
if(method_exists($this,$method))
|
||||
{
|
||||
$value = call_user_func_array(array($this, $method), array($value, 'read', $parms));
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<span class='label label-important'>Missing: ".$method."()</span>";
|
||||
}
|
||||
// print_a($attributes);
|
||||
// Inline Editing.
|
||||
if(!vartrue($attributes['noedit']) && vartrue($parms['editable'])) // avoid bad markup, better solution coming up
|
||||
|
Reference in New Issue
Block a user