Fix HTML form variable names.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 20 Apr 2010 21:06:44 +0000 (15:06 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 20 Apr 2010 21:15:05 +0000 (15:15 -0600)
imp/lib/Prefs/Ui.php

index b527d58..a7674b7 100644 (file)
@@ -903,9 +903,9 @@ class IMP_Prefs_Ui
     {
         $imp_flags = $GLOBALS['injector']->getInstance('IMP_Imap_Flags');
 
-        if ($ui->vars->action == 'add') {
-            $GLOBALS['notification']->push(sprintf(_("Added flag \"%s\"."), $ui->vars->data), 'horde.success');
-            $imp_flags->addFlag($ui->vars->data);
+        if ($ui->vars->flag_action == 'add') {
+            $GLOBALS['notification']->push(sprintf(_("Added flag \"%s\"."), $ui->vars->flag_data), 'horde.success');
+            $imp_flags->addFlag($ui->vars->flag_data);
             return;
         }
 
@@ -915,9 +915,9 @@ class IMP_Prefs_Ui
         foreach ($imp_flags->getList() as $key => $val) {
             $md5 = hash('md5', $key);
 
-            switch ($ui->vars->action) {
+            switch ($ui->vars->flag_action) {
             case 'delete':
-                if ($ui->vars->data == ('bg_' . $md5)) {
+                if ($ui->vars->flag_data == ('bg_' . $md5)) {
                     $imp_flags->deleteFlag($key);
                     $GLOBALS['notification']->push(sprintf(_("Deleted flag \"%s\"."), $val['l']), 'horde.success');
                 }