jenkins-bot has submitted this change and it was merged. (
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, 7 insertions(+), 1 deletion(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
Zoranzoki21: Looks good to me, but someone else must approve
diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index af7203e..dfc6ebc 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -64,7 +64,13 @@
// 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 = $selectedFileName;
+ }
+
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: merged
Gerrit-Change-Id: Idfffe0d1f0ab7314a4ce543602c3ed9ccaf54558
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits