Aleksander Machniak
2016-02-23 10f24c034b388880d3095724c2d7d2ee69ac8655
program/steps/settings/func.inc
@@ -44,6 +44,7 @@
    'add-response'  => 'edit_response.inc',
    'save-response' => 'edit_response.inc',
    'delete-response' => 'responses.inc',
    'delete-identity' => 'identities.inc',
));
@@ -218,7 +219,7 @@
                foreach (DateTimeZone::listIdentifiers() as $i => $tzs) {
                    try {
                        $tz      = new DateTimeZone($tzs);
                        $date    = new DateTime('2012-12-21', $tz);
                        $date    = new DateTime(date('Y') . '-12-21', $tz);
                        $offset  = $date->format('Z') + 45000;
                        $sortkey = sprintf('%06d.%s', $offset, $tzs);
                        $zones[$sortkey] = array($tzs, $date->format('P'));
@@ -376,13 +377,16 @@
            if ($current) {
                $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail');
                $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');",
                    rcmail_output::JS_OBJECT_NAME, rcube::JQ($product_name)), 'foot');
                    rcmail_output::JS_OBJECT_NAME, rcube::JQ($product_name)), 'docready');
            }
            $blocks['browser']['options']['mailtoprotohandler'] = array(
                'content' => html::a(array(
                'href'    => '#',
                'id'      => 'mailtoprotohandler'), rcube::Q($RCMAIL->gettext('mailtoprotohandler'))),
                    'href'    => '#',
                    'id'      => 'mailtoprotohandler'
                ),
                rcube::Q($RCMAIL->gettext('mailtoprotohandler'))) .
                html::span('mailtoprotohandler-status', ''),
            );
        break;
@@ -735,7 +739,7 @@
                );
            }
            if (!isset($no_override['dsn_default'])) {
            if (!isset($no_override['dsn_default']) && $RCMAIL->config->get('smtp_server')) {
                if (!$current) {
                    continue 2;
                }
@@ -1032,7 +1036,8 @@
            }
            // Configure special folders
            if (!isset($no_override['default_folders']) && $current) {
            $set = array('drafts_mbox', 'sent_mbox', 'junk_mbox', 'trash_mbox');
            if ($current && count(array_intersect($no_override, $set)) < 4) {
                $select = $RCMAIL->folder_selector(array(
                    'noselection'   => '---',
                    'realnames'     => true,
@@ -1204,7 +1209,7 @@
        $data  = $RCMAIL->plugins->exec_hook('preferences_list',
            array('section' => $sect['id'], 'blocks' => $blocks, 'current' => $current));
        $advanced_prefs = $config['advanced_prefs'];
        $advanced_prefs = (array) $RCMAIL->config->get('advanced_prefs');
        // create output
        foreach ($data['blocks'] as $key => $block) {
@@ -1235,6 +1240,13 @@
            $sections[$idx]['blocks'] = $data['blocks'];
    }
    $data = $RCMAIL->plugins->exec_hook('preferences_section_header',
        array('section' => $sect['id'], 'header' => '', 'current' => $current));
    if(!empty($data['header'])) {
        $sections[$idx]['header'] = $data['header'];
    }
    return array($sections, $plugin['cols']);
}