$ID, 'preact' => $ACT ); //get section name when coming from section edit if($INPUT->has('hid')) { // Use explicitly transmitted header id $opts['fragment'] = $INPUT->str('hid'); } else if($PRE && preg_match('/^\s*==+([^=\n]+)/', $TEXT, $match)) { // Fallback to old mechanism $check = false; //Byref $opts['fragment'] = sectionID($match[0], $check); } // execute the redirect trigger_event('ACTION_SHOW_REDIRECT', $opts, array($this, 'redirect')); // should never be reached throw new ActionAbort('show'); } /** * Execute the redirect * * Default action for ACTION_SHOW_REDIRECT * * @param array $opts id and fragment for the redirect and the preact */ public function redirect($opts) { $go = wl($opts['id'], '', true); if(isset($opts['fragment'])) $go .= '#' . $opts['fragment']; //show it send_redirect($go); } }