[Svn] r4841 - in trunk/roundcubemail/program: js steps/addressbook

trac at roundcube.net trac at roundcube.net
Sun Jun 5 09:42:46 CEST 2011


Author: alec
Date: 2011-06-05 02:42:45 -0500 (Sun, 05 Jun 2011)
New Revision: 4841

Modified:
   trunk/roundcubemail/program/js/app.js
   trunk/roundcubemail/program/steps/addressbook/func.inc
   trunk/roundcubemail/program/steps/addressbook/search.inc
Log:
- Fix contacts import (#1487947)


Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2011-06-03 22:37:47 UTC (rev 4840)
+++ trunk/roundcubemail/program/js/app.js	2011-06-05 07:42:45 UTC (rev 4841)
@@ -304,15 +304,12 @@
           if (this.gui_objects.qsearchbox) {
             $(this.gui_objects.qsearchbox).focusin(function() { rcmail.contact_list.blur(); });
           }
-        }
 
-        this.set_page_buttons();
-
-        if (this.env.address_sources && this.env.address_sources[this.env.source] && !this.env.address_sources[this.env.source].readonly) {
-          this.enable_command('add', 'import', true);
           this.enable_command('group-create', this.env.address_sources[this.env.source].groups);
         }
 
+        this.set_page_buttons();
+
         if (this.env.cid) {
           this.enable_command('show', 'edit', true);
           // register handlers for group assignment via checkboxes
@@ -339,6 +336,7 @@
         if (this.contact_list && this.contact_list.rowcount > 0)
           this.enable_command('export', true);
 
+        this.enable_command('add', 'import', !this.env.readonly);
         this.enable_command('list', 'listgroup', 'advanced-search', true);
         break;
 

Modified: trunk/roundcubemail/program/steps/addressbook/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-03 22:37:47 UTC (rev 4840)
+++ trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-05 07:42:45 UTC (rev 4841)
@@ -50,14 +50,10 @@
 
 if (!empty($_REQUEST['_gid']))
     $CONTACTS->set_group(get_input_value('_gid', RCUBE_INPUT_GPC));
-/*
-// set message set for search result
-if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']]))
-    $CONTACTS->set_search_set($_SESSION['search'][$_REQUEST['_search']]);
-*/
+
 // set data source env
 $OUTPUT->set_env('source', $source ? $source : '0');
-$OUTPUT->set_env('readonly', $CONTACTS->readonly, false);
+$OUTPUT->set_env('readonly', $CONTACTS->readonly);
 if (!$OUTPUT->ajax_call) {
     $search_mods = $RCMAIL->config->get('addressbook_search_mods', $SEARCH_MODS_DEFAULT);
     $OUTPUT->set_env('search_mods', $search_mods);

Modified: trunk/roundcubemail/program/steps/addressbook/search.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/search.inc	2011-06-03 22:37:47 UTC (rev 4840)
+++ trunk/roundcubemail/program/steps/addressbook/search.inc	2011-06-05 07:42:45 UTC (rev 4841)
@@ -72,7 +72,8 @@
     }
 
     // search request ID
-    $search_request = md5('addr'.implode($fields, ',')
+    $search_request = md5('addr'
+        .(is_array($fields) ? implode($fields, ',') : $fields)
         .(is_array($search) ? implode($search, ',') : $search));
 
     // reset page

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list