coren has submitted this change and it was merged. Change subject: More minor tweaks to website ......................................................................
More minor tweaks to website Change-Id: Ie3d55e6b366c47e010bf5a81824a345fa2923080 --- M www/content/403.php M www/content/404.php M www/content/500.php M www/content/503.php M www/content/list.php M www/content/status.php M www/content/tool.php M www/index.php 8 files changed, 17 insertions(+), 17 deletions(-) Approvals: coren: Verified; Looks good to me, approved diff --git a/www/content/403.php b/www/content/403.php index ff8bf90..36157df 100644 --- a/www/content/403.php +++ b/www/content/403.php @@ -1,9 +1,9 @@ -<? $uri = $_SERVER['X_ORIGINAL_URI']; ?> +<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> <h1>Forbidden</h1> - <p>The URI you have requested, <a href="http://tools.wmflabs.org<?= $uri ?>"><code>http://tools.wmflabs.org<?= $uri ?></code></a>, might exist but the server has been instructed not to let you reach it.</p> + <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, might exist but the server has been instructed not to let you reach it.</p> <? $tool = ''; if(preg_match("@^/([^/]+)/@", $uri, $part)) { - $gr = posix_getgrnam("local-".$part[1]); + $gr = posix_getgrnam("tools.".$part[1]); if($gr) { $tool = $part[1]; $maintainers = $gr['members']; diff --git a/www/content/404.php b/www/content/404.php index f056e65..f393c45 100644 --- a/www/content/404.php +++ b/www/content/404.php @@ -1,9 +1,9 @@ -<? $uri = $_SERVER['X_ORIGINAL_URI']; ?> +<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?> <h1>Four hundred and four!</h2> - <p>The URI you have requested, <code>http://tools.wmflabs.org<?= $uri ?></code>, doesn't seem to actually exist.</p> + <p>The URI you have requested, <code><?= $uri ?></code>, doesn't seem to actually exist.</p> <? $tool = ''; if(preg_match("@^/([^/]+)/@", $uri, $part)) { - $gr = posix_getgrnam("local-".$part[1]); + $gr = posix_getgrnam("tools.".$part[1]); if($gr) { $tool = $part[1]; $maintainers = $gr['members']; diff --git a/www/content/500.php b/www/content/500.php index ef91631..d651828 100644 --- a/www/content/500.php +++ b/www/content/500.php @@ -1,10 +1,10 @@ <? $uri = $_SERVER['X_ORIGINAL_URI']; ?> <h1>Internal error</h1> - <p>The URI you have requested, <a href="http://tools.wmflabs.org<?= $uri ?>"><code>http://tools.wmflabs.org<?= $uri ?></code></a>, + <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, appears to be non-functional at this time.</p> <? $tool = ''; if(preg_match("@^/([^/]+)/@", $uri, $part)) { - $gr = posix_getgrnam("local-".$part[1]); + $gr = posix_getgrnam("tools.".$part[1]); if($gr) { $tool = $part[1]; $maintainers = $gr['members']; diff --git a/www/content/503.php b/www/content/503.php index 6a527ba..30642db 100644 --- a/www/content/503.php +++ b/www/content/503.php @@ -1,6 +1,6 @@ <? $uri = $_SERVER['X_ORIGINAL_URI']; ?> <h1>No webservice</h1> - <p>The URI you have requested, <a href="http://tools.wmflabs.org<?= $uri ?>"><code>http://tools.wmflabs.org<?= $uri ?></code></a>, + <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri ?></code></a>, is not currently serviced.</p> <? $tool = ''; if(preg_match("@^/([^/]+)/@", $uri, $part)) { diff --git a/www/content/list.php b/www/content/list.php index 8fc21ac..43e0e5c 100644 --- a/www/content/list.php +++ b/www/content/list.php @@ -21,7 +21,7 @@ </tr> </thead> <tbody> -<? $users = shell_exec("/usr/bin/getent group|/bin/grep ^local-"); +<? $users = shell_exec("/usr/bin/getent group|/bin/grep ^tools."); foreach(split("\n", $users) as $ln) { $fields = split(":", $ln); if(array_key_exists(3, $fields)) { @@ -29,7 +29,7 @@ $u = posix_getpwuid($gid); $home = $u['dir']; $indices = glob("$home/public_html/index.*"); - $user = preg_replace("/^local-/", '', $user); + $user = preg_replace("/^tools./", '', $user); $tool = array( 'home' => $home ); $tool['maints'] = array(); foreach(split(",", $members) as $uid) { @@ -53,8 +53,8 @@ } ?> <span class="mw-editsection"> - [<a href="https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=addmember&projectname=tools&servicegroupname=local-<?=$tool?>">add</a> / - <a href="https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=deletemember&projectname=tools&servicegroupname=local-<?=$tool?>">remove</a> maintainers] + [<a href="https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=addmember&projectname=tools&servicegroupname=tools.<?=$tool?>">add</a> / + <a href="https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=deletemember&projectname=tools&servicegroupname=tools.<?=$tool?>">remove</a> maintainers] </span> </td> <td class="tool-maintainers"><? diff --git a/www/content/status.php b/www/content/status.php index d424f61..fdaeaab 100644 --- a/www/content/status.php +++ b/www/content/status.php @@ -73,7 +73,7 @@ $job = $job['djob_info']['element']; $j = array(); $tool = $job['JB_owner']; - $j['tool'] = preg_replace('/^local-(.*)$/', "$1", $tool); + $j['tool'] = preg_replace('/^tools.(.*)$/', "$1", $tool); $j['sub'] = $job['JB_submission_time']; $j['name'] = $job['JB_job_name']; foreach($job['JB_hard_resource_list'] as $rvals) { diff --git a/www/content/tool.php b/www/content/tool.php index 5b68116..0071622 100644 --- a/www/content/tool.php +++ b/www/content/tool.php @@ -1,8 +1,8 @@ <H1>Wikimedia Tool Labs</H1> Welcome to the Tool Labs project, the home of community-maintained external tools supporting Wikimedia projects and their users. <? $tool=''; - $g = posix_getgrnam("local-" . $_REQUEST['tool']); - $u = posix_getpwnam("local-" . $_REQUEST['tool']); + $g = posix_getgrnam("tools." . $_REQUEST['tool']); + $u = posix_getpwnam("tools." . $_REQUEST['tool']); if($g and $u) { $tool = $_REQUEST['tool']; $maintainers = $g['members']; diff --git a/www/index.php b/www/index.php index 49c3e53..38aded8 100644 --- a/www/index.php +++ b/www/index.php @@ -38,7 +38,7 @@ <meta name="publisher" content="Wikimedia Foundation" /> <meta name="language" content="Many" /> <meta name="robots" content="index, follow" /> - <link rel="StyleSheet" href="style.css" type="text/css" media="screen" /> + <link rel="StyleSheet" href="/style.css" type="text/css" media="screen" /> <!--[if lt IE 7]> <style media="screen" type="text/css"> .col1 { -- To view, visit https://gerrit.wikimedia.org/r/123510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie3d55e6b366c47e010bf5a81824a345fa2923080 Gerrit-PatchSet: 1 Gerrit-Project: labs/toollabs Gerrit-Branch: master Gerrit-Owner: coren <mpellet...@wikimedia.org> Gerrit-Reviewer: coren <mpellet...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits