diff options
Diffstat (limited to 'modules/rest/helpers/rest.php')
-rw-r--r-- | modules/rest/helpers/rest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php index 58943700..1954f46e 100644 --- a/modules/rest/helpers/rest.php +++ b/modules/rest/helpers/rest.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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(); } |