Explorar o código

- fixed error in iso-8859-2 handling function in function/i18n.php.
- prepare for another php backend in functions/imap.php.
- aligned "Sent" button in src/compose.php.
- added two .cvsignore files in data/ and config/ directory.

Ondřej Surý %!s(int64=25) %!d(string=hai) anos
pai
achega
3a1107410a
Modificáronse 5 ficheiros con 12 adicións e 9 borrados
  1. 1 0
      config/.cvsignore
  2. 1 0
      data/.cvsignore
  3. 3 3
      functions/i18n.php
  4. 6 3
      functions/imap.php
  5. 1 3
      src/compose.php

+ 1 - 0
config/.cvsignore

@@ -0,0 +1 @@
+config.php

+ 1 - 0
data/.cvsignore

@@ -0,0 +1 @@
+*.pref

+ 3 - 3
functions/i18n.php

@@ -58,9 +58,9 @@
       if (ereg("iso-8859-(.*)", $charset, $res)) {
       if (ereg("iso-8859-(.*)", $charset, $res)) {
          if ($res[1] == "1")
          if ($res[1] == "1")
             return charset_decode_iso_8859_1 ($string);
             return charset_decode_iso_8859_1 ($string);
-         if ($res[1] == "2")
+         else if ($res[1] == "2")
             return charset_decode_iso_8859_2 ($string);
             return charset_decode_iso_8859_2 ($string);
-         if ($res[1] == "7")
+         else if ($res[1] == "7")
             return charset_decode_iso_8859_7 ($string);
             return charset_decode_iso_8859_7 ($string);
          else if ($res[1] == "15")
          else if ($res[1] == "15")
             return charset_decode_iso_8859_15 ($string);
             return charset_decode_iso_8859_15 ($string);
@@ -221,7 +221,7 @@
    function charset_decode_iso_8859_2 ($string) {
    function charset_decode_iso_8859_2 ($string) {
       global $default_charset;
       global $default_charset;
 
 
-      if (strtolower($default_charset) == "iso-8859-7") {
+      if (strtolower($default_charset) == "iso-8859-2") {
          return $string;
          return $string;
       } else {
       } else {
          // Only do the slow convert if there are 8-bit characters
          // Only do the slow convert if there are 8-bit characters

+ 6 - 3
functions/imap.php

@@ -4,8 +4,11 @@
     **/
     **/
 
 
    $imap_php = true;
    $imap_php = true;
+
+   $imap_backend = 'imap';
    
    
-   include ("../functions/imap_mailbox.php");
-   include ("../functions/imap_messages.php");
-   include ("../functions/imap_general.php");
+   include ("../functions/".$imap_backend."_mailbox.php");
+   include ("../functions/".$imap_backend."_messages.php");
+   include ("../functions/".$imap_backend."_general.php");
+   include ("../functions/".$imap_backend."_search.php");
 ?>
 ?>

+ 1 - 3
src/compose.php

@@ -253,9 +253,7 @@
       echo "</TEXTAREA><BR>\n";
       echo "</TEXTAREA><BR>\n";
       echo "      </TD>\n";
       echo "      </TD>\n";
       echo "   </TR>\n";
       echo "   </TR>\n";
-      echo "   <TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=SUBMIT NAME=send VALUE=\"";
-      echo _("Send");
-      echo "\"></TD></TR>\n";
+      echo "   <TR><TD>&nbsp;</TD><TD ALIGN=LEFT><INPUT TYPE=SUBMIT NAME=send VALUE=\""._("Send")."\"></TD></TR>\n";
       
       
       // This code is for attachments
       // This code is for attachments
       echo "   <tr>\n";
       echo "   <tr>\n";