Thomas Bruederli
2014-12-27 d1bf0feed4db67adacbec1148d1ac15b9e1a68c2
program/steps/settings/func.inc
@@ -220,7 +220,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'));
@@ -334,13 +334,10 @@
                    $input    = new html_radiobutton(array('name'=>'_skin'));
                    foreach ($skins as $skin) {
                        $thumbnail = "./skins/$skin/thumbnail.png";
                        if (!is_file($thumbnail))
                            $thumbnail = './program/resources/blank.gif';
                        $thumbnail   = "skins/$skin/thumbnail.png";
                        $skinname    = ucfirst($skin);
                        $author_link = $license_link = '';
                        $meta        = @json_decode(@file_get_contents("./skins/$skin/meta.json"), true);
                        $meta        = @json_decode(@file_get_contents(INSTALL_PATH . "skins/$skin/meta.json"), true);
                        if (is_array($meta) && $meta['name']) {
                            $skinname     = $meta['name'];
@@ -348,10 +345,19 @@
                            $license_link = $meta['license-url'] ? html::a(array('href' => $meta['license-url'], 'target' => '_blank', 'tabindex' => '-1'), rcube::Q($meta['license'])) : rcube::Q($meta['license']);
                        }
                        $img = html::img(array(
                                'src'     => $thumbnail,
                                'class'   => 'skinthumbnail',
                                'alt'     => $skin,
                                'width'   => 64,
                                'height'  => 64,
                                'onerror' => "this.src = rcmail.assets_path('program/resources/blank.gif')",
                        ));
                        $skinnames[] = mb_strtolower($skinname);
                        $blocks['skin']['options'][$skin]['content'] = html::label(array('class' => 'skinselection'),
                            html::span('skinitem', $input->show($config['skin'], array('value' => $skin, 'id' => $field_id.$skin))) .
                            html::span('skinitem', html::img(array('src' => $thumbnail, 'class' => 'skinthumbnail', 'alt' => $skin, 'width' => 64, 'height' => 64))) .
                            html::span('skinitem', $img) .
                            html::span('skinitem', html::span('skinname', rcube::Q($skinname)) . html::br() .
                                html::span('skinauthor', $author_link ? 'by ' . $author_link : '') . html::br() .
                                html::span('skinlicense', $license_link ? $RCMAIL->gettext('license').': ' . $license_link : ''))