Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375036 )

Change subject: Fix links on highlight.php for dblists
......................................................................

Fix links on highlight.php for dblists

Bug: T174703
Change-Id: Idfffe0d1f0ab7314a4ce543602c3ed9ccaf54558
---
M docroot/noc/conf/highlight.php
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/36/375036/2

diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index af7203e..d090f31 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -64,7 +64,14 @@
                // Which is a problem if our PWD is not the same dir (such as 
in unit tests).
                $selectedFilePath = realpath( $selectedFilePath );
                // Figure out path to selected file in the mediawiki-config 
repository
-               $selectedFileRepoPath = ( basename( dirname( $selectedFilePath 
) ) === 'wmf-config' ? 'wmf-config/' : '' ) . $selectedFileName;
+               $baseDir = basename( dirname( $selectedFilePath ) );
+               if ( in_array( $baseDir, [ 'dblists', 'wmf-config' ] ) ) {
+               {
+                       $selectedFileRepoPath = $baseDir . '/' . 
$selectedFileName;
+               } else {
+                       $selectedFileRepoPath = '';
+               }
+               
                if ( substr( $selectedFileName, -4 ) === '.php' ) {
                        $hlHtml = highlight_file( $selectedFilePath, true );
                        $hlHtml = str_replace( ' ', ' ', $hlHtml ); // 
https://bugzilla.wikimedia.org/19253

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfffe0d1f0ab7314a4ce543602c3ed9ccaf54558
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@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