1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

minor menu render related problems

This commit is contained in:
secretr
2012-05-04 15:00:33 +00:00
parent e00cc4dbe5
commit 0276b7fd43
2 changed files with 17 additions and 11 deletions

View File

@@ -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);
}