Index: branches/unlabeled/unlabeled-1.11.4/globals.php =================================================================== diff -u -r213 -r252 --- branches/unlabeled/unlabeled-1.11.4/globals.php (.../globals.php) (revision 213) +++ branches/unlabeled/unlabeled-1.11.4/globals.php (.../globals.php) (revision 252) @@ -42,7 +42,13 @@ $retval = array(); $section = ''; + $ln = 1; + $resave = false; foreach($contents as $line) { + if ($ln == 1 && $line != '<'.'?'.'php die() ?'.">\n") { + $resave = true; + } + $ln++; $line = trim($line); $line = eregi_replace(';[.]*','',$line); if(strlen($line) > 0) { @@ -67,7 +73,14 @@ //echo '
'; } //end if } //end foreach - + if ($resave) { + $fp = fopen($file, "w"); + reset($contents); + fwrite($fp,'<'.'?'.'php die() ?'.">\n\n"); + foreach($contents as $line) fwrite($fp,"$line"); + fclose($fp); + } + return $retval; }