MediaWiki  REL1_23
EditAction.php
Go to the documentation of this file.
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         $user = $this->getUser();
00047 
00048         if ( wfRunHooks( 'CustomEditor', array( $page, $user ) ) ) {
00049             $editor = new EditPage( $page );
00050             $editor->edit();
00051         }
00052     }
00053 }
00054 
00062 class SubmitAction extends EditAction {
00063 
00064     public function getName() {
00065         return 'submit';
00066     }
00067 
00068     public function show() {
00069         if ( session_id() == '' ) {
00070             // Send a cookie so anons get talk message notifications
00071             wfSetupSession();
00072         }
00073 
00074         parent::show();
00075     }
00076 }