private static function goToPhraseExistence($phrase, $page, $version) { session_start(); if (!empty($phrase)) { $_SESSION['phrase'] = $phrase; } //prep for redirect if it happens; if (!empty($phrase)) { Feed_ForwardLink_Search::goToNewestWikiRevision($version, $phrase, $page); } if (!empty($_SESSION['phrase'])) { //recover from redirect if it happened $phrase = $_SESSION['phrase']; unset($_SESSION['phrase']); } }
static function wikiView($args) { global $headerlib, $_REQUEST; $page = $args['object']; $version = $args['version']; $headerlib->add_jsfile('vendor/rangy/rangy/uncompressed/rangy-core.js')->add_jsfile('vendor/rangy/rangy/uncompressed/rangy-cssclassapplier.js')->add_jsfile('vendor/rangy/rangy/uncompressed/rangy-selectionsaverestore.js')->add_jsfile('lib/rangy_tiki/rangy-phraser.js')->add_jsfile('lib/ZeroClipboard.js')->add_jsfile('lib/core/JisonParser/Phraser.js')->add_jsfile('vendor/jquery/md5/md5.js'); $me = new Feed_ForwardLink($page); $phrase = !empty($_REQUEST['phrase']) ? $_REQUEST['phrase'] : ''; Feed_ForwardLink_Search::goToNewestWikiRevision($version, $phrase); Feed_ForwardLink_Search::restoreForwardLinkPhrasesInWikiPage($me->getItems(), $phrase); $me->editInterfaces(); $me->createTextLinksInterface(); }