summaryrefslogtreecommitdiff
path: root/modules/server_add
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-15 14:37:57 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-16 08:53:31 -0700
commit00eacd659f27df9c13246c510057c4f42c8866a2 (patch)
tree7f6201c54c0d7c1de2eeb337b3331d1864d30fb0 /modules/server_add
parentbe6765336eb894535d62055fab577dfc951b6b6a (diff)
Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
Diffstat (limited to 'modules/server_add')
-rw-r--r--modules/server_add/controllers/server_add.php4
-rw-r--r--modules/server_add/helpers/server_add_event.php2
-rw-r--r--modules/server_add/helpers/server_add_theme.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php
index 9769cd6f..701c89fd 100644
--- a/modules/server_add/controllers/server_add.php
+++ b/modules/server_add/controllers/server_add.php
@@ -103,7 +103,7 @@ class Server_Add_Controller extends Admin_Controller {
access::verify_csrf();
$task = ORM::factory("task", $task_id);
- if (!$task->loaded || $task->owner_id != user::active()->id) {
+ if (!$task->loaded || $task->owner_id != Identity::active()->id) {
access::forbidden();
}
@@ -207,7 +207,7 @@ class Server_Add_Controller extends Admin_Controller {
$task->set("mode", "done");
}
- $owner_id = user::active()->id;
+ $owner_id = Identity::active()->id;
foreach ($entries as $entry) {
if (microtime(true) - $start > 0.5) {
break;
diff --git a/modules/server_add/helpers/server_add_event.php b/modules/server_add/helpers/server_add_event.php
index 4db83f74..76357871 100644
--- a/modules/server_add/helpers/server_add_event.php
+++ b/modules/server_add/helpers/server_add_event.php
@@ -30,7 +30,7 @@ class server_add_event_Core {
$item = $theme->item();
$paths = unserialize(module::get_var("server_add", "authorized_paths"));
- if ($item && user::active()->admin && $item->is_album() && !empty($paths) &&
+ if ($item && Identity::active()->admin && $item->is_album() && !empty($paths) &&
is_writable($item->is_album() ? $item->file_path() : $item->parent()->file_path())) {
$menu->get("add_menu")
->append(Menu::factory("dialog")
diff --git a/modules/server_add/helpers/server_add_theme.php b/modules/server_add/helpers/server_add_theme.php
index 2ba2e167..cecb90b4 100644
--- a/modules/server_add/helpers/server_add_theme.php
+++ b/modules/server_add/helpers/server_add_theme.php
@@ -19,7 +19,7 @@
*/
class server_add_theme_Core {
static function head($theme) {
- if (user::active()->admin) {
+ if (Identity::active()->admin) {
$theme->script("server_add.js");
}
}