Пример #1
0
 /**
  * Add a set of restrictions to any following queries to restrict access only to items
  * viewable by the active user.
  * @chainable
  */
 public function viewable()
 {
     $this->join("items", "items.id", "comments.item_id");
     return item::viewable($this);
 }
Пример #2
0
 /**
  * Add a set of restrictions to any following queries to restrict access only to items
  * viewable by the active user.
  * @chainable
  */
 public function viewable()
 {
     return item::viewable($this);
 }
Пример #3
0
 public function get_thumb_link($item)
 {
     if ($item->is_album()) {
         return "";
     }
     if (item::viewable($item)) {
         if (access::can("view_full", $item)) {
             $direct_link = $item->file_url();
         } else {
             $direct_link = $item->resize_url();
         }
         return '<a title="' . $this->get_item_title($item) . '" style="display: none;" class="g-sb-preview" rel="g-preview" href="' . $direct_link . '">&nbsp;</a>';
     } else {
         return "";
     }
 }