From a63f14ec4045e82f47b237663bcf09939a0eadc5 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 29 Aug 2015 01:52:57 -0400
Subject: [PATCH] Emoticons-related code refactoring
---
program/include/rcmail_output_html.php | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php
index c6c43b5..464008c 100644
--- a/program/include/rcmail_output_html.php
+++ b/program/include/rcmail_output_html.php
@@ -1,6 +1,6 @@
<?php
-/*
+/**
+-----------------------------------------------------------------------+
| program/include/rcmail_output_html.php |
| |
@@ -18,7 +18,6 @@
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
*/
-
/**
* Class to create HTML page output using a skin template
@@ -263,11 +262,14 @@
$meta = @file_get_contents(RCUBE_INSTALL_PATH . $skin_path . '/meta.json');
$meta = @json_decode($meta, true);
- $meta['path'] = $skin_path;
- $skin_id = end(explode('/', $skin_path));
+ $meta['path'] = $skin_path;
+ $path_elements = explode('/', $skin_path);
+ $skin_id = end($path_elements);
+
if (!$meta['name']) {
$meta['name'] = $skin_id;
}
+
$this->skins[$skin_id] = $meta;
if ($meta['extends']) {
@@ -584,7 +586,7 @@
// read template file
if (!$path || ($templ = @file_get_contents($path)) === false) {
rcube::raise_error(array(
- 'code' => 501,
+ 'code' => 404,
'type' => 'php',
'line' => __LINE__,
'file' => __FILE__,
@@ -957,7 +959,7 @@
"rcube_utils::get_input_value('\\1', rcube_utils::INPUT_GPC)",
"\$_COOKIE['\\1']",
"\$browser->{'\\1'}",
- $this->template_name,
+ "'" . $this->template_name . "'",
),
$expression
);
@@ -1257,7 +1259,6 @@
if (!($attrib['command'] || $attrib['name'] || $attrib['href'])) {
return '';
}
-
// try to find out the button type
if ($attrib['type']) {
@@ -2035,5 +2036,4 @@
return $content;
}
-
}
--
Gitblit v1.9.1