[turba] Multiline entry patch for Turba 1.2

Edward Rudd eddie at omegaware.com
Sat Jun 14 17:51:10 PDT 2003


This patch fixes an issue with Turba 1.2 where it would insert a Carriage
Return, Line Feed instead of just Line Feed between the lines of a
multiline entry (ie. home address)  This causes a problem with Evolution
where evolution will not display the entry in the address book if there is
a carriage return in the entry..  But the entries SHOULD only have
line feeds..

I would have put this in the bugzilla system, but I have been unable to
log into that thing fro several months now.. It continually says my
password is incorrect.. and yes I had it send me the password.. 

--- addobjectaction.php Fri Jan  3 06:48:57 2003
+++ addobjectaction.php Sat Jun 14 18:18:15 2003
@@ -27,6 +27,8 @@
         } else {
             $object[$key] = mktime(0, 0, 0, $value['month'], $value['day'], $value['year']);
         }
+    } else if ($attributes[$key]['type'] == 'multiline') {
+           $value = str_replace("\r\n","\n",$value);
     }
 }
 
--- editobjectaction.php        Fri Jan  3 06:48:58 2003
+++ editobjectaction.php        Sat Jun 14 18:17:12 2003
@@ -29,7 +29,9 @@
             } else {
                 $value = mktime(0, 0, 0, $value['month'], $value['day'], $value['year']);
             }
-        }
+        } else if ($attributes[$key]['type'] == 'multiline') {
+           $value = str_replace("\r\n","\n",$value);
+       }
         $object->setValue($key, $value);
     }
 }
----



More information about the turba mailing list