alecpl
2011-03-31 111a6fc31457e0efa8276e58aeb7632a64a32cbf
- Add info about indexcontacts.sh script in upgrade procedure


2 files modified
23 ■■■■ changed files
UPGRADING 14 ●●●● patch | view | raw | blame | history
program/steps/mail/autocomplete.inc 9 ●●●● patch | view | raw | blame | history
UPGRADING
@@ -3,12 +3,13 @@
Follow these instructions if upgrading from a previous version
of Roundcube Webmail. We recommend to carefully backup the existing
installation as well as the database before executig the following steps.
installation as well as the database before going through the following steps.
Using the update script
-----------------------
There is a shell script (for unix based systems) that does the job for you.
To use it, unpack the archive of the new Roundcube version to a temporary location (don't replace the Roundcube installation you want to update)
To use it, unpack the archive of the new Roundcube version to a temporary location
(don't replace the Roundcube installation you want to update)
and cd into that directory. From there, run the following command in a shell:
  ./bin/installto.sh <TARGET-FOLDER>
@@ -18,11 +19,12 @@
target location and check and update the configuration and database schema.
After all is done, the temporary folder with the new Roundcube files can be 
removed again.
See Post-Upgrade Activities section.
Updating manually
-----------------
If you don't have shell access to the Roundcube instalaltion or if not running
If you don't have shell access to the Roundcube installation or if not running
it on a unix system, you need to do the following operations by hand:
1. Replace index.php and all files in
@@ -39,6 +41,10 @@
3. Let the update script/installer check your configuration and
   update your config files and database schema as suggested by the updater.
4. Make sure 'enable_installer' is set to false again.
5. Check .htaccess settings (some php settings could become required)
5. See Post-Upgrade Activities section.
Post-Upgrade Activities
-----------------------
1. Check .htaccess settings (some php settings could become required)
2. If you're using build-in addressbook, run indexing script /bin/indexcontacts.sh.
program/steps/mail/autocomplete.inc
@@ -47,8 +47,15 @@
    if ($result = $abook->search(array('email','name'), $search, false, true, true, 'email')) {
      while ($sql_arr = $result->iterate()) {
        foreach ((array)$abook->get_col_values('email', $sql_arr, true) as $email) {
        // Contact can have more than one e-mail address
        $email_arr = (array)$abook->get_col_values('email', $sql_arr, true);
        $email_cnt = count($email_arr);
        foreach ($email_arr as $email) {
          $contact = format_email_recipient($email, $sql_arr['name']);
          // skip entries that don't match
          if ($email_cnt > 1 && strpos($contact, $search) === false) {
            continue;
          }
          // when we've got more than one book, we need to skip duplicates
          if ($books_num == 1 || !in_array($contact, $contacts)) {
            $contacts[] = $contact;