From: Nik Okuntseff Date: Tue, 19 Jul 2016 19:23:13 +0000 (+0000) Subject: Added ttHttpRequest::isGet() convenience function. X-Git-Tag: timetracker_1.19-1~1694 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fcb4a368c1de2e4c086e64064c00f404efaef617;p=timetracker.git Added ttHttpRequest::isGet() convenience function. --- diff --git a/WEB-INF/lib/html/HttpRequest.class.php b/WEB-INF/lib/html/HttpRequest.class.php index cea61226..cd66a8cc 100644 --- a/WEB-INF/lib/html/HttpRequest.class.php +++ b/WEB-INF/lib/html/HttpRequest.class.php @@ -32,7 +32,12 @@ class ttHttpRequest { return isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : false; } - // The isPost function determines if a request method is POST. + // The isGet function determines if a request method is a GET. + function isGet() { + return ($this->getMethod() == 'GET'); + } + + // The isPost function determines if a request method is a POST. function isPost() { return ($this->getMethod() == 'POST'); } diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index e8f35207..f00c6c8e 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.9.26.3504 | Copyright © Anuko | +  Anuko Time Tracker 1.9.26.3505 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 32540fd6..a6aab22e 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -42,8 +42,8 @@ function setChange($sql) { print "successful update
\n"; } -if (!$request->isPost()) { - echo('

Environment check

'); +if ($request->isGet()) { + echo('

Environment Checks

'); // Check if WEB-INF/templates_c dir is writable. if (is_writable(APP_DIR.'/WEB-INF/templates_c/')) {