Conditions | 4 |
Paths | 3 |
Total Lines | 27 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function preProcess() { |
||
23 | global $PRE; |
||
24 | global $TEXT; |
||
25 | global $INPUT; |
||
26 | global $ID; |
||
27 | global $ACT; |
||
28 | |||
29 | $opts = array( |
||
30 | 'id' => $ID, |
||
31 | 'preact' => $ACT |
||
32 | ); |
||
33 | //get section name when coming from section edit |
||
34 | if($INPUT->has('hid')) { |
||
35 | // Use explicitly transmitted header id |
||
36 | $opts['fragment'] = $INPUT->str('hid'); |
||
37 | } else if($PRE && preg_match('/^\s*==+([^=\n]+)/', $TEXT, $match)) { |
||
38 | // Fallback to old mechanism |
||
39 | $check = false; //Byref |
||
40 | $opts['fragment'] = sectionID($match[0], $check); |
||
41 | } |
||
42 | |||
43 | // execute the redirect |
||
44 | trigger_event('ACTION_SHOW_REDIRECT', $opts, array($this, 'redirect')); |
||
45 | |||
46 | // should never be reached |
||
47 | throw new ActionAbort(); |
||
48 | } |
||
49 | |||
65 |