Commit 7604f954 authored by Melissa Draper's avatar Melissa Draper
Browse files

Fix swapping of site menus from file to url (bug #871487)

Updating a site menu item and swapping it from an external url to
a site file or vice versa was failing to create the correct type of
link on account of incorrect parameters. Unfortunately this can't
fix existing muddled links, as it has no way of knowing whether the
url value or the file value in the database is the one to use.

Change-Id: Ib8ac2da42125b020a1214b268c079f93166d2da8
Signed-off-by: default avatarMelissa Draper <>
parent bb88eaa7
......@@ -43,9 +43,11 @@ $data = new StdClass;
if ($type == 'sitefile') {
// Get file id.
$data->file = $linkedto;
$data->url = null;
else if ($type == 'externallink') {
$data->url = $linkedto;
$data->file = null;
else { // Bad menu item type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment