Skip to content
Snippets Groups Projects
Commit d259f728 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

fixed locktimer/draft saving on new pages

When creating new pages, no date field is added in the edit form.
parent 41c14117
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ function ajax_lock(){
'prefix' => $_POST['prefix'],
'text' => $_POST['wikitext'],
'suffix' => $_POST['suffix'],
'date' => $_POST['date'],
'date' => (int) $_POST['date'],
'client' => $client,
);
$cname = getCacheName($draft['client'].$id,'.draft');
......
......@@ -418,7 +418,9 @@ var locktimer = new locktimer_class();
params += '&prefix='+encodeURIComponent(dwform.elements.prefix.value);
params += '&wikitext='+encodeURIComponent(dwform.elements.wikitext.value);
params += '&suffix='+encodeURIComponent(dwform.elements.suffix.value);
params += '&date='+encodeURIComponent(dwform.elements.date.value);
if(dwform.elements.date){
params += '&date='+encodeURIComponent(dwform.elements.date.value);
}
}
locktimer.sack.runAJAX(params);
locktimer.lasttime = now;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment