9deb9ee35b4f39c7d365bfb9fad83dd56c0f5fad
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 setCorrectArticleClass ( &$article , &$title , $namespace ) {
20 // Categories and images are handled by a different class
21 if ( $namespace == NS_IMAGE
) {
23 require_once( 'includes/ImagePage.php' );
24 return new ImagePage( $title );
25 } elseif ( $namespace == NS_CATEGORY
) {
27 require_once( 'includes/CategoryPage.php' );
28 return new CategoryPage( $title );
33 function performAction ( $action , &$output , &$article , &$title , &$user , &$request ) {
36 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
50 case 'deletetrackback':
58 if( !$this->getVal('EnableDublinCoreRdf') ) {
59 wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) );
61 require_once( 'includes/Metadata.php' );
62 wfDublinCoreRdf( $article );
65 case 'creativecommons':
66 if( !$this->getVal('EnableCreativeCommonsRdf') ) {
67 wfHttpError( 403, 'Forbidden', wfMsg('nocreativecommons') );
69 require_once( 'includes/Metadata.php' );
70 wfCreativeCommonsRdf( $article );
74 require_once( 'includes/Credits.php' );
75 showCreditsPage( $article );
78 if( !$this->getVal('CommandLineMode') && !$request->checkSessionCookie() ) {
79 # Send a cookie so anons get talk message notifications
84 $internal = $request->getVal( 'internaledit' );
85 $external = $request->getVal( 'externaledit' );
86 $section = $request->getVal( 'section' );
87 $oldid = $request->getVal( 'oldid' );
88 if(!$this->getVal('UseExternalEditor') ||
$action=='submit' ||
$internal ||
89 $section ||
$oldid ||
(!$user->getOption('externaleditor') && !$external)) {
90 require_once( 'includes/EditPage.php' );
91 $editor = new EditPage( $article );
93 } elseif($this->getVal('UseExternalEditor') && ($external ||
$user->getOption('externaleditor'))) {
94 require_once( 'includes/ExternalEdit.php' );
95 $mode = $request->getVal( 'mode' );
96 $extedit = new ExternalEdit( $article, $mode );
101 if ($_SERVER['REQUEST_URI'] == $title->getInternalURL('action=history')) {
102 $output->setSquidMaxage( $this->getVal('SquidMaxage') );
104 require_once( 'includes/PageHistory.php' );
105 $history = new PageHistory( $article );
109 require_once( 'includes/RawPage.php' );
110 $raw = new RawPage( $article );
114 if (wfRunHooks('UnknownAction', array($action, $article))) {
115 $output->errorpage( 'nosuchaction', 'nosuchactiontext' );
120 } ; # End of class MediaWiki