Changeset 12467

Show
Ignore:
Timestamp:
09/25/07 12:48:49 (1 year ago)
Author:
w_i
Message:

Started adding search functionality to buddylist

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/net.nehmer.buddylist/handler/delete.php

    r2614 r12467  
    3737            // This will exit. 
    3838        } 
     39         
     40        $relocate_to = ''; 
     41        if (array_key_exists('relocate_to', $_REQUEST)) 
     42        { 
     43            $relocate_to = $_REQUEST['relocate_to']; 
     44        } 
    3945 
    4046        // Filter all account_* request params out so that we know which buddies we do no 
     
    4349        foreach ($_REQUEST as $key => $value) 
    4450        { 
    45             if (   strlen($key) == 40 
    46                 && substr($key, 0, 8) == 'account_') 
     51            if (substr($key, 0, 8) == 'account_') 
    4752            { 
     53             
    4854                $to_delete[] = substr($key, 8); 
    4955            } 
     
    5359            // In case we have no checks in the request, we just return to the welcome 
    5460            // 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); 
    5663            // This will exit. 
    5764        } 
     
    7279                continue; 
    7380            } 
    74  
     81             
    7582            $result[0]->delete(); 
    7683        } 
    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         
    7891        $_MIDCOM->set_26_request_metadata(time(), null); 
    7992        $_MIDCOM->set_pagetitle("{$this->_topic->extra}: " . $this->_l10n->get('buddies deleted')); 
  • trunk/midcom/net.nehmer.buddylist/handler/request.php

    r2614 r12467  
    7676        } 
    7777 
     78        $relocate_to = ''; 
     79        if (array_key_exists('relocate_to', $_REQUEST)) 
     80        { 
     81            $relocate_to = $_REQUEST['relocate_to']; 
     82        } 
     83 
    7884        if (net_nehmer_buddylist_entry::is_on_buddy_list($this->_buddy_user)) 
    7985        { 
     
    8793            $entry->create(); 
    8894            $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); 
    89101        } 
    90102