forked from Cavemanon/cavepaintings
Whenever we display an image for any reason, show the admin block, fixes #621
This commit is contained in:
@@ -93,7 +93,9 @@ class Tag
|
||||
$tag = preg_replace("/^(\.+[\/\\\\])+/", "", $tag); # trailing slashes?
|
||||
$tag = trim($tag, ", \t\n\r\0\x0B");
|
||||
|
||||
if($tag == ".") $tag = ""; // hard-code one bad case...
|
||||
if ($tag == ".") {
|
||||
$tag = "";
|
||||
} // hard-code one bad case...
|
||||
|
||||
if (mb_strlen($tag, 'UTF-8') > 255) {
|
||||
throw new ScoreException("The tag below is longer than 255 characters, please use a shorter tag.\n$tag\n");
|
||||
|
@@ -59,7 +59,8 @@ function install()
|
||||
function get_dsn()
|
||||
{
|
||||
if (getenv("INSTALL_DSN")) {
|
||||
$dsn = getenv("INSTALL_DSN");;
|
||||
$dsn = getenv("INSTALL_DSN");
|
||||
;
|
||||
} elseif (@$_POST["database_type"] == DatabaseDriver::SQLITE) {
|
||||
/** @noinspection PhpUnhandledExceptionInspection */
|
||||
$id = bin2hex(random_bytes(5));
|
||||
|
@@ -68,7 +68,7 @@ class UserClass
|
||||
}
|
||||
|
||||
$_all_false = [];
|
||||
foreach((new ReflectionClass('Permissions'))->getConstants() as $k => $v) {
|
||||
foreach ((new ReflectionClass('Permissions'))->getConstants() as $k => $v) {
|
||||
$_all_false[$v] = false;
|
||||
}
|
||||
new UserClass("base", null, $_all_false);
|
||||
|
Reference in New Issue
Block a user