$behaviors = new Behaviors($item, $anchor); } // change default behavior if (isset($item['id']) && is_object($behaviors) && !$behaviors->allow('articles/view.php', 'article:' . $item['id'])) { $permitted = FALSE; } elseif ($cur_article->allows('access')) { $permitted = TRUE; } else { $permitted = FALSE; } // owners can do what they want if ($cur_article->allows('modification')) { Surfer::empower(); } elseif (Surfer::is_logged() && is_object($anchor) && $anchor->is_assigned()) { Surfer::empower('S'); } elseif (isset($item['id']) && $cur_article->is_assigned() && Surfer::is_logged()) { Surfer::empower('S'); } // is the article on user watch list? $in_watch_list = FALSE; if (isset($item['id']) && Surfer::get_id()) { $in_watch_list = Members::check('article:' . $item['id'], 'user:'******'id']) && !$zoom_type && Surfer::is_empowered() && Versions::count_for_anchor('article:' . $item['id'])) { $has_versions = TRUE; } // load the skin, maybe with a variant load_skin('article', $anchor, isset($item['options']) ? $item['options'] : ''); // clear the tab we are in