Skip to content
Permalink
Browse files

Move emojicodes.json to scripts/, where it is cacheable.

  • Loading branch information...
kohler committed Feb 1, 2019
1 parent d6695c7 commit 52d015f10253cdf6a5ae2a1ac9232b785bda17c2
Showing with 18 additions and 16 deletions.
  1. +16 −14 cacheable.php
  2. 0 {etc → scripts}/emojicodes.json
  3. +1 −1 src/conference.php
  4. +1 −1 src/tarball.sh
@@ -39,35 +39,37 @@ function fail($reason, $file) {
header("Content-Type: text/javascript; charset=utf-8");
if (isset($_GET["strictjs"]) && $_GET["strictjs"])
$prefix = "\"use strict\";\n";
} else if ($s === ".map")
} else if ($s === ".map" || $s === ".json") {
header("Content-Type: application/json; charset=utf-8");
else if ($s === ".css")
} else if ($s === ".css") {
header("Content-Type: text/css; charset=utf-8");
else if ($s === ".gif")
} else if ($s === ".gif") {
header("Content-Type: image/gif");
else if ($s === ".jpg")
} else if ($s === ".jpg") {
header("Content-Type: image/jpeg");
else if ($s === ".png")
} else if ($s === ".png") {
header("Content-Type: image/png");
else if ($s === ".svg")
} else if ($s === ".svg") {
header("Content-Type: image/svg+xml");
else if ($s === ".mp3")
} else if ($s === ".mp3") {
header("Content-Type: audio/mpeg");
else if ($s === ".woff")
} else if ($s === ".woff") {
header("Content-Type: application/font-woff");
else if ($s === ".woff2")
} else if ($s === ".woff2") {
header("Content-Type: application/font-woff2");
else if ($s === ".ttf")
} else if ($s === ".ttf") {
header("Content-Type: application/x-font-ttf");
else if ($s === ".otf")
} else if ($s === ".otf") {
header("Content-Type: font/opentype");
else if ($s === ".eot")
} else if ($s === ".eot") {
header("Content-Type: application/vnd.ms-fontobject");
else
} else {
fail("403 Forbidden", "File cannot be served");
}
header("Access-Control-Allow-Origin: *");
} else
} else {
fail("403 Forbidden", "File cannot be served");
}
$mtime = @filemtime($file);
if ($mtime === false)
File renamed without changes.
@@ -918,7 +918,7 @@ function _add_emoji_code($val, $key) {
function emoji_code_map() {
global $ConfSitePATH;
if ($this->_emoji_codes === null) {
$this->_emoji_codes = json_decode(file_get_contents("$ConfSitePATH/etc/emojicodes.json"), true);
$this->_emoji_codes = json_decode(file_get_contents("$ConfSitePATH/scripts/emojicodes.json"), true);
if (($olist = $this->opt("emojiCodes")))
expand_json_includes_callback($olist, [$this, "_add_emoji_code"]);
}
@@ -94,7 +94,6 @@ etc/affiliationmatchers.json
etc/apifunctions.json
etc/assignmentparsers.json
etc/capabilityhandlers.json
etc/emojicodes.json
etc/formulafunctions.json
etc/helptopics.json
etc/homepartials.json
@@ -362,6 +361,7 @@ images/viewas.png
scripts/.htaccess
scripts/d3-hotcrp.min.js
scripts/buzzer.js
scripts/emojicodes.json
scripts/graph.js
scripts/jquery-1.12.4.min.js
scripts/jquery-1.12.4.min.map

0 comments on commit 52d015f

Please sign in to comment.
You can’t perform that action at this time.