1<?php 2/** 3 * Turba browse.php. 4 * 5 * Copyright 2000-2017 Horde LLC (http://www.horde.org/) 6 * 7 * See the enclosed file LICENSE for license information (ASL). If you did 8 * did not receive this file, see http://www.horde.org/licenses/apache. 9 * 10 * @author Chuck Hagenbuch <chuck@horde.org> 11 * @package Turba 12 */ 13 14require_once __DIR__ . '/lib/Application.php'; 15Horde_Registry::appInit('turba'); 16 17/* If default source is not browsable, try one from the addressbooks pref */ 18if (empty($cfgSources[Turba::$source]['browse'])) { 19 $addressbooks = Turba::getAddressBooks(); 20 foreach ($addressbooks as $source) { 21 if (!empty($cfgSources[$source]['browse'])) { 22 Turba::$source = $source; 23 break; 24 } 25 } 26} 27 28$params = array( 29 'addSources' => $addSources, 30 'attributes' => $attributes, 31 'browse_source_count' => $browse_source_count, 32 'browser' => $browser, 33 'cfgSources' => $cfgSources, 34 'copymoveSources' => $copymoveSources, 35 'conf' => $conf, 36 'factory' => $injector->getInstance('Turba_Factory_Driver'), 37 'history' => $injector->getInstance('Horde_History'), 38 'notification' => $notification, 39 'page_output' => $page_output, 40 'prefs' => $prefs, 41 'registry' => $registry, 42 'source' => Turba::$source, 43 'turba_shares' => $injector->getInstance('Turba_Shares'), 44 'vars' => Horde_Variables::getDefaultVariables(), 45); 46 47$browse = new Turba_View_Browse($params); 48$browse->run(); 49