# HG changeset patch # User Christophe Lincoln # Date 1487694558 -3600 # Node ID c2e788b5405d50cb2f4abdcb2d2f05ce83c7da24 # Parent 2499947037cfa120f1d6713a4d88f73c8135e434 Get page generation time and back to fgrep for admin_user (faster) since httphelper.sh is now up-to-date on Tank diff -r 2499947037cf -r c2e788b5405d web/bugs.cgi --- a/web/bugs.cgi Tue Feb 21 16:39:16 2017 +0100 +++ b/web/bugs.cgi Tue Feb 21 17:29:18 2017 +0100 @@ -14,6 +14,7 @@ plugins="plugins" sessions="/tmp/bugs/sessions" script="$SCRIPT_NAME" +timestamp="$(date -u +%s)" # Content negotiation for Gettext IFS="," @@ -50,12 +51,14 @@ # HTML 5 footer. html_footer() { + gentime=$(( $(date -u +%s) - ${timestamp} )) cat << EOT @@ -112,7 +115,7 @@ # Check if user is admin admin_user() { - grep -w -q "^$user$" ${ADMIN_USERS} + fgrep -w -q "$user" ${ADMIN_USERS} } # Authenticated or not