1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-22 13:45:02 +00:00

Bugfix: Fixed CSS content unicode character

This commit is contained in:
Starbeamrainbowlabs 2016-06-06 19:04:20 +01:00
parent 68de9fc3e7
commit 78a3a866dd
5 changed files with 71 additions and 55 deletions

View file

@ -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 "<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $timestamp) . "'>" . human_time_since($timestamp) . "</time>";
}
/**
* 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 = "<em>$pageDisplayName</em>";
$pageDisplayLink = "<a href='?page=" . rawurlencode($rchange->page) . "'>$pageDisplayName</a>";
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 "<span class='editor'>&#9998; $editorName</span>";
}
///////////////////////////////////////////////////////////////////////////////
@ -2057,29 +2088,6 @@ function render_recent_change($rchange)
return $result;
}
function render_rchange_timestamp($timestamp)
{
return "<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $timestamp) . "'>" . human_time_since($timestamp) . "</time>";
}
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 = "<em>$pageDisplayName</em>";
$pageDisplayLink = "<a href='?page=" . rawurlencode($rchange->page) . "'>$pageDisplayName</a>";
return $pageDisplayName;
}
function render_rchange_editor($editorName)
{
return "<span class='editor'>&#9998; $editorName</span>";
}

View file

@ -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 "<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $timestamp) . "'>" . human_time_since($timestamp) . "</time>";
}
/**
* 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 = "<em>$pageDisplayName</em>";
$pageDisplayLink = "<a href='?page=" . rawurlencode($rchange->page) . "'>$pageDisplayName</a>";
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 "<span class='editor'>&#9998; $editorName</span>";
}
///////////////////////////////////////////////////////////////////////////////

View file

@ -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
},
{

View file

@ -222,27 +222,4 @@ function render_recent_change($rchange)
return $result;
}
function render_rchange_timestamp($timestamp)
{
return "<time class='cursor-query' title='" . date("l jS \of F Y \a\\t h:ia T", $timestamp) . "'>" . human_time_since($timestamp) . "</time>";
}
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 = "<em>$pageDisplayName</em>";
$pageDisplayLink = "<a href='?page=" . rawurlencode($rchange->page) . "'>$pageDisplayName</a>";
return $pageDisplayName;
}
function render_rchange_editor($editorName)
{
return "<span class='editor'>&#9998; $editorName</span>";
}
?>

View file

@ -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 */