Changeset aade7b9 in github
- Timestamp:
- Aug 6, 2006 11:55:11 AM (7 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 90022ee
- Parents:
- 27a398c
- Files:
-
- 1 added
- 8 edited
-
INSTALL (modified) (2 diffs)
-
SQL/mysql.initial.sql (modified) (1 diff)
-
SQL/mysql5.initial.sql (added)
-
UPGRADING (modified) (1 diff)
-
index.php (modified) (5 diffs)
-
program/include/main.inc (modified) (1 diff)
-
program/js/app.js (modified) (3 diffs)
-
program/steps/mail/compose.inc (modified) (4 diffs)
-
program/steps/mail/upload.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
INSTALL
r25d8ba6 raade7b9 34 34 ============== 35 35 36 * MySQL 37 ------- 36 * MySQL 4.0.x 37 ------------- 38 38 Setting up the mysql database can be done by creating an empty database, 39 39 importing the table layout and granting the proper permissions to the … … 47 47 # mysql roundcubemail < SQL/mysql.initial.sql 48 48 49 50 * MySQL 4.1.x/5.x 51 ----------------- 49 52 For MySQL version 4.1 and up, it's recommended to create the database for 50 RoundCube with the following command: 53 RoundCube with utf-8 charset. Here's an example of the init procedure: 54 55 # mysql 51 56 > CREATE DATABASE 'roundcubemail' DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; 57 > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost 58 IDENTIFIED BY 'password'; 59 > quit 60 61 # mysql roundcubemail < SQL/mysql5.initial.sql 52 62 53 63 -
SQL/mysql.initial.sql
r535da27 raade7b9 1 1 -- RoundCube Webmail initial database structure 2 -- Version 0.1b 2 -- Version 0.1beta2 3 3 -- 4 4 -
UPGRADING
rb4b0817 raade7b9 117 117 - replace all files in folder /program/ 118 118 - replace all files in folder /skins/default/ 119 - add these line sto /config/db.inc.php119 - add these line to /config/db.inc.php 120 120 $rcmail_config['db_persistent'] = TRUE; 121 121 - add these lines to /config/main.inc.php -
index.php
rf0f98fb raade7b9 3 3 +-----------------------------------------------------------------------+ 4 4 | RoundCube Webmail IMAP Client | 5 | Version 0.1- 20060718|6 | | 7 | Copyright (C) 2005 , RoundCube Dev. - Switzerland|5 | Version 0.1-beta2 | 6 | | 7 | Copyright (C) 2005-2006, RoundCube Dev. - Switzerland | 8 8 | Licensed under the GNU GPL | 9 9 | | … … 41 41 */ 42 42 43 define('RCMAIL_VERSION', '0.1- 20060718');43 define('RCMAIL_VERSION', '0.1-beta2'); 44 44 45 45 // define global vars … … 96 96 97 97 // catch some url/post parameters 98 //$_auth = get_input_value('_auth', RCUBE_INPUT_GPC);99 98 $_task = get_input_value('_task', RCUBE_INPUT_GPC); 100 99 $_action = get_input_value('_action', RCUBE_INPUT_GPC); … … 291 290 include('program/steps/mail/rss.inc'); 292 291 293 // kill compose entry from session 294 // if (isset($_SESSION['compose'])) 295 // rcmail_compose_cleanup(); 296 292 297 293 // make sure the message count is refreshed 298 294 $IMAP->messagecount($_SESSION['mbox'], 'ALL', TRUE); … … 345 341 include('program/steps/settings/save_prefs.inc'); 346 342 347 if ($_action=='folders' || $_action=='subscribe' || $_action=='unsubscribe' || $_action=='create-folder' || $_action=='rename-folder' || $_action=='delete-folder') 343 if ($_action=='folders' || $_action=='subscribe' || $_action=='unsubscribe' || 344 $_action=='create-folder' || $_action=='rename-folder' || $_action=='delete-folder') 348 345 include('program/steps/settings/manage_folders.inc'); 349 346 -
program/include/main.inc
rfa4cd20 raade7b9 171 171 $now = mktime(); 172 172 $valid = ($_COOKIE['sessauth'] == rcmail_auth_hash(session_id(), $_SESSION['auth_time'])); 173 174 // renew auth cookie every 5 minutes 175 if (!$valid || ($ now-$_SESSION['auth_time'] > 300))173 174 // renew auth cookie every 5 minutes (only for GET requests) 175 if (!$valid || ($_SERVER['REQUEST_METHOD']!='POST' && $now-$_SESSION['auth_time'] > 300)) 176 176 { 177 177 $_SESSION['auth_time'] = $now; -
program/js/app.js
r9a52614 raade7b9 879 879 if (this.task=='mail' && this.env.mailbox==this.env.drafts_mailbox) 880 880 { 881 var uid = this.get_single_uid(); 882 url += '&_draft_uid='+uid+'&_mbox='+escape(this.env.mailbox); 881 var uid; 882 if (uid = this.get_single_uid()) 883 url += '&_draft_uid='+uid+'&_mbox='+escape(this.env.mailbox); 883 884 } 884 885 // modify url if we're in addressbook … … 2186 2187 return false; 2187 2188 2189 alert(content); 2190 2188 2191 var li = document.createElement('LI'); 2189 2192 li.id = name; … … 3599 3602 this.check_for_recent = function() 3600 3603 { 3604 if (this.busy) 3605 { 3606 this.send_keep_alive(); 3607 return; 3608 } 3609 3601 3610 this.set_busy(true, 'checkingmail'); 3602 3611 var d = new Date(); -
program/steps/mail/compose.inc
r41fa0b9 raade7b9 24 24 25 25 // remove an attachment 26 if ($_action=='remove-attachment' && !empty($_GET['_filename']))27 { 28 if (is_array($_SESSION['compose']['attachments']))29 foreach ($_SESSION['compose']['attachments'] as $i => $attachment)30 if ($attachment['name'] == $_GET['_filename'])31 {32 @unlink($attachment['path']);33 unset($_SESSION['compose']['attachments'][$i]);34 $commands = sprintf("parent.%s.remove_from_attachment_list('%s');\n", $JS_OBJECT_NAME, $_GET['_filename']);35 rcube_remote_response($commands);36 exit;37 }38 } 26 if ($_action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_GET['_file'], $regs)) 27 { 28 $id = $regs[1]; 29 if (is_array($_SESSION['compose']['attachments'][$id])) 30 { 31 @unlink($_SESSION['compose']['attachments'][$id]['path']); 32 $_SESSION['compose']['attachments'][$id] = NULL; 33 $commands = sprintf("parent.%s.remove_from_attachment_list('rcmfile%d');\n", $JS_OBJECT_NAME, $id); 34 rcube_remote_response($commands); 35 exit; 36 } 37 } 38 39 39 40 40 $MESSAGE_FORM = NULL; … … 481 481 if ($part->disposition=='attachment' || $part->disposition=='inline' || $part->headers['content-id'] || 482 482 (empty($part->disposition) && ($part->d_parameters['filename'] || $part->ctype_parameters['name']))) 483 {483 { 484 484 $tmp_path = tempnam($temp_dir, 'rcmAttmnt'); 485 485 if ($fp = fopen($tmp_path, 'w')) … … 622 622 { 623 623 if ($attrib['deleteicon']) 624 $button = sprintf('<img src="%s%s" alt="%s" border="0" / style="padding-right:2px;vertical-align:middle">',624 $button = sprintf('<img src="%s%s" alt="%s" border="0" style="padding-right:2px;vertical-align:middle" />', 625 625 $CONFIG['skin_path'], 626 626 $attrib['deleteicon'], … … 629 629 $button = rcube_label('delete'); 630 630 631 foreach ($_SESSION['compose']['attachments'] as $i => $a_prop)632 $out .= sprintf('<li id=" %s"><a href="#" onclick="%s.command(\'remove-attachment\',\'%s\')" title="%s">%s</a>%s</li>',633 $ a_prop['name'],631 foreach ($_SESSION['compose']['attachments'] as $id => $a_prop) 632 $out .= sprintf('<li id="rcmfile%d"><a href="#delete" onclick="return %s.command(\'remove-attachment\',\'rcmfile%d\', this)" title="%s">%s</a>%s</li>', 633 $id, 634 634 $JS_OBJECT_NAME, 635 $ a_prop['name'],635 $id, 636 636 rcube_label('delete'), 637 $button, $a_prop['name']); 637 $button, 638 rep_specialchars_output($a_prop['name'])); 638 639 } 639 640 -
program/steps/mail/upload.inc
r41fa0b9 raade7b9 42 42 if (move_uploaded_file($filepath, $tmpfname)) 43 43 { 44 $id = count($_SESSION['compose']['attachments']); 44 45 $_SESSION['compose']['attachments'][] = array('name' => $_FILES['_attachments']['name'][$i], 45 46 'mimetype' => $_FILES['_attachments']['type'][$i], 46 47 'path' => $tmpfname); 47 48 48 $button = sprintf('<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle">', $CONFIG['skin_path'], rcube_label('delete')); 49 $content = sprintf('<a href="#" onclick="%s.command(\\\'remove-attachment\\\',\\\'%s\\\')" title="%s">%s</a>%s',$JS_OBJECT_NAME, $_FILES['_attachments']['name'][$i], rcube_label('delete'), $button, $_FILES['_attachments']['name'][$i]); 50 $response .= sprintf('parent.%s.add2attachment_list(\'%s\',\'%s\');',$JS_OBJECT_NAME, $_FILES['_attachments']['name'][$i], $content); 49 if (is_file($CONFIG['skin_path'] . '/images/icons/remove-attachment.png')) 50 $button = sprintf('<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle" />', 51 $CONFIG['skin_path'], 52 rcube_label('delete')); 53 else 54 $button = rcube_label('delete'); 55 56 $content = sprintf('<a href="#delete" onclick="return %s.command(\\\'remove-attachment\\\', \\\'rcmfile%d\\\', this)" title="%s">%s</a>%s', 57 $JS_OBJECT_NAME, 58 $id, 59 rcube_label('delete'), 60 $button, 61 rep_specialchars_output($_FILES['_attachments']['name'][$i], 'js')); 62 63 $response .= sprintf('parent.%s.add2attachment_list(\'rcmfile%d\',\'%s\');', 64 $JS_OBJECT_NAME, 65 $id, 66 $content); 51 67 } 52 68 }
Note: See TracChangeset
for help on using the changeset viewer.
