From: Mischa POSLAWSKY Date: Sat, 21 Apr 2018 12:37:27 +0000 (+0200) Subject: login: templating support for warning message X-Git-Tag: v2.6~6 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/8302e2ddeac5e241ad3f8bfaea0dbdfd069f26ef login: templating support for warning message --- diff --git a/login.inc.php b/login.inc.php index 4d05ded..9c2a604 100644 --- a/login.inc.php +++ b/login.inc.php @@ -1,10 +1,5 @@

Inloggen

-%s

'."\n\n", $message); -} -?>
[[warn]]

'; + if ($offset = strpos($doc, '')) { + $doc = substr_replace($doc, "\n\n".$warn, $offset + 5, 0); + } + else { + $doc = $warn . "\n\n" . $doc; + } + } + return str_replace(array_keys($rep), array_values($rep), $doc); } # custom error handling