Make sure these entries are not confused for IMAP mailboxes
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Jul 2010 04:53:51 +0000 (22:53 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Jul 2010 04:53:51 +0000 (22:53 -0600)
imp/lib/IMP.php
imp/lib/Message.php

index fd23469..879fe1c 100644 (file)
@@ -258,7 +258,7 @@ class IMP
                     foreach ($tasklists as $id => $tasklist) {
                         $tasklist_list[] = array(
                             'l' => Horde_Text_Filter::filter($tasklist->get('name'), 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)),
-                            'v' => '_tasklist_' . $id
+                            'v' => '\0tasklist_' . $id
                         );
                     }
                     $t->set('tasklist', $tasklist_list);
@@ -277,7 +277,7 @@ class IMP
                     foreach ($notepads as $id => $notepad) {
                         $notepad_list[] = array(
                             'l' => Horde_Text_Filter::filter($notepad->get('name'), 'space2html', array('charset' => Horde_Nls::getCharset(), 'encode' => true)),
-                            'v' => '_notepad_' . $id
+                            'v' => '\0notepad_' . $id
                         );
                     }
                     $t->set('notepad', $notepad_list);
index c651f80..56b698d 100644 (file)
@@ -61,15 +61,15 @@ class IMP_Message
 
         /* If the target is a tasklist, handle the move/copy specially. */
         if ($conf['tasklist']['use_tasklist'] &&
-            (strpos($targetMbox, '_tasklist_') === 0)) {
-            $this->_createTasksOrNotes(str_replace('_tasklist_', '', $targetMbox), $action, $indices, 'task');
+            (strpos($targetMbox, '\0tasklist_') === 0)) {
+            $this->_createTasksOrNotes(str_replace('\0tasklist_', '', $targetMbox), $action, $indices, 'task');
             return true;
         }
 
         /* If the target is a notepad, handle the move/copy specially. */
         if ($conf['notepad']['use_notepad'] &&
-            (strpos($targetMbox, '_notepad_') === 0)) {
-            $this->_createTasksOrNotes(str_replace('_notepad_', '', $targetMbox), $action, $indices, 'note');
+            (strpos($targetMbox, '\0notepad_') === 0)) {
+            $this->_createTasksOrNotes(str_replace('\0notepad_', '', $targetMbox), $action, $indices, 'note');
             return true;
         }