diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 21:21:35 -0800 | 
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-06 21:21:35 -0800 | 
| commit | b9dadb77c3c75c6ba6ead293757df440976b3917 (patch) | |
| tree | e0e6a8f30609c07d6c7c5ce58c75ace1145a4772 /modules/gallery | |
| parent | c22bf27cc2b69bc2109b9562cbd1a8f6a9143ef4 (diff) | |
Get rid of unused _method param in the item edit form.
Fix viewable() to properly OR view restrictions together.
Diffstat (limited to 'modules/gallery')
| -rw-r--r-- | modules/gallery/helpers/item.php | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index c3126435..300a6942 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -127,7 +127,6 @@ class item_Core {      $page_type = Input::instance()->get("page_type");      $form = new Forge(        "quick/delete/$item->id?page_type=$page_type", "", "post", array("id" => "g-confirm-delete")); -    $form->hidden("_method")->value("put");      $group = $form->group("confirm_delete")->label(t("Confirm Deletion"));      $group->submit("")->value(t("Delete"));      return $form; @@ -156,7 +155,7 @@ class item_Core {      $view_restrictions = array();      if (!identity::active_user()->admin) {        foreach (identity::group_ids_for_active_user() as $id) { -        $view_restrictions[] = "items.view_$id"; +        $view_restrictions["items.view_$id"] = access::ALLOW;        }      }      switch (count($view_restrictions)) { @@ -168,10 +167,7 @@ class item_Core {        break;      default: -      $model -        ->and_open() -        ->or_where($view_restrictions, "=", access::ALLOW) -        ->close(); +      $model->and_open()->or_where($view_restrictions)->close();        break;      } | 
