$context['content_wrap'] = 'article'; global $render_overlaid; $whole_rendering = !$render_overlaid; if ($render_overlaid) { $context['text'] .= '<div class="hidden require-overlaid"></div>' . "\n"; } // view.php/12/nick name induces no particular processing // sanity check if ($zoom_index < 1) { $zoom_index = 1; } // get the item from the database $item = Articles::get($id); // redirect to another article with a better suitable language, if any if ($item['nick_name']) { Anchors::check_better_lang('article:' . $item['id'], $item['nick_name']); } // get owner profile, if any $owner = array(); if (isset($item['owner_id'])) { $owner = Users::get($item['owner_id']); } // get the related overlay, if any $overlay = NULL; if (isset($item['overlay'])) { $overlay = Overlay::load($item, 'article:' . $item['id']); } // get the related anchor, if any $anchor = NULL; if (isset($item['anchor'])) { $anchor = Anchors::get($item['anchor']);
} elseif (isset($context['arguments'][1]) && isset($context['arguments'][2])) { $zoom_type = $context['arguments'][1]; $zoom_index = $context['arguments'][2]; } // sanity check if ($zoom_index < 1) { $zoom_index = 1; } // get the item from the database $item = Sections::get($id); if (!$item) { Safe::redirect($context['url_to_root'] . 'error.php'); } // redirect to another section with a better suitable language, if any if ($item['nick_name']) { Anchors::check_better_lang('section:' . $item['id'], $item['nick_name']); } // get the related overlay, if any $overlay = NULL; if (isset($item['overlay'])) { $overlay = Overlay::load($item, 'section:' . $item['id']); } // get the overlay for content of this section, if any $content_overlay = NULL; if (isset($item['content_overlay'])) { $content_overlay = Overlay::bind($item['content_overlay']); } $section_overlay = NULL; if (isset($item['section_overlay'])) { $section_overlay = Overlay::bind($item['section_overlay']); }