[dev] Patch: ingo/script.php

Marc Jauvin marc at register4less.com
Thu Jun 19 18:58:54 PDT 2003


This patch aligns the line numbers in the script display window.

--
Marc Jauvin
450-441-5458
http://register4less.com
-------------- next part --------------
Index: script.php
===================================================================
RCS file: /repository/ingo/script.php,v
retrieving revision 1.21
diff -u -r1.21 script.php
--- script.php  17 Jun 2003 22:18:10 -0000      1.21
+++ script.php  20 Jun 2003 01:56:23 -0000
@@ -45,7 +45,7 @@
     $lines = preg_split('(\n|\n|\r)', $script);
     $i = 0;
     foreach ($lines as $line) {
-        echo ++$i . ': ' . $line . "\n";
+        printf("%3d: %s\n", ++$i, $line);
     }
 } else {
     echo '[' . _("No script generated.") . ']';


More information about the dev mailing list