Tim Landscheidt has uploaded a new change for review.

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

Change subject: Don't use deprecated PHP short tags
......................................................................

Don't use deprecated PHP short tags

Bug: T95688
Change-Id: I08ce298a2d98cdcc18a06e1b301dd63dc11a7e05
---
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, 47 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/36/203536/1

diff --git a/www/content/403.php b/www/content/403.php
index 36157df..5ba62f9 100644
--- a/www/content/403.php
+++ b/www/content/403.php
@@ -1,7 +1,7 @@
-<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
+<?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
       <h1>Forbidden</h1>
       <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 = '';
+      <?php $tool = '';
          if(preg_match("@^/([^/]+)/@", $uri, $part)) {
            $gr = posix_getgrnam("tools.".$part[1]);
            if($gr) {
@@ -13,11 +13,11 @@
       ?>
       <h2>If you have reached this page from somewhere else...</h2>
       <p>This URI is managed by the <a href="/?tool=<?= $tool ?>"><code><?= 
$tool?></code></a> tool, maintained by 
-      <? foreach($maintainers as $num => $maint):
+      <?php foreach($maintainers as $num => $maint):
            $mu = posix_getpwnam($maint);
            if($mu):
              $wtu = $mu['gecos'];
-             ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?
+             ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?php
            else:
              echo ucfirst($maint);
            endif;
@@ -36,7 +36,7 @@
       <p>If you're pretty sure this shouldn't be an error, you may wish to 
notify the tool's maintainers (above) about the error and how you ended up 
here.</p>
       <h2>If you maintain this tool</h2>
       <p>The error might be caused by incorrect permissions, or by the absence 
of an index file (this webserver does not list directory contents by 
default).</p>
-      <? else: ?>
+      <?php else: ?>
       <p>Perhaps the webserver has temporarily lost its mind, or the link 
you've followed doesn't actually lead somewhere useful?</p>
       <p>If you're pretty sure this shouldn't be an error, you may wish to 
notify the <a href="/?tool=admin">project administrators</a> about the error 
and how you ended up here.</p>
-      <? endif ?>
+      <?php endif ?>
diff --git a/www/content/404.php b/www/content/404.php
index f393c45..a98003d 100644
--- a/www/content/404.php
+++ b/www/content/404.php
@@ -1,7 +1,7 @@
-<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
+<?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
       <h1>Four hundred and four!</h2>
       <p>The URI you have requested, <code><?= $uri ?></code>, doesn't seem to 
actually exist.</p>
-      <? $tool = '';
+      <?php $tool = '';
          if(preg_match("@^/([^/]+)/@", $uri, $part)) {
            $gr = posix_getgrnam("tools.".$part[1]);
            if($gr) {
@@ -13,11 +13,11 @@
       ?>
       <h2>If you have reached this page from somewhere else...</h2>
       <p>This URI is managed by the <a href="/?tool=<?= $tool ?>"><code><?= 
$tool?></code></a> tool, maintained by 
-      <? foreach($maintainers as $num => $maint):
+      <?php foreach($maintainers as $num => $maint):
            $mu = posix_getpwnam($maint);
            if($mu):
              $wtu = $mu['gecos'];
-             ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?
+             ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?php
            else:
              echo ucfirst($maint);
            endif;
@@ -34,9 +34,9 @@
       ?>.</p>
       <p>Perhaps its files are on vacation, or the link you've followed 
doesn't actually lead somewhere useful?</p>
       <p>You might want to looks at the <a href="/?list">list of tools</a> to 
find what you were looking for, or one of the links on the sidebar to the left. 
If you're pretty sure this shouldn't be an error, you may wish to notify the 
tool's maintainers (above) about the error and how you ended up here.</p>
-      <? else: ?>
+      <?php else: ?>
       <p>Perhaps the webserver has temporarily lost its mind, or the link 
you've followed doesn't actually lead somewhere useful?</p>
       <p>You might want to looks at the <a href="/?list">list of tools</a> to 
find what you were looking for, or one of the links on the sidebar to the left. 
If you're pretty sure this shouldn't be an error, you may wish to notify the <a 
href="/?tool=admin">project administrators</a> about the error and how you 
ended up here.</p>
-      <? endif ?>
+      <?php endif ?>
 
 
diff --git a/www/content/500.php b/www/content/500.php
index e89551e..92d334e 100644
--- a/www/content/500.php
+++ b/www/content/500.php
@@ -1,8 +1,8 @@
-<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
+<?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
       <h1>Internal error</h1>
       <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri 
?></code></a>,
       appears to be non-functional at this time.</p>
-      <? $tool = '';
+      <?php $tool = '';
          if(preg_match("@^/([^/]+)/@", $uri, $part)) {
            $gr = posix_getgrnam("tools.".$part[1]);
            if($gr) {
@@ -14,11 +14,11 @@
       ?>
         <h2>If you have reached this page from somewhere else...</h2>
         <p>This URI is part of the <a href="/?tool=<?= $tool ?>"><code><?= 
$tool?></code></a> tool, maintained by 
-        <? foreach($maintainers as $num => $maint):
+        <?php foreach($maintainers as $num => $maint):
              $mu = posix_getpwnam($maint);
              if($mu):
                $wtu = $mu['gecos'];
-               ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?
+               ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?php
              else:
                echo ucfirst($maint);
              endif;
@@ -40,8 +40,8 @@
         <h2>If you maintain this tool</h2>
         <p>The error might be caused by incorrect permission, or by an error 
in the script or CGI that was meant
         to execute here.  You may wish to check your logs or <a 
href="https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Logs";>common 
causes for errors</a> in the help documentation.</p>
-      <? else: ?>
+      <?php else: ?>
         <p>Perhaps the webserver has temporarily lost its mind, or the link 
you've followed doesn't actually lead
         somewhere useful?</p>
         <p>If you're pretty sure this shouldn't be an error, you may wish to 
notify the <a href="/?tool=admin">project administrators</a> about the error 
and how you ended up here.</p>
-      <? endif ?>
+      <?php endif ?>
diff --git a/www/content/503.php b/www/content/503.php
index 8f35b8f..62621da 100644
--- a/www/content/503.php
+++ b/www/content/503.php
@@ -1,8 +1,8 @@
-<? $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
+<?php $uri = $_SERVER['HTTP_X_ORIGINAL_URI']; ?>
       <h1>No webservice</h1>
       <p>The URI you have requested, <a href="<?= $uri ?>"><code><?= $uri 
?></code></a>,
         is not currently serviced.</p>
-      <? $tool = '';
+      <?php $tool = '';
          if(preg_match("@^/([^/]+)/@", $uri, $part)) {
            $gr = posix_getgrnam("tools.".$part[1]);
            if($gr) {
@@ -14,11 +14,11 @@
       ?>
         <h2>If you have reached this page from somewhere else...</h2>
         <p>This URI is part of the <a href="/?tool=<?= $tool ?>"><code><?= 
$tool?></code></a> tool, maintained by 
-        <? foreach($maintainers as $num => $maint):
+        <?php foreach($maintainers as $num => $maint):
              $mu = posix_getpwnam($maint);
              if($mu):
                $wtu = $mu['gecos'];
-               ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?
+               ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A><?php
              else:
                echo ucfirst($maint);
              endif;
@@ -39,8 +39,8 @@
         <h2>If you maintain this tool</h2>
         <p>You have not enabled a web service for your tool, or it has stopped 
working because of a fatal error.
         You may wish to check your logs or <a 
href="https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help#Logs";>common 
causes for errors</a> in the help documentation.</p>
-      <? else: ?>
+      <?php else: ?>
         <h2>If you have reached this page from somewhere else...</h2>
         <p>This URI is not currently part of any tool.</p>
         <p>If you're pretty sure this shouldn't be an error, you may wish to 
notify the <a href="/?tool=admin">project administrators</a> about the error 
and how you ended up here.</p>
-      <? endif ?>
+      <?php endif ?>
diff --git a/www/content/list.php b/www/content/list.php
index fca351c..89418bb 100644
--- a/www/content/list.php
+++ b/www/content/list.php
@@ -22,7 +22,7 @@
                 </tr>
               </thead>
               <tbody>
-<?
+<?php
   function describe($t) {
     if(array_key_exists('description', $t)) {
       global $purifier;
@@ -67,7 +67,7 @@
     }
 ?>
                 <tr class="tool" id="toollist-<?= $tool ?>">
-                  <td class="tool-name"><?
+                  <td class="tool-name"><?php
 
       if(array_key_exists('url', $json)) {
         print "<a class=\"tool-web\" href=\"" . $json['url'] . "\">$tool</a>";
@@ -82,15 +82,15 @@
                         [<a 
href="https://wikitech.wikimedia.org/w/index.php?title=Special:NovaServiceGroup&action=managemembers&projectname=tools&servicegroupname=tools.<?=$tool?>">manage</a>
 maintainers]
                       </span>
                   </td>
-                  <td class="tool-maintainers"><?
+                  <td class="tool-maintainers"><?php
         foreach(explode(' ', $row['maintainers']) as $maint):
           if(array_key_exists($maint, $users)):
             $maint = htmlspecialchars($users[$maint]['wikitech']);
-            ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $maint 
?>"><?= ucfirst($maint) ?></a><?
+            ?><a href="https://wikitech.wikimedia.org/wiki/User:<?= $maint 
?>"><?= ucfirst($maint) ?></a><?php
           endif;
         endforeach;
 ?></td>
-                  <td class="tool-desc"><?
+                  <td class="tool-desc"><?php
         if(array_key_exists(1, $json)) {
             $first = " first";
             foreach($json as $sub) {
@@ -110,7 +110,7 @@
         }
       ?></td>
                 </tr>
-<?  endwhile;
+<?php  endwhile;
     $res->free();
 ?>
               </tbody>
diff --git a/www/content/status.php b/www/content/status.php
index 0935905..2b95576 100644
--- a/www/content/status.php
+++ b/www/content/status.php
@@ -1,4 +1,4 @@
-<?
+<?php
   function humantime($secs) {
     if($secs < 120)
       return "$secs"."s";
@@ -104,7 +104,7 @@
             <p>This is the web server for the Tool Labs project, the home of 
community-maintained external tools supporting Wikimedia projects and their 
users.</p>
 
             <h2>Grid Status</h2>
-<?
+<?php
 
   ksort($hosts);
   ksort($jobs);
@@ -122,9 +122,9 @@
               <span class="hostname"><?= $host ?></span>
               <b>Load:</b> <?= (int)($h['load_avg']*1000)/($h['num_proc']*10) 
?>%
               <b>Memory:</b> <?= (int)($h['mem']*1000)/10 ?>%
-              <? if($h['h_vmem'] > 0): ?>
-                  <b>Free vmem:</b> <? echo humanmem($hvmem); ?>
-              <? endif; ?>
+              <?php if($h['h_vmem'] > 0): ?>
+                  <b>Free vmem:</b> <?php echo humanmem($hvmem); ?>
+              <?php endif; ?>
             </div>
             <table class="hostjobs tablesorter">
               <thead>
@@ -139,7 +139,7 @@
                 </tr>
               </thead>
               <tbody>
-      <?
+      <?php
       foreach($jobs as $jobid => $j):
       if($j['host'] != $host)
         continue;
@@ -152,14 +152,14 @@
                   <td class="jobtime"><?= strftime("%F %T", $j['submit']) 
?></td>
                   <td class="jobcpu"><?= humantime($j['cpu']) ?></td>
                   <td class="jobvmem">
-                    <?= humanmem($j['vmem']/(1024*1024)) ?>/<?= 
humanmem($j['h_vmem']/(1024*1024)) ?> <? if($j['maxvmem'] > $j['vmem']*1.02): 
?>(peak <?= humanmem($j['maxvmem']/(1024*1024)) ?>)<? endif; ?>
+                    <?= humanmem($j['vmem']/(1024*1024)) ?>/<?= 
humanmem($j['h_vmem']/(1024*1024)) ?> <?php if($j['maxvmem'] > 
$j['vmem']*1.02): ?>(peak <?= humanmem($j['maxvmem']/(1024*1024)) ?>)<?php 
endif; ?>
                   </td>
                 </tr>
-      <?
+      <?php
           endforeach;
       ?>
               </tbody>
             </table>
-<?
+<?php
   endforeach;
 ?>
diff --git a/www/content/tool.php b/www/content/tool.php
index 0071622..69766d2 100644
--- a/www/content/tool.php
+++ b/www/content/tool.php
@@ -1,6 +1,6 @@
 <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='';
+  <?php $tool='';
      $g = posix_getgrnam("tools." . $_REQUEST['tool']);
      $u = posix_getpwnam("tools." . $_REQUEST['tool']);
      if($g and $u) {
@@ -12,24 +12,24 @@
   ?>
   <H2>Tool details</H2>
   <TABLE CLASS="tool-info" COLS=2 WIDTH="95%">
-    <TR><TH class="tool-name"><?
+    <TR><TH class="tool-name"><?php
       echo $tool;
       if(array_key_exists(0, glob("$home/public_html/index.*")))
         print "<br/><a href=\"/$tool/\">(Web interface)</a>";
     ?></TH><TD></TD></TR>
       <TR><TH>Description</TH>
-        <TD><?
+        <TD><?php
         if(is_readable("$home/.description")) {
           $desc = file_get_contents("$home/.description", false, NULL, 0, 
2048);
           print  $purifier->purify($desc);
         }
       ?></TD></TR>
-      <TR><TH>Maintainers</TH><TD><?
+      <TR><TH>Maintainers</TH><TD><?php
         foreach($maintainers as $maint):
           $mu = posix_getpwnam($maint);
           if($mu):
             $wtu = $mu['gecos'];
-            ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A> <?
+            ?><A HREF="https://wikitech.wikimedia.org/wiki/User:<?= $wtu 
?>"><?= ucfirst($wtu) ?></A> <?php
           else:
             echo ucfirst($maint), " ";
           endif;
@@ -37,6 +37,6 @@
       ?><TD>
       </TD></TR>
   </TABLE>
-  <? else: ?>
+  <?php else: ?>
   No such tool?  Trying to guess, are you?
-  <? endif;
+  <?php endif;
diff --git a/www/index.php b/www/index.php
index 4a9bc4b..fe38007 100644
--- a/www/index.php
+++ b/www/index.php
@@ -1,4 +1,4 @@
-<?
+<?php
     $dr = $_SERVER['DOCUMENT_ROOT'];
     $orig = $_SERVER['REQUEST_URI'];
     if(preg_match('/^\/\.([^?]*)$/', $orig, $m)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08ce298a2d98cdcc18a06e1b301dd63dc11a7e05
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

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

Reply via email to