getBaseFolders() public method

public getBaseFolders ( )
Esempio n. 1
0
<?php

/**
 * The Hylax script to show a fax view.
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.horde.org/licenses/gpl.
 */
require_once __DIR__ . '/lib/Application.php';
$hylax = Horde_Registry::appInit('hylax');
$fax_id = Horde_Util::getFormData('fax_id');
$folder = strtolower(Horde_Util::getFormData('folder'));
$path = Horde_Util::getFormData('path');
$base_folders = Hylax::getBaseFolders();
$vars = Horde_Variables::getDefaultVariables();
$fax_id = $vars->get('fax_id');
$url = $vars->get('url', 'folder.php');
$fax = $hylax->storage->getFax($fax_id);
if (is_a($fax, 'PEAR_Error')) {
    $notification->push(sprintf(_("Could not open fax ID \"%s\". %s"), $fax_id, $fax->getMessage()), 'horde.error');
    Horde::url($url, true)->redirect();
} elseif (!empty($fax['fax_number'])) {
    $notification->push(sprintf(_("Fax ID \"%s\" already has a fax number set."), $fax_id), 'horde.error');
    Horde::url($url, true)->redirect();
}
$title = _("Send Fax");
/* Set up the form. */
$form = new Horde_Form($vars, $title);
$form->setButtons(_("Send"), true);
$form->addHidden('', 'url', 'text', false);
$form->addHidden('', 'fax_id', 'int', false);