summaryrefslogtreecommitdiff
path: root/app/helpers.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers.php')
-rw-r--r--app/helpers.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers.php b/app/helpers.php
index 2df4d839..ec13c5ab 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -2,9 +2,11 @@
namespace Helper;
+use Core\Security;
+
function param_csrf()
{
- return '&csrf_token='.\Core\Security::getCSRFToken();
+ return '&csrf_token='.Security::getCSRFToken();
}
function js($filename)
@@ -100,7 +102,7 @@ function format_bytes($size, $precision = 2)
$base = log($size) / log(1024);
$suffixes = array('', 'k', 'M', 'G', 'T');
- return round(pow(1024, $base - floor($base)), $precision).$suffixes[floor($base)];
+ return round(pow(1024, $base - floor($base)), $precision).$suffixes[(int)floor($base)];
}
function get_host_from_url($url)
@@ -170,7 +172,7 @@ function form_value($values, $name)
function form_csrf()
{
- return '<input type="hidden" name="csrf_token" value="'.\Core\Security::getCSRFToken().'"/>';
+ return '<input type="hidden" name="csrf_token" value="'.Security::getCSRFToken().'"/>';
}
function form_hidden($name, $values = array())