Skip to content
Permalink
Browse files

πŸ› (Draft) Fix exception when actually viewing a draft of a page

Not sure why this didn't show up sooner πŸ˜•
  • Loading branch information...
micgro42 committed Jun 14, 2018
1 parent 69a81ab commit 520438b32e5e35467e5bd9266ecfe48d65d9a27e
Showing with 12 additions and 2 deletions.
  1. +10 βˆ’0 inc/Draft.php
  2. +2 βˆ’2 inc/html.php
@@ -152,4 +152,14 @@ public function getErrors()
{
return $this->errors;
}
/**
* Get the timestamp when this draft was saved
*
* @return int
*/
public function getDraftDate()
{
return filemtime($this->cname);
}
}
@@ -314,10 +314,10 @@ function html_draft(){
html_diff($text, false);
$form = new Doku_Form(array('id' => 'dw__editform'));
$form->addHidden('id', $ID);
$form->addHidden('date', $draft['date']);
$form->addHidden('date', $draft->getDraftDate());
$form->addHidden('wikitext', $text);
$form->addElement(form_makeOpenTag('div', array('id'=>'draft__status')));
$form->addElement($lang['draftdate'].' '. dformat(filemtime($INFO['draft'])));
$form->addElement($draft->getDraftMessage());
$form->addElement(form_makeCloseTag('div'));
$form->addElement(form_makeButton('submit', 'recover', $lang['btn_recover'], array('tabindex'=>'1')));
$form->addElement(form_makeButton('submit', 'draftdel', $lang['btn_draftdel'], array('tabindex'=>'2')));

0 comments on commit 520438b

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.