--- a/ajax.php Tue Feb 12 07:33:25 2008 -0500
+++ b/ajax.php Tue Feb 12 07:38:52 2008 -0500
@@ -105,7 +105,7 @@
if ( $src = $page->fetch_source() )
{
$allowed = true;
- $q = $db->sql_query('SELECT author, time_id, page_text FROM ' . table_prefix . 'logs WHERE log_type = \'page\' AND action = \'edit\'
+ $q = $db->sql_query('SELECT author, time_id, page_text, edit_summary FROM ' . table_prefix . 'logs WHERE log_type = \'page\' AND action = \'edit\'
AND page_id = \'' . $db->escape($paths->page_id) . '\'
AND namespace = \'' . $db->escape($paths->namespace) . '\'
AND is_draft = 1;');
@@ -152,6 +152,7 @@
if ( isset($_GET['get_draft']) && @$_GET['get_draft'] === '1' )
{
$return['src'] = $row['page_text'];
+ $return['edit_summary'] = $row['edit_summary'];
}
}
--- a/includes/clientside/static/editor.js Tue Feb 12 07:33:25 2008 -0500
+++ b/includes/clientside/static/editor.js Tue Feb 12 07:38:52 2008 -0500
@@ -910,6 +910,12 @@
$('ajaxEditArea').setContent(response.src);
$('ajaxEditArea').object.used_draft = true;
+ var es = document.getElementById('enano_editor_field_summary');
+ if ( es.value == '' )
+ {
+ es.value = response.edit_summary;
+ }
+
var dn = $('ajax_edit_draft_notice').object;
dn.parentNode.removeChild(dn);
}