From: Arthur Date: Fri, 16 Dec 2016 11:23:47 +0000 (+0100) Subject: Merge pull request #714 from ArthurHoaro/hotfix/banlogin X-Git-Tag: v0.9.0~88 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=e3ffc8fdee30be41046b985fe6e7034fb580b0c8;hp=4cfe8d330319d83c3024a4149afeca0138922fda;p=github%2Fshaarli%2FShaarli.git Merge pull request #714 from ArthurHoaro/hotfix/banlogin Fixes can login function call in loginform.html --- diff --git a/index.php b/index.php index cc448352..a0a3a8c7 100644 --- a/index.php +++ b/index.php @@ -1249,10 +1249,12 @@ function renderPage($conf, $pluginManager) // Edit $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); $updated = new DateTime(); + $shortUrl = $LINKSDB[$id]['shorturl']; } else { // New link $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); $updated = null; + $shortUrl = link_small_hash($created, $id); } // Remove multiple spaces. @@ -1279,7 +1281,7 @@ function renderPage($conf, $pluginManager) 'created' => $created, 'updated' => $updated, 'tags' => str_replace(',', ' ', $tags), - 'shorturl' => link_small_hash($created, $id), + 'shorturl' => $shortUrl, ); // If title is empty, use the URL as title.