mirror of
https://github.com/e107inc/e107.git
synced 2025-06-08 11:57:29 +02:00
Bugtracker #4387 - allow multiple shortcodes on one line
This commit is contained in:
parent
822e811bd9
commit
bc4e612896
@ -1,16 +1,21 @@
|
|||||||
/* $Id: menu.sc,v 1.3 2008-01-13 12:34:40 e107steved Exp $ */
|
/* $Id: menu.sc,v 1.4 2008-05-30 20:45:53 e107steved Exp $ */
|
||||||
global $sql;
|
global $sql;
|
||||||
global $ns;
|
global $ns;
|
||||||
global $eMenuList;
|
global $eMenuList;
|
||||||
global $error_handler;
|
global $error_handler;
|
||||||
$tmp = explode(":",$parm);
|
$tmp = explode(":",$parm);
|
||||||
|
|
||||||
|
$buffer_output = TRUE; // Default - return all output.
|
||||||
|
if (isset($tmp[1]) && $tmp[1] == 'echo') $buffer_output = FALSE;
|
||||||
|
if (isset($tmp[1]) && $tmp[1] == 'ret') $buffer_output = TRUE; // 0.7 compatible parameter
|
||||||
|
|
||||||
if (!array_key_exists($tmp[0],$eMenuList)) {
|
if (!array_key_exists($tmp[0],$eMenuList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($tmp[1]) && $tmp[1] == 'ret') {
|
if ($buffer_output)
|
||||||
ob_start();
|
{
|
||||||
|
ob_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($eMenuList[$tmp[0]] as $row)
|
foreach($eMenuList[$tmp[0]] as $row)
|
||||||
@ -65,9 +70,12 @@ foreach($eMenuList[$tmp[0]] as $row)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($show_menu) {
|
|
||||||
|
if($show_menu)
|
||||||
|
{
|
||||||
$mname = $row['menu_name'];
|
$mname = $row['menu_name'];
|
||||||
if($error_handler->debug == true) {
|
if($error_handler->debug == true)
|
||||||
|
{
|
||||||
echo "\n<!-- Menu Start: ".$mname." -->\n";
|
echo "\n<!-- Menu Start: ".$mname." -->\n";
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time($row['menu_name']);
|
$sql->db_Mark_Time($row['menu_name']);
|
||||||
@ -105,14 +113,16 @@ foreach($eMenuList[$tmp[0]] as $row)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time("(After ".$mname.")");
|
$sql->db_Mark_Time("(After ".$mname.")");
|
||||||
if ($error_handler->debug == true) {
|
if ($error_handler->debug == true)
|
||||||
echo "\n<!-- Menu End: ".$mname." -->\n";
|
{
|
||||||
|
echo "\n<!-- Menu End: ".$mname." -->\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($tmp[1]) && $tmp[1] == 'ret') {
|
if ($buffer_output)
|
||||||
$ret = ob_get_contents();
|
{
|
||||||
ob_end_clean();
|
$ret = ob_get_contents();
|
||||||
return $ret;
|
ob_end_clean();
|
||||||
|
return $ret;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user