diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-04 07:44:28 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-04 07:44:28 +0000 |
commit | 9ba9f7bf2754988b7408c23c32b1f2a332528d29 (patch) | |
tree | 974139d7571dc34f7db390114c22fa501755ec87 /core/helpers/access.php | |
parent | deafa2f91220ad54cfaae1372ef98ab5f46e0f86 (diff) |
Change the startup code to only put installed modules on the autoload
path. This breaks a bunch of places where we had hardcoded
dependencies, so guard all of those cases. Restructure
module::available() a bit and the way that we do install/uninstall in
the scaffolding.
Diffstat (limited to 'core/helpers/access.php')
-rw-r--r-- | core/helpers/access.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php index 95b9819c..e859b1d5 100644 --- a/core/helpers/access.php +++ b/core/helpers/access.php @@ -162,7 +162,7 @@ class access_Core { foreach (self::_get_all_groups() as $group) { self::_add_columns($perm_name, $group->id); } - self::_add_columns($perm_name, group::EVERYBODY); + self::_add_columns($perm_name, 0); } /** @@ -175,7 +175,7 @@ class access_Core { foreach (self::_get_all_groups() as $group) { self::_drop_columns($name, $group->id); } - self::_drop_columns($name, group::EVERYBODY); + self::_drop_columns($name, 0); ORM::factory("permission")->where("name", $name)->find()->delete(); } @@ -247,9 +247,9 @@ class access_Core { * @return ORM_Iterator */ private static function _get_all_groups() { - try { + if (module::is_installed("user")) { return ORM::factory("group")->find_all(); - } catch (Kohana_Database_Exception $e) { + } else { return array(); } } |