-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
revision support #131
base: master
Are you sure you want to change the base?
revision support #131
Conversation
} else if($flags['revision'] && $REV) { | ||
$pagelog = new PageChangeLog($page); | ||
$page_rev = $pagelog->getLastRevisionAt($REV); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works only with the revisions branch but not with the current master or stable branch. The include plugin should at least support the latest two stable releases.
only add rev param when needed
if (($flags['revision'] && $REV) || $DATE_AT) { | ||
$flags['editbtn'] = 0; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this isn't needed as the edit buttons below the included page are also using the section edit button functionality of DokuWiki which is automatically disabled by DokuWiki when an old revision is rendered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is true when you don't use the $DATE_AT
functionality (which is only implemented in my revision branch).
But there you need this when you want to see the page at a state after the page was saved and before eventually some media has changed. Because then $REV
will be set to ''
(current) and only $DATE_AT
is set.
I think in order to avoid incompatibilities with the core code this shouldn't rely on the code from the pull request but rather just use the copied code until the code is merged in DokuWiki. Otherwise this might stop working if the code is changed again before being merged in DokuWiki. [edit] Though actually I think the risk is rather low as you are explicitly checking for the required method. So all in all I think that's okay. |
this pr aims to implemented a basic revision support for included pages in modes page and section.
It will need at least dokuwiki/dokuwiki#169 and will work also with branch https://github.com/lisps/dokuwiki/tree/revisions (which implements an date_at parameter)