Changeset 2326 in subversion


Ignore:
Timestamp:
Mar 3, 2009 2:29:26 PM (4 years ago)
Author:
ziba
Message:

New Plugin: Use Imap Subscriptions Option - by default roundcube only lists subscribed folders, this introduces an option to ignore subscriptions
New Plugin Hook: list_mailboxes - allows a plugin to provide the list of mailboxes instead of roundcube core
New Plugin Hook: manage_folders - allows a plugin to modify the main table on the manage folders screen
New Plugin Hook: user_preferences_server_settings - allows a plugin to modify the user preferences server settings table
New Plugin Hook: save_preferences - allows a plugin to inject data into the array of preferences about to be saved
Change to html class: added a remove_column method to give plugins a greater ability to modify the interface

Location:
branches/devel-api
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-api/program/include/html.php

    r2266 r2326  
    600600    } 
    601601 
     602     /** 
     603     * Remove a column from a table 
     604     * Useful for plugins making alterations 
     605     *  
     606     * @param string $class  
     607     */ 
     608    public function remove_column($class) 
     609    { 
     610        // Remove the header 
     611        foreach($this->header as $index=>$header){ 
     612            if($header->attrib['class'] == $class){ 
     613                unset($this->header[$index]); 
     614                break; 
     615            } 
     616        } 
     617 
     618        // Remove cells from rows 
     619        foreach($this->rows as $i=>$row){ 
     620            foreach($row->cells as $j=>$cell){ 
     621                if($cell->attrib['class'] == $class){ 
     622                    unset($this->rows[$i]->cells[$j]); 
     623                    break; 
     624                } 
     625            } 
     626        } 
     627    } 
     628 
     629 
    602630    /** 
    603631     * Jump to next row 
  • branches/devel-api/program/include/rcube_imap.php

    r2189 r2326  
    427427      return $a_mboxes; 
    428428 
    429     // retrieve list of folders from IMAP server 
    430     $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter); 
     429    // Give plugins a chance to provide a list of mailboxes 
     430    $data = rcmail::get_instance()->plugins->exec_hook('list_mailboxes',array('root'=>$root,'filter'=>$filter)); 
     431    if(isset($data['a_folders'])){ 
     432        $a_folders = $data['a_folders']; 
     433    } 
     434    else{ 
     435        // retrieve list of folders from IMAP server 
     436        $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter); 
     437    } 
     438 
    431439     
    432440    if (!is_array($a_folders) || !sizeof($a_folders)) 
  • branches/devel-api/program/steps/settings/func.inc

    r2206 r2326  
    382382    } 
    383383 
     384    rcmail::get_instance()->plugins->exec_hook('user_preferences_server_settings', array('table'=>$table)); 
     385 
    384386    if ($table->size()) 
    385387      $out = html::tag('fieldset', null, html::tag('legend', null, Q(rcube_label('serversettings'))) . $table->show($attrib)); 
  • branches/devel-api/program/steps/settings/manage_folders.inc

    r2175 r2326  
    262262  } 
    263263 
     264  rcmail::get_instance()->plugins->exec_hook('manage_folders', array('table'=>$table)); 
    264265 
    265266  $OUTPUT->add_gui_object('subscriptionlist', $attrib['id']); 
  • branches/devel-api/program/steps/settings/save_prefs.inc

    r2115 r2326  
    4949  ); 
    5050 
     51$data  =  rcmail::get_instance()->plugins->exec_hook('save_preferences', array('a_user_prefs'=>$a_user_prefs)); 
     52$a_user_prefs = $data['a_user_prefs']; 
     53 
    5154// don't override these parameters 
    5255foreach ((array)$CONFIG['dont_override'] as $p) 
Note: See TracChangeset for help on using the changeset viewer.