From 78a3a866ddde172a2a7f8541abdc1b6b003789d7 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 6 Jun 2016 19:04:20 +0100 Subject: [PATCH] Bugfix: Fixed CSS content unicode character --- build/index.php | 62 +++++++++++++++++------------- core.php | 37 ++++++++++++++++-- module_index.json | 2 +- modules/feature-recent-changes.php | 23 ----------- settings.fragment.php | 2 +- 5 files changed, 71 insertions(+), 55 deletions(-) diff --git a/build/index.php b/build/index.php index 534d42a..abb7dd5 100644 --- a/build/index.php +++ b/build/index.php @@ -396,7 +396,7 @@ summary { cursor: pointer; } .diff-removed { background-color: rgba(255, 96, 96, 0.6); color: rgba(191, 38, 38, 1); } .newpage::before { content: "N"; margin: 0 0.3em 0 -1em; font-weight: bolder; text-decoration: underline dotted; } -.upload::before { content: "\1f845"; margin: 0 0.1em 0 -1.1em; } +.upload::before { content: "\\1f845"; margin: 0 0.1em 0 -1.1em; } footer { padding: 2rem; } /* #ffdb6d #36962c */ @@ -829,9 +829,8 @@ function stack_trace($log_trace = true) if (!function_exists('getallheaders')) { function getallheaders() { - if (!is_array($_SERVER)) { - return array(); - } + if (!is_array($_SERVER)) + return []; $headers = array(); foreach ($_SERVER as $name => $value) { @@ -842,6 +841,38 @@ if (!function_exists('getallheaders')) { return $headers; } } +/** + * Renders a timestamp in HTML. + * @param int $timestamp The timestamp to render. + * @return string HTML representing the given timestamp. + */ +function render_rchange_timestamp($timestamp) +{ + return ""; +} +/** + * Renders a page name in HTML. + * @param object $rchange The recent change to render as a page name + * @return string HTML representing the name of the given page. + */ +function render_rchange_pagename($rchange) +{ + global $pageindex; + $pageDisplayName = $rchange->page; + if(isset($pageindex->$pageDisplayName) and !empty($pageindex->$pageDisplayName->redirect)) + $pageDisplayName = "$pageDisplayName"; + $pageDisplayLink = "$pageDisplayName"; + return $pageDisplayName; +} +/** + * Renders an editor's name in HTML. + * @param string $editorName The name of the editor to render. + * @return string HTML representing the given editor's name. + */ +function render_rchange_editor($editorName) +{ + return "✎ $editorName"; +} /////////////////////////////////////////////////////////////////////////////// @@ -2057,29 +2088,6 @@ function render_recent_change($rchange) return $result; } -function render_rchange_timestamp($timestamp) -{ - return ""; -} - -function render_rchange_pagename($rchange) -{ - global $pageindex; - - // Render the page's name - $pageDisplayName = $rchange->page; - if(isset($pageindex->$pageDisplayName) and !empty($pageindex->$pageDisplayName->redirect)) - $pageDisplayName = "$pageDisplayName"; - $pageDisplayLink = "$pageDisplayName"; - - return $pageDisplayName; -} - -function render_rchange_editor($editorName) -{ - return "✎ $editorName"; -} - diff --git a/core.php b/core.php index d5999d3..cb647e6 100644 --- a/core.php +++ b/core.php @@ -402,9 +402,8 @@ function stack_trace($log_trace = true) if (!function_exists('getallheaders')) { function getallheaders() { - if (!is_array($_SERVER)) { - return array(); - } + if (!is_array($_SERVER)) + return []; $headers = array(); foreach ($_SERVER as $name => $value) { @@ -415,6 +414,38 @@ if (!function_exists('getallheaders')) { return $headers; } } +/** + * Renders a timestamp in HTML. + * @param int $timestamp The timestamp to render. + * @return string HTML representing the given timestamp. + */ +function render_rchange_timestamp($timestamp) +{ + return ""; +} +/** + * Renders a page name in HTML. + * @param object $rchange The recent change to render as a page name + * @return string HTML representing the name of the given page. + */ +function render_rchange_pagename($rchange) +{ + global $pageindex; + $pageDisplayName = $rchange->page; + if(isset($pageindex->$pageDisplayName) and !empty($pageindex->$pageDisplayName->redirect)) + $pageDisplayName = "$pageDisplayName"; + $pageDisplayLink = "$pageDisplayName"; + return $pageDisplayName; +} +/** + * Renders an editor's name in HTML. + * @param string $editorName The name of the editor to render. + * @return string HTML representing the given editor's name. + */ +function render_rchange_editor($editorName) +{ + return "✎ $editorName"; +} /////////////////////////////////////////////////////////////////////////////// diff --git a/module_index.json b/module_index.json index df8032f..f904f37 100644 --- a/module_index.json +++ b/module_index.json @@ -50,7 +50,7 @@ "author": "Starbeamrainbowlabs", "description": "Adds recent changes. Access through the 'recent-changes' action.", "id": "feature-recent-changes", - "lastupdate": 1464940989, + "lastupdate": 1465231242, "optional": false }, { diff --git a/modules/feature-recent-changes.php b/modules/feature-recent-changes.php index 12fffce..fc31da3 100644 --- a/modules/feature-recent-changes.php +++ b/modules/feature-recent-changes.php @@ -222,27 +222,4 @@ function render_recent_change($rchange) return $result; } -function render_rchange_timestamp($timestamp) -{ - return ""; -} - -function render_rchange_pagename($rchange) -{ - global $pageindex; - - // Render the page's name - $pageDisplayName = $rchange->page; - if(isset($pageindex->$pageDisplayName) and !empty($pageindex->$pageDisplayName->redirect)) - $pageDisplayName = "$pageDisplayName"; - $pageDisplayLink = "$pageDisplayName"; - - return $pageDisplayName; -} - -function render_rchange_editor($editorName) -{ - return "✎ $editorName"; -} - ?> diff --git a/settings.fragment.php b/settings.fragment.php index 84b2a0b..af53121 100644 --- a/settings.fragment.php +++ b/settings.fragment.php @@ -393,7 +393,7 @@ summary { cursor: pointer; } .diff-removed { background-color: rgba(255, 96, 96, 0.6); color: rgba(191, 38, 38, 1); } .newpage::before { content: "N"; margin: 0 0.3em 0 -1em; font-weight: bolder; text-decoration: underline dotted; } -.upload::before { content: "\1f845"; margin: 0 0.1em 0 -1.1em; } +.upload::before { content: "\\1f845"; margin: 0 0.1em 0 -1.1em; } footer { padding: 2rem; } /* #ffdb6d #36962c */