Merged revisions 50205 via svnmerge from

http://svn.silverstripe.com/open/modules/cms/branches/2.2.2

........
  r50205 | sminnee | 2008-02-26 15:26:11 +1300 (Tue, 26 Feb 2008) | 2 lines
  
  Fixed CMS bottom-navigation after publish, when using the subsites module (or other alternateAbsoluteLink implementors)
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@50851 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-03-11 01:20:24 +00:00
parent ae88663ee2
commit 2c1b94f355

View File

@ -795,11 +795,12 @@ HTML;
* - Send a status message
*/
function tellBrowserAboutPublicationChange($page, $statusMessage) {
$JS_title = Convert::raw2js($page->TreeTitle());
$JS_stageURL = Convert::raw2js(DB::query("SELECT URLSegment FROM SiteTree WHERE ID = $page->ID")->value());
$JS_liveURL = Convert::raw2js(DB::query("SELECT URLSegment FROM SiteTree_Live WHERE ID = $page->ID")->value());
$JS_stageURL = $page->DeletedFromStage ? '' : Convert::raw2js($page->AbsoluteLink());
$liveRecord = Versioned::get_one_by_stage('SiteTree', 'Live', "`SiteTree`.ID = $page->ID");
$JS_liveURL = $liveRecord ? Convert::raw2js($liveRecord->AbsoluteLink()) : '';
FormResponse::add($this->getActionUpdateJS($page));
FormResponse::update_status($page->Status);