mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +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:
@@ -574,7 +574,6 @@ class page_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
if($sql->insert('menus', $insert) !== false)
|
if($sql->insert('menus', $insert) !== false)
|
||||||
{
|
{
|
||||||
|
|
||||||
$mes->addDebug("Menu Created");
|
$mes->addDebug("Menu Created");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -623,7 +622,7 @@ class page_admin_ui extends e_admin_ui
|
|||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
$mes = e107::getMessage();
|
$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"))
|
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");
|
$mes->addDebug("Menu Updated");
|
||||||
return true;
|
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();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
// Replace the bbcode path with a real one.
|
// 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);
|
$imgParms = $this->processParm($code_text, $parm);
|
||||||
|
|
||||||
foreach($imgParms as $k => $v)
|
foreach($imgParms as $k => $v)
|
||||||
|
Reference in New Issue
Block a user