From d168b9909acc66510bd24b3e74f6828f47939f75 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 08 Sep 2009 07:51:49 -0400
Subject: [PATCH] - managesieve: Fix handling of "true" as "anyof (true)" test

---
 plugins/new_user_dialog/new_user_dialog.php |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/plugins/new_user_dialog/new_user_dialog.php b/plugins/new_user_dialog/new_user_dialog.php
index c49dfc0..4f6250f 100644
--- a/plugins/new_user_dialog/new_user_dialog.php
+++ b/plugins/new_user_dialog/new_user_dialog.php
@@ -31,8 +31,7 @@
   function create_identity($p)
   {
     // set session flag when a new user was created and the default identity seems to be incomplete
-    $rcmail = rcmail::get_instance();
-    if ($p['login'] && !$p['complete'] && (empty($p['record']['name']) || $p['record']['name'] == $rcmail->user->data['username']))
+    if ($p['login'] && !$p['complete'])
       $_SESSION['plugin.newuserdialog'] = true;
   }
 
@@ -42,7 +41,9 @@
    */
   function render_page($p)
   {
-    if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
+    if ($_SESSION['plugin.newuserdialog']) {
+      $this->add_texts('localization');
+      
       $rcmail = rcmail::get_instance();
       $identity = $rcmail->user->get_identity();
       $identities_level = intval($rcmail->config->get('identities_level', 0));
@@ -61,7 +62,8 @@
         html::tag('form', array(
             'action' => $rcmail->url('plugin.newusersave'),
             'method' => "post"),
-          html::tag('h3', null, 'Please complete your sender identity') .  // TODO: localize title
+          html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) .
+          html::p('hint', Q($this->gettext('identitydialoghint'))) .
           $table->show() .
           html::p(array('class' => "formbuttons"),
             html::tag('input', array('type' => "submit", 'class' => "button mainaction", 'value' => $this->gettext('save'))))

--
Gitblit v1.9.1