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 , &$user ) {
20 global $wgRequest ; # Unavoidable for now
22 $title = &$article->getTitle() ;
25 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
39 case 'deletetrackback':
47 if( !$this->getVal('EnableDublinCoreRdf') ) {
48 wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) );
50 require_once( 'includes/Metadata.php' );
51 wfDublinCoreRdf( $article );
54 case 'creativecommons':
55 if( !$this->getVal('EnableCreativeCommonsRdf') ) {
56 wfHttpError( 403, 'Forbidden', wfMsg('nocreativecommons') );
58 require_once( 'includes/Metadata.php' );
59 wfCreativeCommonsRdf( $article );
63 require_once( 'includes/Credits.php' );
64 showCreditsPage( $article );
67 if( !$this->getVal('CommandLineMode') && !$wgRequest->checkSessionCookie() ) {
68 # Send a cookie so anons get talk message notifications
73 $internal = $wgRequest->getVal( 'internaledit' );
74 $external = $wgRequest->getVal( 'externaledit' );
75 $section = $wgRequest->getVal( 'section' );
76 $oldid = $wgRequest->getVal( 'oldid' );
77 if(!$this->getVal('UseExternalEditor') ||
$action=='submit' ||
$internal ||
78 $section ||
$oldid ||
(!$user->getOption('externaleditor') && !$external)) {
79 require_once( 'includes/EditPage.php' );
80 $editor = new EditPage( $article );
82 } elseif($this->getVal('UseExternalEditor') && ($external ||
$user->getOption('externaleditor'))) {
83 require_once( 'includes/ExternalEdit.php' );
84 $mode = $wgRequest->getVal( 'mode' );
85 $extedit = new ExternalEdit( $article, $mode );
90 if ($_SERVER['REQUEST_URI'] == $title->getInternalURL('action=history')) {
91 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
93 require_once( 'includes/PageHistory.php' );
94 $history = new PageHistory( $article );
98 require_once( 'includes/RawPage.php' );
99 $raw = new RawPage( $article );
103 if (wfRunHooks('UnknownAction', array($action, $article))) {
104 $output->errorpage( 'nosuchaction', 'nosuchactiontext' );
109 } ; # End of class MediaWiki