Skip to content

Commit

Permalink
Consistency : always use self::XXX
Browse files Browse the repository at this point in the history
  • Loading branch information
rledisez committed Jul 18, 2009
1 parent 719c59e commit c9017ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/gallery/helpers/access.php
Expand Up @@ -130,7 +130,7 @@ static function group_can($group, $perm_name, $item) {
* @param Group_Model $group
* @param string $perm_name
* @param Item_Model $item
* @return boolean access::ALLOW, access::DENY or access::INHERIT (null) for no intent
* @return boolean access::ALLOW, ccess::DENY or access::INHERIT (null) for no intent
*/
static function group_intent($group, $perm_name, $item) {
$intent = model_cache::get("access_intent", $item->id, "item_id");
Expand Down Expand Up @@ -158,7 +158,7 @@ static function locked_by($group, $perm_name, $item) {
->where("`right` >= $item->right")
->where("items.id <> $item->id")
->join("access_intents", "items.id", "access_intents.item_id")
->where("access_intents.view_$group->id", access::DENY)
->where("access_intents.view_$group->id", self::DENY)
->orderby("level", "DESC")
->limit(1)
->find();
Expand Down Expand Up @@ -242,7 +242,7 @@ static function reset($group, $perm_name, $item) {
if ($item->id == 1) {
throw new Exception("@todo CANT_RESET_ROOT_PERMISSION");
}
self::_set($group, $perm_name, $item, access::INHERIT);
self::_set($group, $perm_name, $item, self::INHERIT);
}

/**
Expand Down Expand Up @@ -447,7 +447,7 @@ private static function _add_columns($perm_name, $group) {
$not_null = $cache_table == "items" ? "" : "NOT NULL";
$db->query("ALTER TABLE {{$cache_table}} ADD `$field` BINARY $not_null DEFAULT FALSE");
$db->query("ALTER TABLE {access_intents} ADD `$field` BINARY DEFAULT NULL");
$db->update("access_intents", array($field => access::DENY), array("item_id" => 1));
$db->update("access_intents", array($field => self::DENY), array("item_id" => 1));
model_cache::clear();
ORM::factory("access_intent")->clear_cache();
}
Expand Down Expand Up @@ -572,7 +572,7 @@ private static function _update_access_non_view_cache($group, $perm_name, $item)
->orderby("level", "ASC")
->find_all();
foreach ($query as $row) {
$value = ($row->$field === access::ALLOW) ? "TRUE" : "FALSE";
$value = ($row->$field === self::ALLOW) ? "TRUE" : "FALSE";
$db->query(
"UPDATE {access_caches} SET `$field` = $value " .
"WHERE `item_id` IN " .
Expand Down

0 comments on commit c9017ae

Please sign in to comment.