tazbug diff web/bugs.cgi @ rev 133
Get page generation time and back to fgrep for admin_user (faster) since httphelper.sh is now up-to-date on Tank
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 21 17:29:18 2017 +0100 (2017-02-21) |
parents | 2499947037cf |
children | b5f62d54152e |
line diff
1.1 --- a/web/bugs.cgi Tue Feb 21 16:39:16 2017 +0100 1.2 +++ b/web/bugs.cgi Tue Feb 21 17:29:18 2017 +0100 1.3 @@ -14,6 +14,7 @@ 1.4 plugins="plugins" 1.5 sessions="/tmp/bugs/sessions" 1.6 script="$SCRIPT_NAME" 1.7 +timestamp="$(date -u +%s)" 1.8 1.9 # Content negotiation for Gettext 1.10 IFS="," 1.11 @@ -50,12 +51,14 @@ 1.12 1.13 # HTML 5 footer. 1.14 html_footer() { 1.15 + gentime=$(( $(date -u +%s) - ${timestamp} )) 1.16 cat << EOT 1.17 </div> 1.18 1.19 <div id="footer"> 1.20 <a href="$script">SliTaz Bugs</a> - 1.21 <a href="$script?README">README</a> 1.22 + - Page generated in ${gentime}s 1.23 </div> 1.24 1.25 </body> 1.26 @@ -112,7 +115,7 @@ 1.27 1.28 # Check if user is admin 1.29 admin_user() { 1.30 - grep -w -q "^$user$" ${ADMIN_USERS} 1.31 + fgrep -w -q "$user" ${ADMIN_USERS} 1.32 } 1.33 1.34 # Authenticated or not