MediaWiki  REL1_22
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 
00055 }
00056 
00064 class SubmitAction extends EditAction {
00065 
00066     public function getName() {
00067         return 'submit';
00068     }
00069 
00070     public function show() {
00071         if ( session_id() == '' ) {
00072             // Send a cookie so anons get talk message notifications
00073             wfSetupSession();
00074         }
00075 
00076         parent::show();
00077     }
00078 
00079 }