5 var $params = array () ;
7 function setVal ( $key , &$value ) {
8 $this->param
[strtolower($key)] = $value ;
11 function getVal ( $key , $default = "" ) {
12 $key = strtolower ( $key ) ;
13 if ( isset ( $this->params
[$key] ) ) {
14 return $this->params
[$key] ;
19 function performAction ( $action , &$output , &$article , &$title , &$user , &$request ) {
22 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
36 case 'deletetrackback':
44 if( !$this->getVal('EnableDublinCoreRdf') ) {
45 wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) );
47 require_once( 'includes/Metadata.php' );
48 wfDublinCoreRdf( $article );
51 case 'creativecommons':
52 if( !$this->getVal('EnableCreativeCommonsRdf') ) {
53 wfHttpError( 403, 'Forbidden', wfMsg('nocreativecommons') );
55 require_once( 'includes/Metadata.php' );
56 wfCreativeCommonsRdf( $article );
60 require_once( 'includes/Credits.php' );
61 showCreditsPage( $article );
64 if( !$this->getVal('CommandLineMode') && !$request->checkSessionCookie() ) {
65 # Send a cookie so anons get talk message notifications
70 $internal = $request->getVal( 'internaledit' );
71 $external = $request->getVal( 'externaledit' );
72 $section = $request->getVal( 'section' );
73 $oldid = $request->getVal( 'oldid' );
74 if(!$this->getVal('UseExternalEditor') ||
$action=='submit' ||
$internal ||
75 $section ||
$oldid ||
(!$user->getOption('externaleditor') && !$external)) {
76 require_once( 'includes/EditPage.php' );
77 $editor = new EditPage( $article );
79 } elseif($this->getVal('UseExternalEditor') && ($external ||
$user->getOption('externaleditor'))) {
80 require_once( 'includes/ExternalEdit.php' );
81 $mode = $request->getVal( 'mode' );
82 $extedit = new ExternalEdit( $article, $mode );
87 if ($_SERVER['REQUEST_URI'] == $title->getInternalURL('action=history')) {
88 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
90 require_once( 'includes/PageHistory.php' );
91 $history = new PageHistory( $article );
95 require_once( 'includes/RawPage.php' );
96 $raw = new RawPage( $article );
100 if (wfRunHooks('UnknownAction', array($action, $article))) {
101 $output->errorpage( 'nosuchaction', 'nosuchactiontext' );
106 } ; # End of class MediaWiki