MediaWiki
REL1_21
|
00001 <?php 00034 class EditAction extends FormlessAction { 00035 00036 public function getName() { 00037 return 'edit'; 00038 } 00039 00040 public function onView() { 00041 return null; 00042 } 00043 00044 public function show() { 00045 $page = $this->page; 00046 $request = $this->getRequest(); 00047 $user = $this->getUser(); 00048 $context = $this->getContext(); 00049 00050 if ( wfRunHooks( 'CustomEditor', array( $page, $user ) ) ) { 00051 if ( ExternalEdit::useExternalEngine( $context, 'edit' ) 00052 && $this->getName() == 'edit' && !$request->getVal( 'section' ) 00053 && !$request->getVal( 'oldid' ) ) 00054 { 00055 $extedit = new ExternalEdit( $context ); 00056 $extedit->execute(); 00057 } else { 00058 $editor = new EditPage( $page ); 00059 $editor->edit(); 00060 } 00061 } 00062 00063 } 00064 00065 } 00066 00074 class SubmitAction extends EditAction { 00075 00076 public function getName() { 00077 return 'submit'; 00078 } 00079 00080 public function show() { 00081 if ( session_id() == '' ) { 00082 // Send a cookie so anons get talk message notifications 00083 wfSetupSession(); 00084 } 00085 00086 parent::show(); 00087 } 00088 00089 }