Changeset 12467
- Timestamp:
- 09/25/07 12:48:49 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/net.nehmer.buddylist/handler/delete.php
r2614 r12467 37 37 // This will exit. 38 38 } 39 40 $relocate_to = ''; 41 if (array_key_exists('relocate_to', $_REQUEST)) 42 { 43 $relocate_to = $_REQUEST['relocate_to']; 44 } 39 45 40 46 // Filter all account_* request params out so that we know which buddies we do no … … 43 49 foreach ($_REQUEST as $key => $value) 44 50 { 45 if ( strlen($key) == 40 46 && substr($key, 0, 8) == 'account_') 51 if (substr($key, 0, 8) == 'account_') 47 52 { 53 48 54 $to_delete[] = substr($key, 8); 49 55 } … … 53 59 // In case we have no checks in the request, we just return to the welcome 54 60 // page and do nothing. 55 $_MIDCOM->relocate(''); 61 $_MIDCOM->uimessages->add($this->_l10n->get('net.nehmer.buddylist'), $this->_l10n->get('no entries to be deleted.'), 'ok'); 62 $_MIDCOM->relocate($relocate_to); 56 63 // This will exit. 57 64 } … … 72 79 continue; 73 80 } 74 81 75 82 $result[0]->delete(); 76 83 } 77 84 85 if ($relocate_to != '') 86 { 87 $_MIDCOM->uimessages->add($this->_l10n->get('net.nehmer.buddylist'), $this->_l10n->get('the buddies have been deleted.'), 'ok'); 88 $_MIDCOM->relocate($relocate_to); 89 } 90 78 91 $_MIDCOM->set_26_request_metadata(time(), null); 79 92 $_MIDCOM->set_pagetitle("{$this->_topic->extra}: " . $this->_l10n->get('buddies deleted')); trunk/midcom/net.nehmer.buddylist/handler/request.php
r2614 r12467 76 76 } 77 77 78 $relocate_to = ''; 79 if (array_key_exists('relocate_to', $_REQUEST)) 80 { 81 $relocate_to = $_REQUEST['relocate_to']; 82 } 83 78 84 if (net_nehmer_buddylist_entry::is_on_buddy_list($this->_buddy_user)) 79 85 { … … 87 93 $entry->create(); 88 94 $this->_processing_msg_raw = 'buddy request sent.'; 95 } 96 97 if ($relocate_to != '') 98 { 99 $_MIDCOM->uimessages->add($this->_l10n->get('buddy request'), $this->_l10n->get($this->_processing_msg_raw), 'ok'); 100 $_MIDCOM->relocate($relocate_to); 89 101 } 90 102
