}
/**
+ * Return a list of all applications, ignoring permissions.
+ *
+ * @return array
+ */
+ public function listAllApps($filter = null)
+ {
+ // Default to all installed (but possibly not configured) applications)
+ if (is_null($filter)) {
+ $filter = array('inactive', 'hidden', 'notoolbar', 'active', 'admin');
+ }
+ $apps = array();
+ foreach ($this->applications as $app => $params) {
+ if (in_array($params['status'], $filter)) {
+ $apps[] = $app;
+ }
+ }
+
+ return $apps;
+ }
+
+ /**
* Returns all available registry APIs.
*
* @return array The API list.
}
/* Otherwise, allow access for admins, for apps that do not have any
- * have any explicit permissions, or for apps that allow the given
- * permission. */
+ * explicit permissions, or for apps that allow the given permission. */
return Horde_Auth::isAdmin() ||
!$GLOBALS['perms']->exists($app) ||
$GLOBALS['perms']->hasPermission($app, Horde_Auth::getAuth(), $perms);
$error = Horde::img('alerts/error.png');
$conf_url = Horde::applicationUrl('admin/setup/config.php');
-$a = $registry->listApps(array('inactive', 'hidden', 'notoolbar', 'active', 'admin'));
+$a = $registry->listAllApps();
$apps = array();
$i = -1;
if (file_exists(HORDE_BASE . '/lib/bundle.php')) {