Setup:Installation Guide/Advanced/Maintenance scripts/batchStabilize: Difference between revisions

No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
==Mass approval using a script==
==Mass approval using a script==
The script <code>ContentStabilization/maintenance/batchStabilize.php</code> can be used to approve all drafts in the wiki starting with BlueSpice 4.3+. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.
The script <code>ContentStabilization/maintenance/batchStabilize.php</code> can be used to approve all drafts in the wiki starting with BlueSpice 4.3+. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.
This script allows the approval of all pages in a namespace or, alternatively, a list of pages defined in a text file.


===Options===
===Options===
Line 8: Line 10:
!Option
!Option
!Description
!Description
|-
|<code>--pages</code>
|Flat file containing page names seperated by line break
|-
|-
|<code>--namespace</code>
|<code>--namespace</code>
Line 24: Line 23:
|Runs the script in verbose mode to show exceptions
|Runs the script in verbose mode to show exceptions
|}
|}
{{Messagebox|boxtype=note|icon=|Note text=The options  <code>--pages</code> and <code>--namespace</code> are mutual exclusive required. One - and only one - of them ''must'' be provided.}}
===Examples===
===Examples===


Line 32: Line 29:
php extensions/ContentStabilization/maintenance/batchStabilize.php --user WikiSysop --namespace 3000
php extensions/ContentStabilization/maintenance/batchStabilize.php --user WikiSysop --namespace 3000
</syntaxhighlight>
</syntaxhighlight>
====List of page names====
====List of page names ====
 
Starting with BlueSpice 4.3.2, a file with a newline-separate list of pages (as an arg or as stdin) can be used to define the pages that need to be approved:<syntaxhighlight lang="bash">
 
php extensions/ContentStabilization/maintenance/batchStabilize.php --verbose /tmp/page-titles-to-review.txt
</syntaxhighlight>
Command line:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
php extensions/ContentStabilization/maintenance/batchStabilize.php --user WikiSysop --pages Page1|Page2|Page3
php extensions/ContentStabilization/maintenance/batchStabilize.php --verbose < /tmp/page-titles-to-review.txt
</syntaxhighlight>
</syntaxhighlight>{{Textbox|boxtype=note|header=|text=In case the page titles contain special characters (like ä, ö, ü and so on), make sure to save the file in UTF-8 encoding. Otherwise the script may not be able to find the according page names inside the database!|icon=yes}}
[[en:{{FULLPAGENAME}}]]
[[en:{{FULLPAGENAME}}]]
[[de:Handbuch:Erweiterung/FlaggedRevs/Server-Skript]]
[[de:Handbuch:Erweiterung/FlaggedRevs/Server-Skript]]

Latest revision as of 09:36, 20 July 2023

Mass approval using a script

The script ContentStabilization/maintenance/batchStabilize.php can be used to approve all drafts in the wiki starting with BlueSpice 4.3+. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.

This script allows the approval of all pages in a namespace or, alternatively, a list of pages defined in a text file.

Options

Option Description
--namespace Id of namespace to flag entirely
--user Required. The user name of an existing user that is shown as page approver
--comment Adds a stabilization comment to the revision history of the page
--verbose Runs the script in verbose mode to show exceptions

Examples

Whole namespace

php extensions/ContentStabilization/maintenance/batchStabilize.php --user WikiSysop --namespace 3000

List of page names

Starting with BlueSpice 4.3.2, a file with a newline-separate list of pages (as an arg or as stdin) can be used to define the pages that need to be approved:

php extensions/ContentStabilization/maintenance/batchStabilize.php --verbose /tmp/page-titles-to-review.txt
php extensions/ContentStabilization/maintenance/batchStabilize.php --verbose < /tmp/page-titles-to-review.txt
In case the page titles contain special characters (like ä, ö, ü and so on), make sure to save the file in UTF-8 encoding. Otherwise the script may not be able to find the according page names inside the database!



To submit feedback about this documentation, visit our community forum.

No categories assignedEdit

Discussions