Changeset 573 in subversion
- Timestamp:
- May 18, 2007 7:29:25 AM (6 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 11 edited
-
CHANGELOG (modified) (1 diff)
-
index.php (modified) (3 diffs)
-
program/js/app.js (modified) (15 diffs)
-
program/steps/addressbook/delete.inc (modified) (1 diff)
-
program/steps/mail/compose.inc (modified) (1 diff)
-
program/steps/mail/folders.inc (modified) (2 diffs)
-
program/steps/mail/func.inc (modified) (1 diff)
-
program/steps/mail/list.inc (modified) (1 diff)
-
program/steps/mail/mark.inc (modified) (1 diff)
-
program/steps/mail/move_del.inc (modified) (3 diffs)
-
program/steps/settings/manage_folders.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r571 r573 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2007/05/18 (thomasb) 5 ---------- 6 - Use HTTP-POST requests for actions that change state 7 3 8 4 9 2007/05/17 (thomasb) -
trunk/roundcubemail/index.php
r571 r573 3 3 +-----------------------------------------------------------------------+ 4 4 | RoundCube Webmail IMAP Client | 5 | Version 0.1-2007051 7|5 | Version 0.1-20070518 | 6 6 | | 7 7 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | … … 286 286 include('program/steps/mail/getunread.inc'); 287 287 288 if ($_action=='list' && isset($_ GET['_remote']))288 if ($_action=='list' && isset($_REQUEST['_remote'])) 289 289 include('program/steps/mail/list.inc'); 290 290 … … 324 324 include('program/steps/addressbook/show.inc'); 325 325 326 if ($_action=='list' && $_ GET['_remote'])326 if ($_action=='list' && $_REQUEST['_remote']) 327 327 include('program/steps/addressbook/list.inc'); 328 328 -
trunk/roundcubemail/program/js/app.js
r568 r573 1305 1305 // send request to server 1306 1306 var url = '_mbox='+urlencode(mbox); 1307 this.http_ request('expunge', url+add_url, lock);1307 this.http_post('expunge', url+add_url, lock); 1308 1308 }; 1309 1309 … … 1327 1327 // send request to server 1328 1328 var url = '_mbox='+urlencode(mbox); 1329 this.http_ request('purge', url+add_url, lock);1329 this.http_post('purge', url+add_url, lock); 1330 1330 return true; 1331 1331 }; … … 1433 1433 1434 1434 // send request to server 1435 this.http_ request(action, '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock);1435 this.http_post(action, '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock); 1436 1436 }; 1437 1437 … … 1512 1512 } 1513 1513 1514 this.http_ request('mark', '_uid='+a_uids.join(',')+'&_flag='+flag);1514 this.http_post('mark', '_uid='+a_uids.join(',')+'&_flag='+flag); 1515 1515 }; 1516 1516 … … 1589 1589 } 1590 1590 1591 this.http_ request('mark', '_uid='+a_uids.join(',')+'&_flag=undelete');1591 this.http_post('mark', '_uid='+a_uids.join(',')+'&_flag=undelete'); 1592 1592 return true; 1593 1593 }; … … 1616 1616 } 1617 1617 1618 this.http_ request('mark', '_uid='+a_uids.join(',')+'&_flag=delete');1618 this.http_post('mark', '_uid='+a_uids.join(',')+'&_flag=delete'); 1619 1619 return true; 1620 1620 }; … … 1927 1927 { 1928 1928 if (name) 1929 this.http_ request('remove-attachment', '_file='+urlencode(name));1929 this.http_post('remove-attachment', '_file='+urlencode(name)); 1930 1930 1931 1931 return true; … … 2357 2357 2358 2358 // send request to server 2359 this.http_ request('delete', '_cid='+urlencode(a_cids.join(','))+'&_from='+(this.env.action ? this.env.action : ''));2359 this.http_post('delete', '_cid='+urlencode(a_cids.join(','))+'&_from='+(this.env.action ? this.env.action : '')); 2360 2360 return true; 2361 2361 }; … … 2441 2441 2442 2442 if (name) 2443 this.http_ request('create-folder', '_name='+urlencode(name), true);2443 this.http_post('create-folder', '_name='+urlencode(name), true); 2444 2444 else if (form.elements['_folder_name']) 2445 2445 form.elements['_folder_name'].focus(); … … 2464 2464 2465 2465 if (oldname && newname) 2466 this.http_ request('rename-folder', '_folder_oldname='+urlencode(oldname)+'&_folder_newname='+urlencode(newname));2466 this.http_post('rename-folder', '_folder_oldname='+urlencode(oldname)+'&_folder_newname='+urlencode(newname)); 2467 2467 }; 2468 2468 … … 2521 2521 var newname = this.name_input ? this.name_input.value : null; 2522 2522 if (this.edit_folder && newname) 2523 this.http_ request('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[this.edit_folder][0])+'&_folder_newname='+urlencode(newname));2523 this.http_post('rename-folder', '_folder_oldname='+urlencode(this.env.subscriptionrows[this.edit_folder][0])+'&_folder_newname='+urlencode(newname)); 2524 2524 } 2525 2525 // escape … … 2536 2536 2537 2537 if (folder) 2538 this.http_ request('delete-folder', '_mboxes='+urlencode(folder));2538 this.http_post('delete-folder', '_mboxes='+urlencode(folder)); 2539 2539 }; 2540 2540 … … 2663 2663 this.change_subscription('_unsubscribed', '_subscribed', 'subscribe'); 2664 2664 else if (folder) 2665 this.http_ request('subscribe', '_mboxes='+urlencode(folder));2665 this.http_post('subscribe', '_mboxes='+urlencode(folder)); 2666 2666 }; 2667 2667 … … 2673 2673 this.change_subscription('_subscribed', '_unsubscribed', 'unsubscribe'); 2674 2674 else if (folder) 2675 this.http_ request('unsubscribe', '_mboxes='+urlencode(folder));2675 this.http_post('unsubscribe', '_mboxes='+urlencode(folder)); 2676 2676 }; 2677 2677 … … 2707 2707 } 2708 2708 2709 this.http_ request(action, '_mboxes='+urlencode(a_folders.join(',')));2709 this.http_post(action, '_mboxes='+urlencode(a_folders.join(','))); 2710 2710 } 2711 2711 } -
trunk/roundcubemail/program/steps/addressbook/delete.inc
r543 r573 20 20 */ 21 21 22 if (($cid = get_input_value('_cid', RCUBE_INPUT_ GPC)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $cid))22 if (($cid = get_input_value('_cid', RCUBE_INPUT_POST)) && preg_match('/^[0-9]+(,[0-9]+)*$/', $cid)) 23 23 { 24 24 $deleted = $CONTACTS->delete($cid); -
trunk/roundcubemail/program/steps/mail/compose.inc
r543 r573 30 30 31 31 // remove an attachment 32 if ($_action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_ GET['_file'], $regs))32 if ($_action=='remove-attachment' && preg_match('/^rcmfile([0-9]+)$/', $_POST['_file'], $regs)) 33 33 { 34 34 $id = $regs[1]; -
trunk/roundcubemail/program/steps/mail/folders.inc
r543 r573 22 22 23 23 // send EXPUNGE command 24 if ($_action=='expunge' )24 if ($_action=='expunge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))) 25 25 { 26 $success = $IMAP->expunge( get_input_value('_mbox', RCUBE_INPUT_GET));26 $success = $IMAP->expunge($mbox); 27 27 28 28 // reload message list if current mailbox 29 if ($success && !empty($_ GET['_reload']))29 if ($success && !empty($_REQUEST['_reload'])) 30 30 { 31 31 $OUTPUT->command('message_list.clear'); … … 38 38 39 39 // clear mailbox 40 else if ($_action=='purge' )40 else if ($_action=='purge' && ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))) 41 41 { 42 $success = $IMAP->clear_mailbox( get_input_value('_mbox', RCUBE_INPUT_GET));42 $success = $IMAP->clear_mailbox($mbox); 43 43 44 if ($success && !empty($_ GET['_reload']))44 if ($success && !empty($_REQUEST['_reload'])) 45 45 { 46 46 $OUTPUT->set_env('messagecount', 0); -
trunk/roundcubemail/program/steps/mail/func.inc
r567 r573 53 53 54 54 // set message set for search result 55 if (!empty($_ GET['_search']) && isset($_SESSION['search'][$_GET['_search']]))56 $IMAP->set_search_set($_SESSION['search'][$_ GET['_search']]);55 if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) 56 $IMAP->set_search_set($_SESSION['search'][$_REQUEST['_search']]); 57 57 58 58 -
trunk/roundcubemail/program/steps/mail/list.inc
r543 r573 43 43 $a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order); 44 44 45 $unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_ GET['_refresh']) ? TRUE : FALSE);45 $unseen = $IMAP->messagecount($mbox_name, 'UNSEEN', !empty($_REQUEST['_refresh']) ? TRUE : FALSE); 46 46 47 47 // update message count display -
trunk/roundcubemail/program/steps/mail/mark.inc
r543 r573 25 25 'unread' => 'UNSEEN'); 26 26 27 if (($uids = get_input_value('_uid', RCUBE_INPUT_ GET)) && ($flag = get_input_value('_flag', RCUBE_INPUT_GET)))27 if (($uids = get_input_value('_uid', RCUBE_INPUT_POST)) && ($flag = get_input_value('_flag', RCUBE_INPUT_POST))) 28 28 { 29 29 $flag = $a_flags_map[$flag] ? $a_flags_map[$flag] : strtoupper($flag); -
trunk/roundcubemail/program/steps/mail/move_del.inc
r543 r573 21 21 22 22 // move messages 23 if ($_action=='moveto' && !empty($_ GET['_uid']) && !empty($_GET['_target_mbox']))23 if ($_action=='moveto' && !empty($_POST['_uid']) && !empty($_POST['_target_mbox'])) 24 24 { 25 $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_ GET))));26 $target = get_input_value('_target_mbox', RCUBE_INPUT_ GET);27 $moved = $IMAP->move_message($uids, $target, get_input_value('_mbox', RCUBE_INPUT_ GET));25 $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); 26 $target = get_input_value('_target_mbox', RCUBE_INPUT_POST); 27 $moved = $IMAP->move_message($uids, $target, get_input_value('_mbox', RCUBE_INPUT_POST)); 28 28 29 29 if (!$moved) … … 38 38 39 39 // delete messages 40 else if ($_action=='delete' && !empty($_ GET['_uid']))40 else if ($_action=='delete' && !empty($_POST['_uid'])) 41 41 { 42 $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_ GET))));43 $del = $IMAP->delete_message($uids, get_input_value('_mbox', RCUBE_INPUT_ GET));42 $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); 43 $del = $IMAP->delete_message($uids, get_input_value('_mbox', RCUBE_INPUT_POST)); 44 44 45 45 if (!$del) … … 79 79 80 80 // add new rows from next page (if any) 81 if ($_ GET['_from']!='show' && $pages>1 && $IMAP->list_page < $pages)81 if ($_POST['_from']!='show' && $pages>1 && $IMAP->list_page < $pages) 82 82 { 83 83 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; -
trunk/roundcubemail/program/steps/settings/manage_folders.inc
r543 r573 27 27 if ($_action=='subscribe') 28 28 { 29 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_ GET))29 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_POST)) 30 30 $IMAP->subscribe(array($mboxes)); 31 31 … … 37 37 else if ($_action=='unsubscribe') 38 38 { 39 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_ GET))39 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_POST)) 40 40 $IMAP->unsubscribe(array($mboxes)); 41 41 … … 47 47 else if ($_action=='create-folder') 48 48 { 49 if (!empty($_ GET['_name']))50 $create = $IMAP->create_mailbox(trim(get_input_value('_name', RCUBE_INPUT_ GET, FALSE, 'UTF-7')), TRUE);49 if (!empty($_POST['_name'])) 50 $create = $IMAP->create_mailbox(trim(get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF-7')), TRUE); 51 51 52 52 if ($create && $OUTPUT->ajax_call) … … 67 67 else if ($_action=='rename-folder') 68 68 { 69 if (!empty($_ GET['_folder_oldname']) && !empty($_GET['_folder_newname']))70 $rename = $IMAP->rename_mailbox(($oldname = get_input_value('_folder_oldname', RCUBE_INPUT_ GET)), trim(get_input_value('_folder_newname', RCUBE_INPUT_GET, FALSE, 'UTF-7')));69 if (!empty($_POST['_folder_oldname']) && !empty($_POST['_folder_newname'])) 70 $rename = $IMAP->rename_mailbox(($oldname = get_input_value('_folder_oldname', RCUBE_INPUT_POST)), trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, FALSE, 'UTF-7'))); 71 71 72 72 if ($rename && $OUTPUT->ajax_call) … … 89 89 else if ($_action=='delete-folder') 90 90 { 91 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_ GET))91 if ($mboxes = get_input_value('_mboxes', RCUBE_INPUT_POST)) 92 92 $deleted = $IMAP->delete_mailbox(array($mboxes)); 93 93 94 94 if ($OUTPUT->ajax_call && $deleted) 95 95 { 96 $OUTPUT->command('remove_folder_row', get_input_value('_mboxes', RCUBE_INPUT_ GET));96 $OUTPUT->command('remove_folder_row', get_input_value('_mboxes', RCUBE_INPUT_POST)); 97 97 $OUTPUT->show_message('folderdeleted', 'confirmation'); 98 98 $OUTPUT->send();
Note: See TracChangeset
for help on using the changeset viewer.
