mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 01:22:13 +02:00
Add menu item of missing during page-menu update. BC fix for {e_IMAGE} path in [img] bbcode.
This commit is contained in:
parent
23a30f3a10
commit
332084d9c9
@ -574,7 +574,6 @@ class page_admin_ui extends e_admin_ui
|
||||
|
||||
if($sql->insert('menus', $insert) !== false)
|
||||
{
|
||||
|
||||
$mes->addDebug("Menu Created");
|
||||
return true;
|
||||
}
|
||||
@ -623,7 +622,7 @@ class page_admin_ui extends e_admin_ui
|
||||
$sql = e107::getDb();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$menu_name = $tp->toDB($newdata['menu_title']); // not to be confused with menu-caption.
|
||||
$menu_name = $tp->toDB($newdata['menu_name']); // not to be confused with menu-caption.
|
||||
|
||||
if ($sql->select('menus', 'menu_name', "`menu_path` = ".$id." LIMIT 1"))
|
||||
{
|
||||
@ -632,6 +631,12 @@ class page_admin_ui extends e_admin_ui
|
||||
$mes->addDebug("Menu Updated");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else // missing menu record so create it.
|
||||
{
|
||||
$mes->addDebug("Missing Menu-id detected: ".$id);
|
||||
return $this->afterCreate($newdata,$olddata,$id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,8 @@ class bb_img extends e_bb_base
|
||||
$tp = e107::getParser();
|
||||
|
||||
// Replace the bbcode path with a real one.
|
||||
$code_text = str_replace('{e_MEDIA_IMAGE}', e_HTTP."thumb.php?src=e_MEDIA_IMAGE/", $code_text);
|
||||
$code_text = str_replace('{e_MEDIA}','{e_MEDIA_IMAGE}',$code_text); //BC 0.8 fix.
|
||||
$code_text = str_replace('{e_MEDIA_IMAGE}', e_HTTP."thumb.php?src=e_MEDIA_IMAGE/", $code_text);
|
||||
$imgParms = $this->processParm($code_text, $parm);
|
||||
|
||||
foreach($imgParms as $k => $v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user