mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 05:02:02 +02:00
minor menu render related problems
This commit is contained in:
parent
e00cc4dbe5
commit
0276b7fd43
@ -5,17 +5,21 @@ function plugin_shortcode($parm = '')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
||||
@list($menu,$parms) = explode('|',$parm.'|');
|
||||
@list($menu,$parms) = explode('|',$parm.'|', 2);
|
||||
|
||||
$path = $tp -> toDB(dirname($menu));
|
||||
$name = $tp -> toDB(basename($menu));
|
||||
$path = $tp->toDB(dirname($menu));
|
||||
$name = $tp->toDB(basename($menu));
|
||||
|
||||
if($path == '.')
|
||||
{
|
||||
$path = $menu;
|
||||
}
|
||||
/**
|
||||
* @todo check if plugin is installed when installation required
|
||||
*/
|
||||
|
||||
/**
|
||||
* fixed todo: $mode is provided by the menu itself, return is always true, added optional menu parameters
|
||||
*/
|
||||
return e107::getMenu()->renderMenu($path,$name,$parms,true);
|
||||
return e107::getMenu()->renderMenu($path,$name, trim($parms, '|'),true);
|
||||
}
|
||||
|
@ -263,15 +263,17 @@ class e_menu
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::loadLanFiles($mpath);
|
||||
|
||||
// not sure what would break this, but it's good idea to go away
|
||||
//e107::loadLanFiles($mpath);
|
||||
|
||||
//include once is not an option anymore
|
||||
//e107_include will break many old menus (evel globals), so we'll wait for a while...
|
||||
//e107_include will break many old menus (evil globals), so we'll wait for a while...
|
||||
//e107_include(e_PLUGIN.$mpath."/".$mname.".php");
|
||||
if(substr($mpath,-1)!='/')
|
||||
{
|
||||
$mpath .= '/';
|
||||
}
|
||||
//if(substr($mpath,-1)!='/')
|
||||
//{
|
||||
// $mpath .= '/';
|
||||
//}
|
||||
$mpath = trim($mpath, '/').'/'; // faster...
|
||||
$e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php');
|
||||
|
||||
/*if(file_exists(e_PLUGIN.$mpath."/".$mname.".php"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user