equal
deleted
inserted
replaced
57 $_GET['do'] = 'view'; |
57 $_GET['do'] = 'view'; |
58 } |
58 } |
59 switch($_GET['do']) |
59 switch($_GET['do']) |
60 { |
60 { |
61 default: |
61 default: |
62 die_friendly('Invalid action', '<p>The action "'.htmlspecialchars($_GET['do']).'" is not defined. Return to <a href="'.makeUrl($paths->page).'">viewing this page\'s text</a>.</p>'); |
62 $code = $plugins->setHook('page_action'); |
|
63 ob_start(); |
|
64 foreach ( $code as $cmd ) |
|
65 { |
|
66 eval($cmd); |
|
67 } |
|
68 if ( $contents = ob_get_contents() ) |
|
69 { |
|
70 ob_end_clean(); |
|
71 echo $contents; |
|
72 } |
|
73 else |
|
74 { |
|
75 die_friendly('Invalid action', '<p>The action "'.htmlspecialchars($_GET['do']).'" is not defined. Return to <a href="'.makeUrl($paths->page).'">viewing this page\'s text</a>.</p>'); |
|
76 } |
63 break; |
77 break; |
64 case 'view': |
78 case 'view': |
65 // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); |
79 // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false )); |
66 $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 ); |
80 $rev_id = ( (isset($_GET['oldid'])) ? intval($_GET['oldid']) : 0 ); |
67 $page = new PageProcessor( $paths->page_id, $paths->namespace, $rev_id ); |
81 $page = new PageProcessor( $paths->page_id, $paths->namespace, $rev_id ); |