From efb5aa81b778e5567c453effb924332330f5102e Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Thu, 31 Dec 2009 16:53:02 -0500 Subject: [PATCH] Add perms method and Application class --- shout/lib/Application.php | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 shout/lib/Application.php diff --git a/shout/lib/Application.php b/shout/lib/Application.php new file mode 100644 index 000000000..e0bcf20fe --- /dev/null +++ b/shout/lib/Application.php @@ -0,0 +1,60 @@ +getContexts(); + + $perms['tree']['shout']['contexts'] = false; + $perms['title']['shout:contexts'] = _("Contexts"); + + // Run through every contact source. + foreach ($contexts as $context) { + $perms['tree']['shout']['contexts'][$context] = false; + $perms['title']['shout:contexts:' . $context] = $context; + + foreach( + array( + 'extensions' => 'Extensions', + 'devices' => 'Devices', + 'conferences' => 'Conference Rooms', + ) + as $module => $modname) { + $perms['tree']['shout']['contexts'][$context][$module] = false; + $perms['title']["shout:contexts:$context:$module"] = $modname; + } + } + + // function _shout_getContexts($searchfilters = SHOUT_CONTEXT_ALL, + // $filterperms = null) + + return $perms; + } +} -- 2.11.0