summaryrefslogtreecommitdiff
path: root/modules/rest/helpers/rest.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r--modules/rest/helpers/rest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php
index 58943700..676c10c3 100644
--- a/modules/rest/helpers/rest.php
+++ b/modules/rest/helpers/rest.php
@@ -54,6 +54,11 @@ class rest_Core {
$html = t("Empty response");
}
print "<pre>$html</pre>";
+ if (Session::instance()->get("profiler", false)) {
+ Profiler::enable();
+ $profiler = new Profiler();
+ $profiler->render();
+ }
break;
default:
@@ -104,7 +109,7 @@ class rest_Core {
if (!$key->loaded()) {
$key->user_id = identity::active_user()->id;
- $key->access_key = md5(md5(uniqid(mt_rand(), true) . access::private_key()));
+ $key->access_key = md5(random::hash() . access::private_key());
$key->save();
}