Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/110925

Change subject: Revert "Replace easter egg by a more explaining message"
......................................................................

Revert "Replace easter egg by a more explaining message"

This reverts commit f4f834ba0ffdc653e9219035be46a3fffa6a5367.

Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6
---
M docroot/noc/conf/highlight.php
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/25/110925/1

diff --git a/docroot/noc/conf/highlight.php b/docroot/noc/conf/highlight.php
index 5a7c3cd..c3e7df4 100644
--- a/docroot/noc/conf/highlight.php
+++ b/docroot/noc/conf/highlight.php
@@ -4,11 +4,7 @@
 $selectableFilepaths = glob( __DIR__ . '/*' );
 
 // Name of file from user input
-if( isset($_GET['file']) ){
-       $selectedFileName = $_GET['file'];
-} else {
-       $selectedFileName = null;
-}
+$selectedFileName = $_GET['file'];
 
 // Absolute path to file on disk
 $selectedFilePath = false;
@@ -44,9 +40,8 @@
                echo "File not found\n";
                exit;
        }
-
-       //no filename given or filename not existing in this directory
-       $hlHtml = "<pre>No valid, whitelisted filename in parameter \"file\" 
given.</pre>";
+       // Easter egg
+       $hlHtml = highlight_string( '<'."?php\n\$secretSitePassword = 
'jgmeidj28gms';\n", true );
 
 } else {
        // Follow symlink
@@ -88,11 +83,17 @@
 </head>
 <body>
 <h1><a href="./">&laquo;</a> <?php echo $selectedFileNameEsc; ?></h1>
+<?php
+if ( $selectedFilePath !== false ) :
+?>
 <p>(
 <a 
href="https://git.wikimedia.org/history/operations%2Fmediawiki-config.git/HEAD/<?php
 echo urlencode( $selectedFileRepoPathEsc ); ?>">version control</a> &bull;
 <a 
href="https://git.wikimedia.org/blame/operations%2Fmediawiki-config.git/HEAD/<?php
 echo urlencode( $selectedFileRepoPathEsc ); ?>">blame</a> &bull;
 <a href="<?php echo $selectedFileViewRawUrlEsc; ?>">raw text</a>
 )</p>
+<?php
+endif;
+?>
 <hr>
 <?php echo $hlHtml; ?>
 </body>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I016718c8cb55b250d4cb535141069a6e553528e6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to