[28922] trunk/www/downloads.php

source_changes at macosforge.org source_changes at macosforge.org
Tue Sep 11 13:18:50 PDT 2007


Revision: 28922
          http://trac.macosforge.org/projects/macports/changeset/28922
Author:   jmpp at macports.org
Date:     2007-09-11 13:18:49 -0700 (Tue, 11 Sep 2007)

Log Message:
-----------
Whitespace changes only: 4-space soft-tabs.

Modified Paths:
--------------
    trunk/www/downloads.php

Modified: trunk/www/downloads.php
===================================================================
--- trunk/www/downloads.php	2007-09-11 20:12:55 UTC (rev 28921)
+++ trunk/www/downloads.php	2007-09-11 20:18:49 UTC (rev 28922)
@@ -1,43 +1,38 @@
-  <?php
+<?php
     /* $Id$ */
     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
     include_once("$MPWEB/includes/common.inc");
     print_header('MacPorts -- Downloads', 'utf-8');
-  ?>
+?>
 
     <div id="content">
-		<h2 class="hdr">Available Downloads</h2>
-		<table>
+        <h2 class="hdr">Available Downloads</h2>
+        <table>
 <?php
-$dir=".";
+            $dir=".";
+            // Read files from the dirctory
+            $files = array();
+            $rep=opendir($dir);
+            while ($file = readdir($rep)) {
+                if (preg_match('/^(\..*)|(.*\.(php|css|html|js))$/', $file) || is_dir($file)) { continue; }
+                // Add file to array, as key, with modtime as value
+                $files[$file] = filemtime($file);
+            }
+            closedir($rep);
 
-// Read files from the dirctory
-$files = array();
-$rep=opendir($dir);
-while ($file = readdir($rep)) {
-	if (preg_match('/^(\..*)|(.*\.(php|css|html|js))$/', $file)
-		|| is_dir($file)
-	   ) {
-		continue;
-	}
-	
-	// Add file to array, as key, with modtime as value
-	$files[$file] = filemtime($file);
-}
-closedir($rep);
+            // Sort the array in reverse order by value (modtime)
+            arsort($files);
 
-// Sort the array in reverse order by value (modtime)
-arsort($files);
-
-// Emit the files, with dates
-foreach ($files as $f => $t) {
-	echo "<tr>";
-	echo "<td>".date("d-M-Y G:i", $t)."</td><td><a href=\"/macports/downloads/$f\">$f</a></td>\n";
-	echo "</tr>";
-}
+            // Emit the files, with dates
+            foreach ($files as $f => $t) {
+                echo "<tr>";
+                echo "<td>".date("d-M-Y G:i", $t)."</td><td><a href=\"/macports/downloads/$f\">$f</a></td>\n";
+                echo "</tr>";
+            }
 ?>
-		</table>
+        </table>
     </div>
+
 <?php
-  print_footer();
+    print_footer();
 ?>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070911/2b859126/attachment.html


More information about the macports-changes mailing list