jenkins-bot has submitted this change and it was merged.

Change subject: Move EasyTimeline config to its own file
......................................................................


Move EasyTimeline config to its own file

I will need to write some test for EasyTimeline and assert the
configured fonts are properly registered in the /fonts/ submodule (see
T22825).

Since CommonSettings.php is not easily includable for testing, move all
of EasyTimeline config to a standalone file.
Add the noc entry and refresh symbolic link.

Bug: T22825
Change-Id: I6ea585cfe10c3a87de0ee5e761d91860647392c1
---
A docroot/noc/conf/timeline.php.txt
M docroot/noc/createTxtFileSymlinks.sh
M wmf-config/CommonSettings.php
A wmf-config/timeline.php
4 files changed, 24 insertions(+), 14 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/docroot/noc/conf/timeline.php.txt 
b/docroot/noc/conf/timeline.php.txt
new file mode 120000
index 0000000..cf41bde
--- /dev/null
+++ b/docroot/noc/conf/timeline.php.txt
@@ -0,0 +1 @@
+../../../wmf-config/timeline.php
\ No newline at end of file
diff --git a/docroot/noc/createTxtFileSymlinks.sh 
b/docroot/noc/createTxtFileSymlinks.sh
index 1e5be37..803ea6a 100755
--- a/docroot/noc/createTxtFileSymlinks.sh
+++ b/docroot/noc/createTxtFileSymlinks.sh
@@ -42,6 +42,7 @@
        squid-labs.php
        session.php
        session-labs.php
+       timeline.php
        trusted-xff.php
        Wikibase.php
        Wikibase-labs.php
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 887cded..ab0e3b9 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -665,21 +665,10 @@
 };
 
 if ( $wmgUseTimeline ) {
-       wfLoadExtension( 'timeline' );
-       if ( $wgDBname === 'testwiki' || $wgDBname === 'mlwiki' ) {
-               // FreeSansWMF has been generated from FreeSans and FreeSerif 
by using this script with fontforge:
-               // Open("FreeSans.ttf");
-               // MergeFonts("FreeSerif.ttf");
-               // SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF 
Regular", "Regular", "");
-               // Generate("FreeSansWMF.ttf", "", 4 );
-               $wgTimelineFontFile = 'FreeSansWMF.ttf';
-       } elseif ( $lang == 'zh' ) {
-               $wgTimelineFontFile = 'unifont-5.1.20080907.ttf';
-       }
-       $wgTimelineFileBackend = 'local-multiwrite';
-       $wgTimelineEpochTimestamp = '20130601000000';
+       include( "$wmfConfigDir/timeline.php" );
 }
-
+# Most probably only used by EasyTimeline which is conditionally included above
+# but it is hard know whether there other use cases.
 putenv( "GDFONTPATH=/srv/mediawiki/fonts" );
 
 if ( $wmgUseWikiHiero ) {
diff --git a/wmf-config/timeline.php b/wmf-config/timeline.php
new file mode 100644
index 0000000..9837c53
--- /dev/null
+++ b/wmf-config/timeline.php
@@ -0,0 +1,19 @@
+<?php
+
+# WARNING: This file is publiccally viewable on the web.
+# Do not put private data here.
+
+wfLoadExtension( 'timeline' );
+
+if ( $wgDBname === 'testwiki' || $wgDBname === 'mlwiki' ) {
+       // FreeSansWMF has been generated from FreeSans and FreeSerif by using 
this script with fontforge:
+       // Open("FreeSans.ttf");
+       // MergeFonts("FreeSerif.ttf");
+       // SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF Regular", 
"Regular", "");
+       // Generate("FreeSansWMF.ttf", "", 4 );
+       $wgTimelineFontFile = 'FreeSansWMF.ttf';
+} elseif ( $lang == 'zh' ) {
+       $wgTimelineFontFile = 'unifont-5.1.20080907.ttf';
+}
+$wgTimelineFileBackend = 'local-multiwrite';
+$wgTimelineEpochTimestamp = '20130601000000';

-- 
To view, visit https://gerrit.wikimedia.org/r/321493
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ea585cfe10c3a87de0ee5e761d91860647392c1
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Dereckson <dereck...@espace-win.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Zfilipin <zfili...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to