Page MenuHomePhorge

No OneTemporary

Size
39 KB
Referenced Files
None
Subscribers
None
diff --git a/CHANGELOG b/CHANGELOG
index a9973fb34..9554b53fc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,359 +1,363 @@
CHANGELOG RoundCube Webmail
---------------------------
+2006/08/10 (tri)
+----------
+- Added a few fields to the contact table and made this fields avaiable (Ticket #1332930)
+
2006/08/10 (thomasb)
----------
- Fixed charset problems with folder renaming
2006/08/04 (thomasb)
----------
- Fixed Bug in saving identities (Ticket #1483915)
- Set folder name in window title (Bug #1483919)
- Don't add imap_root to INBOX path (Bug #1483816)
- Attempt to create default folders only after login
- Avoid usage of $CONFIG in rcube_imap class
2006/07/30 (thomasb)
----------
- Alter links in HTML messages (Bug #1326402)
- Added fallback if host not found in 'mail_domain' array
- Applied patch of Charles to highlight droptargets (Ticket #1473034)
- Fixed folder renaming (Bug #1483914)
- Added confirmation message after deleting a folder
2006/07/25 (thomasb)
----------
- Made folder renaming a bit more ajax-style
- Changed rename-labels and German translation
- Fixed addressbox countbar width (Bug #1483845)
- Fixed refresh interval problems in Safari (Bug #1483902)
- Fixed clear_message_list_header() errors (Bug #1483898)
- Sanity check of $message_set in imap.inc (Bug #1443200)
- Added correct changing of message list headers for Sent folder
- Updated Spanish localization (Ticket #1483887)
- Applied patch #1483846
2006/07/24 (richs)
----------
- Draft window no longer reloads. It saves to an iframe in the background instead (fixes bug #1483869)
- Draft timer now part of program/js/app.js instead of skins/default/templates/compose.inc
- Draft saving now properly returns an error when saving fails
- Draft timer stops and resets properly when attachments are uploaded, or when saving manually
- Old compose session/attachments are now cleaned up when a new/forward/reply/draft is made/opened
2006/07/19 (thomasb)
----------
- Correct entity encoding of link urls (HTML validity)
- Improved usability in compose step (Ticket #1483807)
- Added absolute URLs to several buttons (for "open in new window")
- Applied patch #1328032
- Fixed Bug/Patch #1443200
2006/07/18 (thomasb)
----------
- Fixed password with spaces issue (Bug #1364122)
- Replaced _auth hash with second cookie (Ticket #1483811)
- Don't use get_input_value() for passwords (Bug #1468895)
- Made password encryption key configurable
- Minor bugfixes with charset encoding
- Added <label> tags to forms (Ticket #1483810)
2006/07/07 (thomasb)
----------
- Fixed INSTALL_PATH bug #1425663
2006/07/03 (richs)
----------
- Fixed compatibility with in-body email addresses containing "+" (Bug #1483836)
- Updated French localizations (Ticket #1483862)
- Incoming messages can now be moved to Drafts, edited, saved, then moved back (Feature #1436191)
- Added Firefox workaround when clicking whitespace to drag messages (Bug #1483857)
- Corrected Dutch and Italian localizations (Ticket #1483851 and #1483848)
- Enabled 'Empty' (purge) command for Junk mailbox (defined in main.inc.php)
2006/06/30 (richs)
----------
- Fixed empty INBOX compatibility bug (Patch #1443200)
- Temporarily fixed French "compact" localization (Patch #1483862)
- Fixed "Select All" not working with Delete interface button (Bug #1332434)
- Fixed messsage list column compatibility with Konqueror (Bug #1395711)
- Fixed "unread count" in window title when count changed (Bug #1483812)
- Fixed DB error when deleting from message table (Patch #1483835)
2006/06/29 (richs)
----------
- Added ability to remove attachments (Feature #1436721)
- Default folders are now auto-created on first login (Feature #1471594)
- Fixed compatibility with folder apostrophes (e.g.: Joe's Folder) (Bug #1429458)
- Corrected Italian localizations
- Tweaked rename-folder form to clear after a rename
2006/06/26 (richs)
----------
- Added button to immediately check for new messages
- New message checking now displays status "Checking for new messages..."
- New message checking now looks for unread messages in all mailboxes (Feature #1326401)
- Task buttons now respond to clicks by darkening (as in other applications)
- Fixed "Sender" column changing to "Recipient" for "Sent" and "Drafts" message lists
- Added ability to sort messages by "Size"
- Added ability to rename folders (Feature #1326396)
- Added 'protect_default_folders' option to main.inc.php to prevent renames/deletes/unsubscribes of default folders
- Corrected 5 typos of "INSTLL" to "INSTALL" in program/include/main.inc
2006/06/25
----------
- Changed behavior to include host-specific configuration (Bug #1483849)
- Assume ISO-8859-1 encoding of mail messages by default (Patch #1483839)
- Fixed spell checker to work with the new URL at google.com
- Some memory and security optimizations sendmail.inc
- Updated UGRADING description
2006/06/19
----------
- Added Drafts support (Feature #1326839) (richs)
2006/06/02
----------
- Updated Estonian localization and moved from ee to et
- Added Bulgarian localization
2006/05/25
----------
- Finalized GoogieSpell integration
2006/05/18
----------
- Added Arabic and Armenian localizations
- Updated Russian localization
- Removed MDB2 classes from repository. Install them seperately if used.
- Updated MDB2 wrapper class contributed by Lukas Kahwe Smith
- Allow & in e-mail addresses
2006/05/05
----------
- Fixed typos in function rcube_button() (Bugs #1473198 and #1473201)
- Check for zlib.output_compression before using ob_gzhandler (Bug #1471069)
- Casting date parts in iil_StrToTime() to avoid warnings (Bug #1482140)
- Corrected INSTALL description (Bug #1476106)
- Added charset to javascript HTTP headers
- Fixed Opera bug with CC and BCC fields (Bug #1474576)
- Changed login page title regarding product name (Bug #1476413)
- Pimped search function
- Applied attachment viewing/forwarding patches by Andrew Fladmark
- Applied prev/next patch by Leonard Bouchet
- Applied patches by Mark Bucciarelli
- Applied patch for requesting receipts by Salvatore Ansani
- Integrated GoogieSpell as suggested by phil (styling is not perfect yet, localization is missing)
2006/04/13
----------
- Added Slovenian localization
- Updated Portuguese localization
- Fixed parent.location problem for compose-links
- Added sort order saving patch by Jacob Brunson
- Added gzip compression support
2006/04/02
----------
- Added Lithuanian localization
- Improved search function
- Added version string as template object
- Load host-specific configuration file (see config/main.inc.php)
- New config parameter adding domain to user names for login
- Strip tags on _auth, _action, _task parameters
- Corrected labels for next/previous page buttons in address book
2006/03/23
----------
- Auto-detect mail header delimiters
- Regard daylight savings
- Localized quota display
- Started implementing search function
2006/03/20
----------
- Avoid error message when saving an unchanged identity (Bug #1429510)
- Fixed hard-coded cols selection for sent folder (Bug #1354586)
- Enable some HTML links for use with "open in new window" or "save target"
- Check meta-key instead of ctrl on Macs
- Ignore double clicks when holding down a modifier key
- Fixed reloading of the login page
- Fixed typo in compose template (Bug #1446852)
- Added compose button to message read step (Request #1433288)
- New config parameter for persistent database connections (Bug #1431817)
2006/03/14
----------
- Don't remove internal HTML tags in plaintext messages
- Improved error handling in DB connection failure
2006/02/22
----------
- Updated localizations
- Fixed bug #1435989
2006/02/19
----------
- Updated localizations
- Applied patch of Anders Karlsson
- Applied patch of Jacob Brunson
- Applied patch for virtuser_query by Robin Elfrink
- Added support for References header (patch by Auke)
- Added support for mbstring module by Tadashi Jokagi
- Added function for automatic remove of slashes on GET and POST vars
if magic_quotes is enabled
2006/02/05
----------
- Added Slovak, Hungarian, Bosnian and Croation translation
- Fixed bug when inserting signatures with !?&
- Chopping message headers before inserting into the message cache table
(to avoid bugs in Postgres)
- Allow one-char domains in e-mail addresses
- Make product name in page title configurable
- Make username available as skin object
- Added session_write_close() in rcube_db class destructor to avoid problems
in PHP 5.0.5
- Use move_uploaded_file() instead of copy() for a more secure handling of
uploaded attachments
- Additional config parameter to show/hide deleted messages
- Added periodic request for checking new mails (Request #1307821)
- Added EXPUNGE command
- Optimized loading time for mail interface
- Changed to full UTF-8 support
- Additional timezones (Patch #1389912)
- Added LDAP public search (experimental)
- Applied patch for correct ctrl/shift behavior for message selection (Bug #1326364)
- Casting to strings when adding empty headers to message cache (Bug #1406026)
- Skip sender-address as recipient when Reply-to-all
- Fixes in utf8-class
- Added patch for Quota display by Aury Fink Filho <nuny@aury.com.br>
- Added garbage collector for message cache
- Added patches for BCC headers
2005/12/16
----------
- Added Turkish and Simplified Chinese translation
- Use virtusertable to resolve e-mail addresses at login
- Configurable mail_domain used to compose correct e-mail addresses
on first login
2005/12/03
----------
- Added Finnish, Romanian, Polish, Czech, British, Norwegian, Greek, Russian,
Estonian and Chinese translation
- Get IMAP server capabilities in array
- Check for NAMESPACE capability before sending command
- Set default user language from config 'locale_string'
- Added sorting patch for message list
- Make default sort col/order configurable
- Fixed XSS in address book and identities
- Added more XSS protection (Bug #1308236)
- Added tab indexes for compose form
- Added 'changed' col to contacts table
- Support for 160-bit session hashes
- Added input check for contacts and identities (Patch #1346523)
- Added messages/warning to compose step (Patch #1323895)
- Added favicon to the default skin
- Fixed Bug #1334337 as far as possible
- Added Reply-To-All functionality (Request #1326395, Patch #1349777)
- Redesign of client side AJAX code (enable multi threading)
- Added keep-alive signal every minute
- Make logs dir configurable
- Added support for SMTPS
- Decode attachment file names
- Make delimiter for message headers configurable
- Add generic footer to sent messages
- Choose the rigt identity when replying
- Remove signature when replying (Request #1333167)
- Signatures for each identity
- Select charset when composing message
- Complete re-design of the caching mechanism
2005/08/11
----------
- Write list header to client even if list is empty
- Add functions "select all", "select none" to message list
- Improved filter for HTML messages to remove potentially malicious tags
(script, iframe, object) and event handlers.
- Buttons for next/previous message in view mode
- Add new created contact to list and show confirmation status
- Added folder management (subscribe/create/delete)
- Log message sending (SMTP log)
- Grant access for Camino browser
- Added German translation
2005/10/20
----------
- Added Swedish, Latvian, Portuguese and Catalan translation
- Make SMTP auth method configurable
- Make mailboxlist scrollable (Bug #1326372)
- Fixed SSL support
- Improved support for Courier IMAP (root folder and delimiter issues)
- Moved taskbar from bottom to top
- Added 'session_lifetime' parameter
- Fixed wrong unread count when deleting message (Bug #1332434)
- Srip tags when creating a new folder (Bug #1332084)
- Translate HTML tags in message headers (Bug #1330134)
- Correction in German translation (Bug #1329434)
- Display folder names with special chars correctly (Bug #1330157)
2005/10/07
----------
- Added French, Italian, Spanish, Danish, Dutch translation
- Clarified license (Bug #1305966)
- Fixed PHP warnings (Bug #1299403)
- Fixed english translation (Bug #1295406)
- Fixed bug #1290833: Last character of email not seen
- Fixed bug #1292199 when creating new user
- Allow more browsers (Bug #1285101)
- Added setting for showing pretty dates
- Added support for SQLite database
- Make use of message caching configurable
- Also add attachments when forwarding a message
- Long folder names will not flow over message list (Bug #1267232)
- Show nested mailboxes hieracically
- Enable IMAPS by host
2005/08/20
----------
- Improved cacheing of mailbox messagecount
- Fixed javascript bug when creating a new message folder
- Fixed javascript bugs #1260990 and #1260992: folder selection
- Make Trash folder configurable
- Auto create folders Inbox, Sent and Trash (if configured)
- Support for IMAP root folder
- Added support fot text/enriched messages
- Make list of special mailboxes configurable
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 7546e52da..9a1536078 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -1,127 +1,169 @@
-- RoundCube Webmail initial database structure
-- Version 0.1beta2
--
-- --------------------------------------------------------
--
-- Table structure for table `cache`
--
CREATE TABLE `cache` (
`cache_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`session_id` varchar(40) default NULL,
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`data` longtext NOT NULL,
PRIMARY KEY (`cache_id`),
KEY `user_id` (`user_id`),
KEY `cache_key` (`cache_key`),
KEY `session_id` (`session_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`contact_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`changed` datetime NOT NULL default '0000-00-00 00:00:00',
`del` tinyint(1) NOT NULL default '0',
`name` varchar(128) NOT NULL default '',
`email` varchar(128) NOT NULL default '',
- `firstname` varchar(128) NOT NULL default '',
- `surname` varchar(128) NOT NULL default '',
+ `first_name` varchar(128) NOT NULL default '',
+ `middle_name` varchar(128) NOT NULL default '',
+ `last_name` varchar(128) NOT NULL default '',
+ `edu_title` varchar(128) NOT NULL default '',
+ `addon` varchar(128) NOT NULL default '',
+ `nickname` varchar(128) NOT NULL default '',
+ `company` varchar(128) NOT NULL default '',
+ `organisation` varchar(128) NOT NULL default '',
+ `department` varchar(128) NOT NULL default '',
+ `job_title` varchar(128) NOT NULL default '',
+ `note` varchar(128) NOT NULL default '',
+ `tel_work1_voice` varchar(128) NOT NULL default '',
+ `tel_work2_voice` varchar(128) NOT NULL default '',
+ `tel_home1_voice` varchar(128) NOT NULL default '',
+ `tel_home2_voice` varchar(128) NOT NULL default '',
+ `tel_cell_voice` varchar(128) NOT NULL default '',
+ `tel_car_voice` varchar(128) NOT NULL default '',
+ `tel_pager_voice` varchar(128) NOT NULL default '',
+ `tel_additional` varchar(128) NOT NULL default '',
+ `tel_work_fax` varchar(128) NOT NULL default '',
+ `tel_home_fax` varchar(128) NOT NULL default '',
+ `tel_isdn` varchar(128) NOT NULL default '',
+ `tel_preferred` varchar(128) NOT NULL default '',
+ `tel_telex` varchar(128) NOT NULL default '',
+ `work_street` varchar(128) NOT NULL default '',
+ `work_zip` varchar(128) NOT NULL default '',
+ `work_city` varchar(128) NOT NULL default '',
+ `work_region` varchar(128) NOT NULL default '',
+ `work_country` varchar(128) NOT NULL default '',
+ `home_street` varchar(128) NOT NULL default '',
+ `home_zip` varchar(128) NOT NULL default '',
+ `home_city` varchar(128) NOT NULL default '',
+ `home_region` varchar(128) NOT NULL default '',
+ `home_country` varchar(128) NOT NULL default '',
+ `postal_street` varchar(128) NOT NULL default '',
+ `postal_zip` varchar(128) NOT NULL default '',
+ `postal_city` varchar(128) NOT NULL default '',
+ `postal_region` varchar(128) NOT NULL default '',
+ `postal_country` varchar(128) NOT NULL default '',
+ `url_work` varchar(128) NOT NULL default '',
+ `role` varchar(128) NOT NULL default '',
+ `birthday` varchar(128) NOT NULL default '',
+ `rev` varchar(128) NOT NULL default '',
+ `lang` varchar(128) NOT NULL default '',
`vcard` text NOT NULL,
PRIMARY KEY (`contact_id`),
KEY `user_id` (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `identities`
--
CREATE TABLE `identities` (
`identity_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`standard` tinyint(1) NOT NULL default '0',
`name` varchar(128) NOT NULL default '',
`organization` varchar(128) NOT NULL default '',
`email` varchar(128) NOT NULL default '',
`reply-to` varchar(128) NOT NULL default '',
`bcc` varchar(128) NOT NULL default '',
`signature` text NOT NULL,
PRIMARY KEY (`identity_id`),
KEY `user_id` (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `session`
--
CREATE TABLE `session` (
`sess_id` varchar(40) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`changed` datetime NOT NULL default '0000-00-00 00:00:00',
`ip` VARCHAR(15) NOT NULL default '',
`vars` text NOT NULL,
PRIMARY KEY (`sess_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(128) NOT NULL default '',
`mail_host` varchar(128) NOT NULL default '',
`alias` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`last_login` datetime NOT NULL default '0000-00-00 00:00:00',
`language` varchar(5) NOT NULL default 'en',
`preferences` text NOT NULL default '',
PRIMARY KEY (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`message_id` int(11) unsigned NOT NULL auto_increment,
`user_id` int(11) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`idx` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`to` varchar(255) NOT NULL default '',
`cc` varchar(255) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`size` int(11) unsigned NOT NULL default '0',
`headers` text NOT NULL,
`body` longtext,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`),
KEY `cache_key` (`cache_key`),
KEY `idx` (`idx`),
KEY `uid` (`uid`)
);
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 7fa296b0b..80deb84d2 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -1,57 +1,106 @@
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-20051007
+ ALTER TABLE `contacts` ADD `name` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `email` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `first_name` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `middle_name` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `last_name` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `edu_title` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `addon` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `nickname` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `company` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `organisation` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `department` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `job_title` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `note` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_work1_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_work2_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_home1_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_home2_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_cell_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_car_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_pager_voice` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_additional` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_work_fax` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_home_fax` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_isdn` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_preferred` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `tel_telex` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `work_street` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `work_zip` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `work_city` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `work_region` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `work_country` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `home_street` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `home_zip` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `home_city` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `home_region` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `home_country` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `postal_street` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `postal_zip` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `postal_city` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `postal_region` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `postal_country` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `url_work` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `role` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `birthday` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `rev` varchar(128) NOT NULL default '';
+ ALTER TABLE `contacts` ADD `lang` varchar(128) NOT NULL default '';
+
+-- RoundCube Webmail update script for MySQL databases
+-- Updates from version 0.1-20051007
ALTER TABLE `session` ADD `ip` VARCHAR(15) NOT NULL AFTER changed;
ALTER TABLE `users` ADD `alias` VARCHAR(128) NOT NULL AFTER mail_host;
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-20051021
ALTER TABLE `session` CHANGE `sess_id` `sess_id` VARCHAR(40) NOT NULL;
ALTER TABLE `contacts` CHANGE `del` `del` TINYINT(1) NOT NULL;
ALTER TABLE `contacts` ADD `changed` DATETIME NOT NULL AFTER `user_id`;
UPDATE `contacts` SET `del`=0 WHERE `del`=1;
UPDATE `contacts` SET `del`=1 WHERE `del`=2;
ALTER TABLE `identities` CHANGE `default` `standard` TINYINT(1) NOT NULL;
ALTER TABLE `identities` CHANGE `del` `del` TINYINT(1) NOT NULL;
UPDATE `identities` SET `del`=0 WHERE `del`=1;
UPDATE `identities` SET `del`=1 WHERE `del`=2;
UPDATE `identities` SET `standard`=0 WHERE `standard`=1;
UPDATE `identities` SET `standard`=1 WHERE `standard`=2;
CREATE TABLE `messages` (
`message_id` int(11) unsigned NOT NULL auto_increment,
`user_id` int(11) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`idx` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`to` varchar(255) NOT NULL default '',
`cc` varchar(255) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`size` int(11) unsigned NOT NULL default '0',
`headers` text NOT NULL,
`body` longtext,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`),
KEY `cache_key` (`cache_key`),
KEY `idx` (`idx`),
KEY `uid` (`uid`)
) TYPE=MyISAM;
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-20051216
ALTER TABLE `messages` ADD `created` DATETIME NOT NULL AFTER `cache_key` ;
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index a129d0094..5a3bd78ca 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -1,126 +1,127 @@
<?php
/*
+-----------------------------------------------------------------------+
| program/steps/addressbook/edit.inc |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Show edit form for a contact entry or to add a new one |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Author: Tobias 'tri' Richter <tobias@datenwerkstatt-richter.de |
+-----------------------------------------------------------------------+
$Id$
*/
if (($_GET['_cid'] || $_POST['_cid']) && $_action=='edit')
{
$cid = $_POST['_cid'] ? $_POST['_cid'] : $_GET['_cid'];
$DB->query("SELECT * FROM ".get_table_name('contacts')."
WHERE contact_id=?
AND user_id=?
AND del<>1",
$cid,
$_SESSION['user_id']);
$CONTACT_RECORD = $DB->fetch_assoc();
if (is_array($CONTACT_RECORD))
$OUTPUT->add_script(sprintf("%s.set_env('cid', '%s');", $JS_OBJECT_NAME, $CONTACT_RECORD['contact_id']));
}
function rcmail_contact_editform($attrib)
{
global $CONTACT_RECORD, $JS_OBJECT_NAME;
if (!$CONTACT_RECORD && $GLOBALS['_action']!='add')
return rcube_label('contactnotfound');
// add some labels to client
rcube_add_label('noemailwarning');
rcube_add_label('nonamewarning');
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
// a specific part is requested
if ($attrib['part'])
{
$out = $form_start;
$out .= rcmail_get_edit_field($attrib['part'], $CONTACT_RECORD[$attrib['part']], $attrib);
return $out;
}
// return the complete address edit form as table
$out = "$form_start<table>\n\n";
- $a_show_cols = array('name', 'firstname', 'surname', 'email');
+ $a_show_cols = array('name', 'email', 'first_name', 'middle_name', 'last_name', 'edu_title', 'addon', 'nickname', 'company', 'organisation', 'department', 'job_title', 'note', 'tel_work1_voice', 'tel_work2_voice', 'tel_home1_voice', 'tel_home2_voice', 'tel_cell_voice', 'tel_car_voice', 'tel_pager_voice', 'tel_additional', 'tel_work_fax', 'tel_home_fax', 'tel_isdn', 'tel_preferred', 'tel_telex', 'work_street', 'work_zip', 'work_city', 'work_region', 'work_country', 'home_street', 'home_zip', 'home_city', 'home_region', 'home_country', 'postal_street', 'postal_zip', 'postal_city', 'postal_region', 'postal_country', 'url_work', 'role', 'birthday', 'rev', 'lang');
foreach ($a_show_cols as $col)
{
$attrib['id'] = 'rcmfd_'.$col;
$title = rcube_label($col);
$value = rcmail_get_edit_field($col, $CONTACT_RECORD[$col], $attrib);
$out .= sprintf("<tr><td class=\"title\"><label for=\"%s\">%s</label></td><td>%s</td></tr>\n",
$attrib['id'],
$title,
$value);
}
$out .= "\n</table>$form_end";
return $out;
}
// similar function as in /steps/settings/edit_identity.inc
function get_form_tags($attrib)
{
global $CONTACT_RECORD, $OUTPUT, $JS_OBJECT_NAME, $EDIT_FORM, $SESS_HIDDEN_FIELD;
$form_start = '';
if (!strlen($EDIT_FORM))
{
$hiddenfields = new hiddenfield(array('name' => '_task', 'value' => $GLOBALS['_task']));
$hiddenfields->add(array('name' => '_action', 'value' => 'save'));
if ($_GET['_framed'] || $_POST['_framed'])
$hiddenfields->add(array('name' => '_framed', 'value' => 1));
if ($CONTACT_RECORD['contact_id'])
$hiddenfields->add(array('name' => '_cid', 'value' => $CONTACT_RECORD['contact_id']));
$form_start = !strlen($attrib['form']) ? '<form name="form" action="./" method="post">' : '';
$form_start .= "\n$SESS_HIDDEN_FIELD\n";
$form_start .= $hiddenfields->show();
}
$form_end = (strlen($EDIT_FORM) && !strlen($attrib['form'])) ? '</form>' : '';
$form_name = strlen($attrib['form']) ? $attrib['form'] : 'form';
if (!strlen($EDIT_FORM))
$OUTPUT->add_script("$JS_OBJECT_NAME.gui_object('editform', '$form_name');");
$EDIT_FORM = $form_name;
return array($form_start, $form_end);
}
if (!$CONTACT_RECORD && template_exists('addcontact'))
parse_template('addcontact');
// this will be executed if no template for addcontact exists
parse_template('editcontact');
-?>
\ No newline at end of file
+?>
diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 5135e4b04..6ba867504 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -1,260 +1,261 @@
<?php
/*
+-----------------------------------------------------------------------+
| program/steps/addressbook/save.inc |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Save a contact entry or to add a new one |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+ | Author: Tobias 'tri' Richter <tobias@datenwerkstatt-richter.de> |
+-----------------------------------------------------------------------+
$Id$
*/
// check input
if ((empty($_POST['_name']) || empty($_POST['_email'])) && empty($_GET['_framed']))
{
show_message('formincomplete', 'warning');
rcmail_overwrite_action(empty($_POST['_cid']) ? 'add' : 'show');
return;
}
// setup some vars we need
-$a_save_cols = array('name', 'firstname', 'surname', 'email');
+$a_save_cols = array('name', 'email', 'first_name', 'middle_name', 'last_name', 'edu_title', 'addon', 'nickname', 'company', 'organisation', 'department', 'job_title', 'note', 'tel_work1_voice', 'tel_work2_voice', 'tel_home1_voice', 'tel_home2_voice', 'tel_cell_voice', 'tel_car_voice', 'tel_pager_voice', 'tel_additional', 'tel_work_fax', 'tel_home_fax', 'tel_isdn', 'tel_preferred', 'tel_telex', 'work_street', 'work_zip', 'work_city', 'work_region', 'work_country', 'home_street', 'home_zip', 'home_city', 'home_region', 'home_country', 'postal_street', 'postal_zip', 'postal_city', 'postal_region', 'postal_country', 'url_work', 'role', 'birthday', 'rev', 'lang');
$contacts_table = get_table_name('contacts');
// update an existing contact
if (!empty($_POST['_cid']))
{
$a_write_sql = array();
foreach ($a_save_cols as $col)
{
$fname = '_'.$col;
if (!isset($_POST[$fname]))
continue;
$a_write_sql[] = sprintf("%s=%s",
$DB->quoteIdentifier($col),
$DB->quote(get_input_value($fname, RCUBE_INPUT_POST)));
}
if (sizeof($a_write_sql))
{
$DB->query("UPDATE $contacts_table
SET changed=now(), ".join(', ', $a_write_sql)."
WHERE contact_id=?
AND user_id=?
AND del<>1",
$_POST['_cid'],
$_SESSION['user_id']);
$updated = $DB->affected_rows();
}
if ($updated)
{
$_action = 'show';
show_message('successfullysaved', 'confirmation');
if ($_framed)
{
// define list of cols to be displayed
$a_show_cols = array('name', 'email');
$a_js_cols = array();
$sql_result = $DB->query("SELECT * FROM $contacts_table
WHERE contact_id=?
AND user_id=?
AND del<>1",
$_POST['_cid'],
$_SESSION['user_id']);
$sql_arr = $DB->fetch_assoc($sql_result);
foreach ($a_show_cols as $col)
$a_js_cols[] = (string)$sql_arr[$col];
// update the changed col in list
$OUTPUT->add_script(sprintf("if(parent.%s)parent.%s.update_contact_row('%d', %s);",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
$_POST['_cid'],
array2js($a_js_cols)));
// show confirmation
show_message('successfullysaved', 'confirmation');
}
}
else
{
// show error message
show_message('errorsaving', 'error');
rcmail_overwrite_action('show');
}
}
// insert a new contact
else
{
$a_insert_cols = $a_insert_values = array();
// check for existing contacts
$sql = "SELECT 1 FROM $contacts_table
WHERE user_id = {$_SESSION['user_id']}
AND del <> '1' ";
// get email and name, build sql for existing user check
if (isset($_GET['_emails']) && isset($_GET['_names']))
{
$sql .= "AND email IN (";
$emails = explode(',', get_input_value('_emails', RCUBE_INPUT_GET));
$names = explode(',', get_input_value('_names', RCUBE_INPUT_GET));
$count = count($emails);
$n = 0;
foreach ($emails as $email)
{
$end = (++$n == $count) ? '' : ',';
$sql .= $DB->quote($email) . $end;
}
$sql .= ")";
$ldap_form = true;
}
else if (isset($_POST['_email']))
$sql .= "AND email = " . $DB->quote(get_input_value('_email', RCUBE_INPUT_POST));
$sql_result = $DB->query($sql);
// show warning message
if ($DB->num_rows($sql_result))
{
show_message('contactexists', 'warning');
if ($ldap_form)
rcmail_overwrite_action('ldappublicsearch');
else
rcmail_overwrite_action('add');
return;
}
if ($ldap_form)
{
$n = 0;
foreach ($emails as $email)
{
$DB->query("INSERT INTO $contacts_table
(user_id, name, email
VALUES ({$_SESSION['user_id']}," . $DB->quote($names[$n++]) . "," .
$DB->quote($email) . ")");
$insert_id[] = $DB->insert_id();
}
}
else
{
foreach ($a_save_cols as $col)
{
$fname = '_'.$col;
if (!isset($_POST[$fname]))
continue;
$a_insert_cols[] = $col;
$a_insert_values[] = $DB->quote(get_input_value($fname, RCUBE_INPUT_POST));
}
if (sizeof($a_insert_cols))
{
$DB->query("INSERT INTO $contacts_table
(user_id, changed, del, ".join(', ', $a_insert_cols).")
VALUES (?, now(), 0, ".join(', ', $a_insert_values).")",
$_SESSION['user_id']);
$insert_id = $DB->insert_id(get_sequence_name('contacts'));
}
}
if ($insert_id)
{
if (!$ldap_form)
{
$_action = 'show';
$_GET['_cid'] = $insert_id;
if ($_framed)
{
// add contact row or jump to the page where it should appear
$commands = sprintf("if(parent.%s)parent.", $JS_OBJECT_NAME);
$sql_result = $DB->query("SELECT * FROM $contacts_table
WHERE contact_id=?
AND user_id=?",
$insert_id,
$_SESSION['user_id']);
$commands .= rcmail_js_contacts_list($sql_result, $JS_OBJECT_NAME);
$commands .= sprintf("if(parent.%s)parent.%s.select('%d');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
$insert_id);
// update record count display
$commands .= sprintf("if(parent.%s)parent.%s.set_rowcount('%s');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
rcmail_get_rowcount_text());
$OUTPUT->add_script($commands);
}
// show confirmation
show_message('successfullysaved', 'confirmation');
}
else
{
// add contact row or jump to the page where it should appear
$commands = '';
foreach ($insert_id as $id)
{
$sql_result = $DB->query("SELECT * FROM $contacts_table
WHERE contact_id = $id
AND user_id = {$_SESSION['user_id']}");
$commands .= sprintf("if(parent.%s)parent.", $JS_OBJECT_NAME);
$commands .= rcmail_js_contacts_list($sql_result, $JS_OBJECT_NAME);
$last_id = $id;
}
// display the last insert id
$commands .= sprintf("if(parent.%s)parent.%s.select('%d');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
$last_id);
// update record count display
$commands .= sprintf("if(parent.%s)parent.%s.set_rowcount('%s');\n",
$JS_OBJECT_NAME,
$JS_OBJECT_NAME,
rcmail_get_rowcount_text());
$OUTPUT->add_script($commands);
rcmail_overwrite_action('ldappublicsearch');
}
// show confirmation
show_message('successfullysaved', 'confirmation');
}
else
{
// show error message
show_message('errorsaving', 'error');
rcmail_overwrite_action('add');
}
}
?>

File Metadata

Mime Type
text/x-diff
Expires
Mon, Aug 17, 2:22 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1256974
Default Alt Text
(39 KB)

Event Timeline