Flagged Revisions
For the documentation, see Flagged Revisions & Wiki Argument Variables
ISO9001
Improvements needed to facilitate the use of Tiki for the ISO9001 quality protocol.
See also profile ISO9001 and wish5112
See: https://tiki.org/tiki-view_forum_thread.php?forumId=3&comments_parentId=54311
New wiki argument variables added in trunk (for Tiki14):
- currentVersion
- currentVersionApprover
- currentVersionApproval
- currentVersionApproved
See: r53372, r53373
Tiki9 Flagged Revisions
Flagged revisions could use a little TLC. See http://doc.tiki.org/Flagged+Revisions#FAQ Here are some notes that are hoped to make that TLC easier for a newb.
- How are they implemented in the database?
See the Database references table below. When you approve a Flagged Revision, a record is appended in tiki_objects_attributes, with itemId=tiki_history.historyId, type="wiki history", attribute="tiki.history.moderation", and value="OK". Then follow table.fields tiki_objects_attributes. itemId => tiki_history.historyId => tiki_history.pageName and tiki_history.version, which are two fields which match those in tabe tiki_pages. - There is no way to list all current pending Flagged Revisions.
- A simple way to implement that might be to modify tiki-listpages.php by adding another Filter, very similar and following the tiki-listpages.php and tikilib.php code paths of "exact_match", selectable by a checkbox, labeled something like "Flagged Revisions pending approval". See tikilib.php function list_pages(). Need to define $mid = "where" clause, and "elseif ($type == 'flaggedrev_pending')".
Database references
[+]Table | Relevant Fields |
tiki_pages | page_id(=14) pageName(=Procedures) version(=2) data(=latest content, may or may not yet be approved) |
tiki_pages_changes | Empty |
tiki_history | historyId(=77) pageName(=Procedures) version(=2) data(=blob) |
tiki_objects_attributes | attributeId(=autoincrement) type(="wiki history") itemId(=tiki_history.historyId) attribute(="tiki.history.moderation") value(="OK") |
When you save an edit to a wiki page, a new record is appended to tiki_history database table, with an incremented version number. The new current wiki content is stuffed in the data blob field (easily readable in a text editor). tiki-pagehistory.php?page=PageName will list each saved edit separately, but those that have been approved contain the text "(approved)" in the "Information" column; so where is that "(approved)" stored or calculated?
So, after all this review, I think we can implement a listing of wiki pages pending flagged-revision approval by adding, on tiki-listpages.php, to the Type: dropdown, which currently has only an option for "Pages not in structure", a new option called "Pages Pending Approval".
Reference Notes, Ignore
[+]
TPL files
- tiki-flaggedrev_approval_header.tpl
{if $prefs.flaggedrev_approval eq 'y' and $revision_approval}
{if ($revision_approved or $revision_displayed) and $revision_approved neq $lastVersion}
{if $lastVersion eq $revision_displayed}
PHP Files
- lib/wiki/flaggedrevisionlib.php
- function page_requires_approval($pageName)
- $attributelib->set_attribute('wiki history', $version_info'historyId', $attribute, $value);
- $attribute="tiki.history.moderation", $value="OK" ($flag="moderation")
- function page_requires_approval($pageName)
- lib/wiki/histlib.php
- tiki-pagehistory.php
- $auto_query_args = array('page', 'oldver', 'newver', 'compare', 'diff_style', 'show_translation_history', 'show_all_versions', 'history_offset', 'paginate', 'history_pagesize');
- $info = $tikilib->get_page_info($page);
- if (isset($_REQUEST'preview', $_REQUEST'flaggedrev', $_REQUEST'page') && $prefs'flaggedrev_approval' 'y' && $tiki_p_wiki_approve 'y') {$targetFlag = null;
$targetFlag = 'OK';
$targetVersion = (int) $_REQUEST'approve';
$targetFlag is what is pushed into the "value" field in database table tiki_object_attributes.- $flaggedrevisionlib->flag_revision($info'pageName', $targetVersion, 'moderation', $targetFlag);
- lib/attributes/attributelib.php
Notes
- page_ref_id is a wiki Structure page reference. Interestingly, tiki-editpage.php?page=PageName&page_ref_id=5 has both a "page=" and a "page_ref_id=".
- Is it possible to create a search like in tiki-search_replace.php, $results = $wikilib->get_pages_contains() that instead lists pages with pending approvals?
- By selecting the appropriate checkboxes here , tiki-listpages.php can list "Last ver." and "Vers.", which are usually the same, but sometimes different, but, at the moment don't make sense to my test page pending Flagged Revisions, dangit. Also, at the bottom, it has a "Perform action with checked:" dropdown that could include an option to approve the pending Flagged Revisions, someday.
Bugs/Tracker
Open
Rating | Subject | Submitted by | Importance | Easy to solve? | Priority | Category | Volunteered to solve | Created | LastModif | Comments | |
---|---|---|---|---|---|---|---|---|---|---|---|
(0) | Multiple issues with Staging and Approval in Tiki 6 | Rick Sapir / Tiki for Smarties | 9 high | 45 |
| 2010-11-25 | 2010-12-21 | ||||
(1) | (ISO 9001) Versions Validated and then Approved | cr0vax | 4 | 1 difficult | 4 |
| 2015-04-01 | 2015-04-01 | |||
(0) | IP of approver shown instead of creators name on wiki pages | Rontu | 7 | 35 |
| 2008-10-22 | 2024-07-06 | fjcolo-14 Feb 09 | |||
(0) | Plugin validation cannot be turned off, TW5.1 | Gergely | 7 | 35 |
| 2010-09-28 | 2010-09-28 | ||||
(0) | Default Object Category | epaik | 7 | 35 |
| 2011-01-21 | 2011-03-16 | evliempt-18 Dec 14 | |||
(0) | Email notification (object entered/left category) is not working when i use the transition with the transition module | gcosilveira | 7 | 35 |
| 2011-05-04 | 2024-07-06 | ||||
(0) | Staging and Approval problem | ChadDa3mon | 6 | 30 |
| 2009-04-15 | 2010-12-21 | ||||
(0) | Prompt for category when using Staging & Approval feature | 5 | 25 |
| 2008-06-26 | 2009-02-01 | elukac-01 Jul 08 | ||||
(0) | Page description of wiki page disappears either after approval or when editing an approved page | Rontu | 5 | 25 |
| 2008-10-06 | 2009-02-01 | ||||
(0) | Structures do not work with Staging | thebookdoc | 5 | 25 |
| 2009-03-18 | 2010-12-24 | ||||
(1) | Wiki page print function can preview unapproved page | marshallau | 5 | 4 | 20 |
| 2014-12-31 | 2020-03-07 | xavi-31 Dec 14 |
Pending
Rating | Subject | Submitted by | Importance | Easy to solve? | Priority | Category | Volunteered to solve | Created | LastModif | Comments | |
---|---|---|---|---|---|---|---|---|---|---|---|
(0) | Wiki Staging & Approval Does Not Work | olibird | 9 high | 45 |
| 2010-06-29 | 2010-12-21 | arild-08 Oct 11 |
Closed
[+]
Related
- http://tech.slashdot.org/story/09/08/24/224259/Wikipedia-To-Require-Editing-Approval
- http://en.wikipedia.org/wiki/Wikipedia:Flagged_revisions
- http://features.sheep.art.pl/StagedCommits