Commit 1822826a authored by Ryan Dee's avatar Ryan Dee
Browse files

Add 5.0-specific stylesheets in PHP files

parent 986beebb
......@@ -61,13 +61,16 @@ if (!$isEmbed) {
$page->head = '<link rel="home" href="./" />';
$page->pagetitle = '';
$page->breadcrumbs = renderTemplate('templates/breadcrumbs.tpl.php');
$page->addStyleSheet('css/search.css?v=20161215');
}
if ($isEmbed && $_GET['embed'] === '5.0') {
$page->addStyleSheet('css/search-5.0.css?v=20180816');
}
$localResults = '';
$context = '';
$page->addStyleSheet('css/search.css?v=20161215');
//u is referring site
if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
// Add local site search results
......@@ -77,7 +80,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
//require_once 'HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', '/tmp');
//Trick the purifier into accepting HTML5 elements/attributes
$config->set('HTML.DefinitionID', 'html5-definitions'); // unqiue id
$config->set('HTML.DefinitionRev', 1);
......@@ -85,7 +88,7 @@ if (isset($_GET['u']) && $scanned = UNL_Search::getScannedPage($_GET['u'])) {
//Allow everything to have a role
$def->addAttribute('*', 'role', 'Text');
}
$purifier = new HTMLPurifier($config);
$page->head .= '<link rel="home" href="'.htmlentities($_GET['u'], ENT_QUOTES).'" />';
......
......@@ -19,7 +19,7 @@ require(['jquery', '<?php echo $localScriptUrl ?>'], function($, UNLSearch) {
}).appendTo($('body'));
var $localCss = $('<link>', {
'href': './css/search-google.css?v=20170404'
'href': './css/search-google-5.0.css?v=20180816'
});
gSearchDefer.done(function(google) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment