<?php
 class vB_Library_Route extends vB_Library { private $alwaysAllowedPrefixes = [ 'help', 'contact-us', 'lostpw', 'reset-password', 'register', 'activateuser', 'activateemail', 'admincp', 'coppa-form', ]; private $excludeFromPageViewPerms = []; public const GUID_HOME = 'vbulletin-4ecbdacd6a4ad0.58738735'; public const GUID_HOME_CLASSIC = 'vbulletin-route-homeclassic-5d5f1629cb5297.17711543'; public const GUID_HOME_COMMUNITY = 'vbulletin-route-homecommunity-5d6039ff5c14d0.86786683'; public const GUID_BLOGS = 'vbulletin-4ecbdacd6aac05.50909926'; public const GUID_ARTICLES = 'vbulletin-r-cmshome5229f999bcb705.52472433'; public const GUID_SOCIALGROUPS = 'vbulletin-4ecbdac93742a5.43676037'; public const GUID_GALLERIES = 'vbulletin-67e5b6a5570bc6.10931199'; protected function __construct() { parent::__construct(); $this->fetchDedupedNamedWhitelistPrefices(); } private function fetchDedupedNamedWhitelistPrefices() : void { $canBeDeduped = [ 'terms-of-service', 'privacy', 'dashboard' ]; foreach ($canBeDeduped AS $__name) { $__check = vB5_Route::getRouteByIdent($__name); if (!empty($__check['prefix'])) { $this->alwaysAllowedPrefixes[] = $__check['prefix']; } else { } } } public function getAlwaysAllowedPrefixes() : array { return $this->alwaysAllowedPrefixes; } public function getPageViewPermissionExcludedPrefixes() : array { if (empty($this->excludeFromPageViewPerms)) { $this->excludeFromPageViewPerms = array_merge($this->alwaysAllowedPrefixes, [ 'editphoto', 'settings', 'uploadmedia', 'blogs', 'social-groups', 'special/css-examples', 'special/api-form', 'special/markup-library', 'pmchat/chat', 'nativo/sponsoredpost', ]); $canBeDeduped = [ 'homeclassic', 'homecommunity', ]; foreach ($canBeDeduped AS $__name) { $__check = vB5_Route::getRouteByIdent($__name); if (!empty($__check['prefix'])) { $this->excludeFromPageViewPerms[] = $__check['prefix']; } else { } } } return $this->excludeFromPageViewPerms; } } 