Permission syntax fix, adding regex replacements for routing, color fix
This commit is contained in:
parent
7fa02a1f39
commit
35637ddc37
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define("WEBBASE_VERSION", "1.0.0");
|
||||
define("WEBBASE_VERSION", "1.0.1");
|
||||
|
||||
function getProtocol() {
|
||||
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https" : "http";
|
||||
|
14
index.php
14
index.php
@ -111,6 +111,20 @@ if(isset($_GET["api"]) && is_string($_GET["api"])) {
|
||||
$response = (new Document404($user))->getCode();
|
||||
} else {
|
||||
$target = trim(explode("\n", $route["target"])[0]);
|
||||
|
||||
$pattern = str_replace("/","\\/", $route["request"]);
|
||||
$pattern = "/$pattern/";
|
||||
if (!startsWith($requestedUri, '/')) {
|
||||
$requestedUri = "/$requestedUri";
|
||||
}
|
||||
|
||||
@preg_match("$pattern", $requestedUri, $match);
|
||||
if (is_array($match) && !empty($match)) {
|
||||
foreach($match as $index => $value) {
|
||||
$target = str_replace("$$index", $value, $target);
|
||||
}
|
||||
}
|
||||
|
||||
switch ($route["action"]) {
|
||||
case "redirect_temporary":
|
||||
http_response_code(307);
|
||||
|
2
js/admin.min.js
vendored
2
js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ export default function Footer() {
|
||||
return (
|
||||
<footer className={"main-footer"}>
|
||||
Theme: <strong>Copyright © 2014-2019 <a href={"http://adminlte.io"}>AdminLTE.io</a>. <b>Version</b> 3.0.3</strong>
|
||||
CMS: <strong><a href={"http://git.romanh.de/Projekte/webbase.io"}>WebBase</a></strong>. <b>Version</b> 1.0.0
|
||||
CMS: <strong><a href={"https://git.romanh.de/Projekte/web-base"}>WebBase</a></strong>. <b>Version</b> 1.0.1
|
||||
</footer>
|
||||
)
|
||||
}
|
@ -56,13 +56,13 @@ export default class Overview extends React.Component {
|
||||
|
||||
render() {
|
||||
|
||||
const colors = [
|
||||
'#ff4444', '#ffbb33', '#00C851', '#33b5e5',
|
||||
'#ff4444', '#ffbb33', '#00C851', '#33b5e5',
|
||||
'#ff4444', '#ffbb33', '#00C851', '#33b5e5'
|
||||
];
|
||||
|
||||
const numDays = moment().daysInMonth();
|
||||
|
||||
let colors = [ '#ff4444', '#ffbb33', '#00C851', '#33b5e5' ];
|
||||
while (colors.length < numDays) {
|
||||
colors = colors.concat(colors);
|
||||
}
|
||||
|
||||
let data = new Array(numDays).fill(0);
|
||||
let visitorCount = 0;
|
||||
for (let date in this.state.visitors) {
|
||||
|
Loading…
Reference in New Issue
Block a user