more niceurlness
This commit is contained in:
parent
02675609b4
commit
a3a129df5f
4 changed files with 6 additions and 18 deletions
|
@ -63,7 +63,7 @@ class ET extends Extension
|
|||
"about" => [
|
||||
'title' => $config->get_string(SetupConfig::TITLE),
|
||||
'theme' => $config->get_string(SetupConfig::THEME),
|
||||
'url' => "http://" . $_SERVER["HTTP_HOST"] . get_base_href(),
|
||||
'url' => make_http(make_link("/")),
|
||||
],
|
||||
"versions" => [
|
||||
'shimmie' => VERSION,
|
||||
|
@ -71,7 +71,7 @@ class ET extends Extension
|
|||
'php' => phpversion(),
|
||||
'db' => $database->get_driver_name() . " " . $database->get_version(),
|
||||
'os' => php_uname(),
|
||||
'server' => isset($_SERVER["SERVER_SOFTWARE"]) ? $_SERVER["SERVER_SOFTWARE"] : 'unknown',
|
||||
'server' => $_SERVER["SERVER_SOFTWARE"] ?? 'unknown',
|
||||
],
|
||||
"extensions" => [
|
||||
"core" => $core_exts,
|
||||
|
|
|
@ -324,16 +324,7 @@ class Setup extends Extension
|
|||
$themes[$human] = $name;
|
||||
}
|
||||
|
||||
if (isset($_SERVER["HTTP_HOST"])) {
|
||||
$host = $_SERVER["HTTP_HOST"];
|
||||
} else {
|
||||
$host = $_SERVER["SERVER_NAME"];
|
||||
if ($_SERVER["SERVER_PORT"] != "80") {
|
||||
$host .= ":" . $_SERVER["SERVER_PORT"];
|
||||
}
|
||||
}
|
||||
$full = "//" . $host . $_SERVER["SCRIPT_NAME"];
|
||||
$test_url = str_replace("/index.php", "/nicetest", $full);
|
||||
$test_url = make_http(str_replace("/index.php", "/nicetest", $_SERVER["SCRIPT_NAME"]));
|
||||
|
||||
$nicescript = "<script type='text/javascript'>
|
||||
function getHTTPObject() {
|
||||
|
@ -356,7 +347,7 @@ class Setup extends Extension
|
|||
http_request.open('GET', '$test_url', false);
|
||||
http_request.send(null);
|
||||
|
||||
if(http_request.status == 200 && http_request.responseText == 'ok') {
|
||||
if(http_request.status === 200 && http_request.responseText === 'ok') {
|
||||
checkbox.disabled = false;
|
||||
out_span.innerHTML = '(tested ok)';
|
||||
}
|
||||
|
@ -375,7 +366,7 @@ class Setup extends Extension
|
|||
$sb->add_choice_option(SetupConfig::THEME, $themes, "<br>Theme: ");
|
||||
//$sb->add_multichoice_option("testarray", array("a" => "b", "c" => "d"), "<br>Test Array: ");
|
||||
$sb->add_bool_option("nice_urls", "<br>Nice URLs: ");
|
||||
$sb->add_label("<span id='nicetest'>(Javascript inactive, can't test!)</span>$nicescript");
|
||||
$sb->add_label("<span title='$test_url' id='nicetest'>(Javascript inactive, can't test!)</span>$nicescript");
|
||||
$event->panel->add_block($sb);
|
||||
|
||||
$sb = new SetupBlock("Remote API Integration");
|
||||
|
|
|
@ -43,9 +43,6 @@ class StatsDInterface extends Extension
|
|||
} elseif ($event->page_matches("api")) {
|
||||
$this->_stats("api");
|
||||
} else {
|
||||
#global $_shm_load_start;
|
||||
#$time = microtime(true) - $_shm_load_start;
|
||||
#file_put_contents("data/other.log", "{$_SERVER['REQUEST_URI']} $time\n", FILE_APPEND);
|
||||
$this->_stats("other");
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ $_tracer->end();
|
|||
\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
try {
|
||||
// $_tracer->mark(@$_SERVER["REQUEST_URI"]);
|
||||
// $_tracer->mark($_SERVER["REQUEST_URI"] ?? "No Request");
|
||||
$_tracer->begin(
|
||||
$_SERVER["REQUEST_URI"] ?? "No Request",
|
||||
[
|
||||
|
|
Reference in a new issue