Przeglądaj źródła

All strings that have an escape sequence must not be 'string'
\n, \r, \209 are all escape sequences.

Tyler Akins 24 lat temu
rodzic
commit
69320ed3e4
3 zmienionych plików z 5 dodań i 10 usunięć
  1. 3 3
      functions/abook_local_file.php
  2. 2 2
      functions/url_parser.php
  3. 0 5
      src/compose.php

+ 3 - 3
functions/abook_local_file.php

@@ -132,7 +132,7 @@
 
        for($i = 0 ; $i < sizeof($rows) ; $i++) {
 	 if(is_array($rows[$i]))
-	   fwrite($newfh, join('|', $rows[$i]) . '\n');
+	   fwrite($newfh, join('|', $rows[$i]) . "\n");
        }       
 
        fclose($newfh);
@@ -237,9 +237,9 @@
                $userdata['lastname'] . '|' . $userdata['email'] . '|' .
                $userdata['label'];
        // Strip linefeeds
-       $data = ereg_replace('[\r\n]', ' ', $data);
+       $data = ereg_replace("[\r\n]", ' ', $data);
        // Add linefeed at end
-       $data = $data . '\n';
+       $data = $data . "\n";
 
        // Reopen file, just to be sure
        $this->open(true);

+ 2 - 2
functions/url_parser.php

@@ -63,9 +63,9 @@
          'gopher://',
          'news://');
 
-      $poss_ends = array(' ', '\n', '\r', '<', '>', '.\r', '.\n', '.&nbsp;', 
+      $poss_ends = array(' ', "\n", "\r", '<', '>', ".\r", ".\n", '.&nbsp;', 
          '&nbsp;', ')', '(', '&quot;', '&lt;', '&gt;', '.<', ']', '[', '{', 
-         '}', '\240');
+         '}', "\240");
 
       $start = 0;
       $target_pos = strlen($body);

+ 0 - 5
src/compose.php

@@ -176,11 +176,6 @@
         // Write Attachment to file
         $fp = fopen ($attachment_dir.$localfilename, "w");
       fputs ($fp, decodeBody(mime_fetch_body($imapConnection, $forward_id, $message->header->entity_id), $message->header->encoding));
-      
-//      Don't know why these lines were included
-//        fgets($imapConnection, 256);
-//        fgets($imapConnection, 256);
-
       fclose ($fp);
       
       $attachments[$localfilename] = $filename;