Manual:Extension/FlaggedRevs/Server script: Difference between revisions

(Created page with "== Mass approval using a script == The script <code>extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php</code> can be used to approve all drafts in the wiki...")
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
The script <code>extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php</code> can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.
The script <code>extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php</code> can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.


===Options===
{| class="wikitable" style="width:100%;"
|+
!Option
!Description
|-
|<code>--username</code>
|Required. The user name of the existing user to use as the "reviewer"
|-
|<code>--pageids</code>
|Flat file containing page ids seperated by line break
|-
|<code>--pages</code>
|Flat file containing page names seperated by line break
|-
|<code>--namespace</code>
|Id of namespace to flag entirely
|}
{{Messagebox|boxtype=note|icon=|Note text=The options <code>--pageids</code>, <code>--pages</code> and <code>--namespace</code> are mutual exclusive required. One - and only one - of them ''must'' be provided.}}


The pages are released per namespace and by a user with admin rights:
=== Examples ===
<syntaxhighlight lang="php">
 
==== Whole namespace ====
<syntaxhighlight lang="bash">
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000
</syntaxhighlight>
</syntaxhighlight>
If there is a large number of affected namespaces, a list of page titles or page IDs can be specified as a txt file. If necessary, this list can be created using a [[SMW queries|SMW query]].
 
==== List of page ids ====
Such a list can be created from a database query.
 
File <code>/tmp/page-ids-to-review.txt</code>:
23
42
1337
 
Command line:
<syntaxhighlight lang="bash">
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pageids /tmp/page-ids-to-review.txt
</syntaxhighlight>
 
 
==== List of page names ====
Such a list can be created using a [[SMW queries|SMW query]].
File <code>/tmp/page-titles-to-review.txt</code>:
Some/Page
Other_page
Help:Some_help_page
 
Command line:
<syntaxhighlight lang="bash">
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pages /tmp/page-titles-to-review.txt
</syntaxhighlight>
[[en:{{FULLPAGENAME}}]]
[[de:Handbuch:Erweiterung/FlaggedRevs/Server-Skript]]

Latest revision as of 15:50, 22 April 2022

Mass approval using a script

The script extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.

Options

Option Description
--username Required. The user name of the existing user to use as the "reviewer"
--pageids Flat file containing page ids seperated by line break
--pages Flat file containing page names seperated by line break
--namespace Id of namespace to flag entirely
Note:The options --pageids, --pages and --namespace are mutual exclusive required. One - and only one - of them must be provided.


Examples

Whole namespace

php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000

List of page ids

Such a list can be created from a database query.

File /tmp/page-ids-to-review.txt:

23
42
1337

Command line:

php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pageids /tmp/page-ids-to-review.txt


List of page names

Such a list can be created using a SMW query. File /tmp/page-titles-to-review.txt:

Some/Page
Other_page
Help:Some_help_page

Command line:

php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pages /tmp/page-titles-to-review.txt




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