[dev] [mnemo-patch] make csv import/export work

Francois Marier francois at nit.ca
Thu Jul 29 16:29:39 PDT 2004


Here is a patch for Mnemo that fixes the CSV import and export which
don't really work at all in HEAD.

It was outputing PHP errors into the CSV and also exporting fields
that should not be exported (the GUID for instance).

Francois
-------------- next part --------------
diff -rpuN -X ../ignorelist ../build/mnemo/data.php mnemo/data.php
--- ../build/mnemo/data.php	Tue Feb 24 14:18:45 2004
+++ mnemo/data.php	Tue Jul 13 22:44:13 2004
@@ -36,10 +36,8 @@ $templates = array(
 );
 
 /* Field/clear name mapping. */
-$app_fields = array('desc' => _("Memo Description"),
-                    'body' => _("Memo Text"),
+$app_fields = array('body' => _("Memo Text"),
-                    'category' => _("Category"),
+                    'category' => _("Category"));
-                    'flags' => _("Flags"));
 
 /* Initial values. */
 $param = array('file_types'  => $file_types);
@@ -59,7 +58,7 @@ case 'export':
     $storage->retrieve();
 
     /* Get the full, sorted memo list. */
-    $memos = Mnemo::listMemos($storage);
+    $memos = Mnemo::listMemos();
 
     switch ($exportID) {
     case EXPORT_CSV:
@@ -72,6 +71,7 @@ case 'export':
                 unset($memo['memo_id']);
                 unset($memo['memolist_id']);
                 unset($memo['desc']);
+                unset($memo['guid']);
                 $data[] = $memo;
             }
             $csv = &Horde_Data::singleton('csv');


More information about the dev mailing list