From ac6f6caeac1776f01e11b143aee5f61f2be61855 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Mon, 17 Nov 2014 01:16:29 +0000 Subject: [PATCH] On save, if there was no 'last modified' text at the bottom of the page, add it Just hope that wgMaxCredits is 0. Change-Id: Idf4a7cceb0650eaec4442244066d875a3ff38e06 --- modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 3562504759..ea28a58c2a 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -1539,6 +1539,14 @@ ve.init.mw.ViewPageTarget.prototype.replacePageContent = function ( var $content = $( $.parseHTML( html ) ), $editableContent; if ( lastModified ) { + // If we were not viewing the most recent revision before (a requirement + // for lastmod to have been added by MediaWiki), we will be now. + if ( !$( '#footer-info-lastmod' ).length ) { + $( '#footer-info' ).prepend( + $( '
  • ' ).attr( 'id', 'footer-info-lastmod' ) + ); + } + $( '#footer-info-lastmod' ).text( ' ' + mw.msg( 'lastmodifiedat', lastModified.date,