From 3b602a33904a9f1b933fb472c71d0a7c4f646bf9 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 18 Jul 2008 03:40:32 +0000 Subject: [PATCH] Added missing semicolons to javascript snippets returned after publish git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@58346 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 6 +++--- code/LeftAndMain.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index e0f66b33..2157e479 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -811,7 +811,7 @@ HTML; FormResponse::update_status($page->Status); if($JS_stageURL || $JS_liveURL) { - FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title')"); + FormResponse::add("\$('sitetree').setNodeTitle($page->ID, '$JS_title');"); } else { FormResponse::add("var node = $('sitetree').getTreeNodeByIdx('$page->ID');"); FormResponse::add("if(node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);"); @@ -819,8 +819,8 @@ HTML; } FormResponse::status_message($statusMessage, 'good'); - FormResponse::add("$('Form_EditForm').elements.StageURLSegment.value = '$JS_stageURL'"); - FormResponse::add("$('Form_EditForm').elements.LiveURLSegment.value = '$JS_liveURL'"); + FormResponse::add("$('Form_EditForm').elements.StageURLSegment.value = '$JS_stageURL';"); + FormResponse::add("$('Form_EditForm').elements.LiveURLSegment.value = '$JS_liveURL';"); FormResponse::add("$('Form_EditForm').notify('PagePublished', $('Form_EditForm').elements.ID.value);"); return FormResponse::respond(); diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index a2081a24..5896e641 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -499,7 +499,7 @@ JS; foreach($changed as $page) { if($page->ID != $record->ID) { $title = Convert::raw2js($page->TreeTitle()); - FormResponse::add("$('sitetree').setNodeTitle($page->ID, \"$title\")"); + FormResponse::add("$('sitetree').setNodeTitle($page->ID, \"$title\");"); } } } @@ -672,7 +672,7 @@ JS; $movedNode->write(); $title = Convert::raw2js($movedNode->TreeTitle()); - $js .="$('sitetree').setNodeTitle($movedNode->ID, \"$title\")\n"; + $js .="$('sitetree').setNodeTitle($movedNode->ID, \"$title\");\n"; // Nodes that weren't "actually moved" shouldn't be registered as having been edited; do a direct SQL update instead } else if(is_numeric($id)) {