Page MenuHomePhabricator

document_variable.patch

Authored By
Mattrose
Aug 28 2024, 7:42 PM
Size
1 KB
Referenced Files
None
Subscribers
None

document_variable.patch

diff --git a/README.rst b/README.rst
index a509ce76..be741b59 100644
--- a/README.rst
+++ b/README.rst
@@ -81,6 +81,11 @@ https://www.mediawiki.org/wiki/Offline_content_generator
:ref:`run your own render server <mwlib-renderserver>`.
See http://mwlib.readthedocs.org/ for more information.
+To enable the mwlib_ server, you'll need to set
+
+``$wgCollectionDisableDownloadSection`` to false to re-enable the UI to
+allow you to use the ``$wgCollectionMWServeURL``
+
Finally you'll have to set ``$wgCollectionMWServeURL`` in your ``LocalSetting.php``:
``$wgCollectionMWServeURL`` (string)
diff --git a/includes/Specials/SpecialCollection.php b/includes/Specials/SpecialCollection.php
index 361905c9..f7637e0a 100644
--- a/includes/Specials/SpecialCollection.php
+++ b/includes/Specials/SpecialCollection.php
@@ -421,7 +421,9 @@ class SpecialCollection extends SpecialPage {
$out->setPageTitleMsg( $this->msg( 'coll-book_creator' ) );
MessageBoxHelper::addModuleStyles( $out );
- $out->addHTML( MessageBoxHelper::renderWarningBoxes() );
+ if ( $wgCollectionDisableDownloadSection ) {
+ $out->addHTML( MessageBoxHelper::renderWarningBoxes() );
+ };
$out->addWikiMsg( 'coll-book_creator_intro' );
$out->addModules( 'ext.collection.checkLoadFromLocalStorage' );
diff --git a/templates/CollectionPageTemplate.php b/templates/CollectionPageTemplate.php
index b581aea2..728377b2 100644
--- a/templates/CollectionPageTemplate.php
+++ b/templates/CollectionPageTemplate.php
@@ -158,8 +158,9 @@ class CollectionPageTemplate extends QuickTemplate {
?>
<div class="mw-collection-container">
<?php
- echo ( MessageBoxHelper::renderWarningBoxes() );
-
+ if ( $wgCollectionDisableDownloadSection ) {
+ echo ( MessageBoxHelper::renderWarningBoxes() );
+ };
$form = new HTMLForm( $fields, $context );
$form->setMethod( 'post' )
->addHiddenField( 'bookcmd', 'set_titles' )

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18783036
Default Alt Text
document_variable.patch (1 KB)

Event Timeline