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
Better draft handling #2415
Better draft handling #2415
Conversation
This change is useful for plugins that may want to implement their own toolbar (and thus hide the default toolbar), but still would like to let the locktimer set the draft status.
Plugins may want to add further fields to be present when saving drafts. Plugins may want to execute some js functionality that should be timed to the saved draft/refreshed lock. If a plugin does another init() to attach the dw_locktimer to its own editor, then the default callback would be added a second time, causing unexpected and undesired behavior. This includes the changes from the following commits: 6ef45cc 6ca947f 0fff419 87bed8b
Re|: that failed Scrutinizer inspection: |
The pull request at DokuWiki has been replaced with a rewrite which implements things a bit cleaner.
inc/Draft.php
Outdated
protected $id; | ||
protected $client; | ||
|
||
public function __construct($ID, $client) |
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.
missing doc block ;-)
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.
LGTM
This implements many of the same features as #2413, but in a cleaner way.
This adds a new
Draft
class and uses that for all draft-related actions. The new event is now namedDRAFT_SAVE
Thus this replaces #2413