]> git.mxchange.org Git - mailer.git/blobdiff - inc/install-inc.php
Surfbar URL status translation added, member template name fixed
[mailer.git] / inc / install-inc.php
index 9bdd5f39f0393a019483229e2216c65bea1f97e2..5f9fede1c27f7ed416f8fda48a8aad31897120b3 100644 (file)
@@ -45,8 +45,9 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 function install_WriteData ($file, $comment, $prefix, $suffix, $DATA, $sneak=0) {
        // Initialize all and count up the "seak" value
        $done = false;
-       $next = 0;
+       $next = -1;
        $sneak++;
+
        if ((file_exists($file)) && (is_readable($file))) {
                $search = "CFG: ".$comment;
                $tmp = $file.".tmp";
@@ -56,15 +57,22 @@ function install_WriteData ($file, $comment, $prefix, $suffix, $DATA, $sneak=0)
                        if (is_resource($fp_tmp)) {
                                while (!feof($fp)) {
                                        $line = fgets ($fp, 10240);
-                                       if (strpos($line, $search) > -1) $next = 0;
+                                       //* DEBUG: */ echo $search."/<font color=\"red\">".htmlentities($line)."</font><br />\n";
+                                       $found = strpos($line, $search);
+                                       //* DEBUG: */ echo "FOUND: <font color=\"brown\">";
+                                       //* DEBUG: */ var_dump($found);
+                                       //* DEBUG: */ echo "</font><br />\n";
+                                       if ($found !== false) $next = 0;
                                        if ($next > -1) {
                                                if ($next == $sneak) {
                                                        $next = -1;
                                                        $line = $prefix.$DATA.$suffix."\n";
+                                                       //* DEBUG: */ echo "NEW: <font color=\"blue\">".htmlentities($line)."</font><br />\n";
                                                } else {
                                                        $next++;
                                                }
                                        }
+                                       //* DEBUG: */ echo "WRITE: <font color=\"green\">".htmlentities($line)."</font><br />\n";
                                        fputs($fp_tmp, $line);
                                }
                                fclose($fp_tmp);