[GRASS-SVN] r31852 - grass-web/trunk

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jun 26 05:31:44 EDT 2008


Author: neteler
Date: 2008-06-26 05:31:44 -0400 (Thu, 26 Jun 2008)
New Revision: 31852

Modified:
   grass-web/trunk/grassmodules.php
Log:
fix

Modified: grass-web/trunk/grassmodules.php
===================================================================
--- grass-web/trunk/grassmodules.php	2008-06-26 08:07:51 UTC (rev 31851)
+++ grass-web/trunk/grassmodules.php	2008-06-26 09:31:44 UTC (rev 31852)
@@ -19,7 +19,7 @@
   $cc=0;
   if($type=='random'){
     $ra=rand(0,1000);
-    while(substr($a[$ra], 0, 27)!="<tr><td valign=top><small><a href="){
+    while(substr($a[$ra], 0, 27)!="<tr><td valign=top><a href="){
       $ra=rand(0,1000);
 	  $cc++;
 	  if($cc>20){
@@ -31,7 +31,7 @@
 	
   else if($type=='day'){
     $ra=date("z")+75;
-    while(substr($a[$ra], 0, 27)!="<tr><td valign=top><small><a href="){
+    while(substr($a[$ra], 0, 27)!="<tr><td valign=top><a href="){
       $ra=date("z")+$cc;
 	  $cc++;
 	  if($cc>20){
@@ -42,7 +42,9 @@
 	}
 	else
 	 $a[$ra]="Error in module";
-  return "<table>" . str_replace("href=\"", "href=\"$fullindex_directory/", $a[$ra]) . "</table>";
+$what=array("<tr><td valign=top><a href=\"","</a>", "<td>", "</td>");
+$with=array("<tr><td valign=top><small><a href=\"$fullindex_directory/","</a></small>", "<td><small>", "</small></td>");	 
+  return "<table>" . str_replace($what, $with, $a[$ra]) . "</table>";
 }
 
 



More information about the grass-commit mailing list