You are here Home > Know-how > MediaWiki - CMS > Include Files (PHP) > includes/EditPage.php
MediaWiki - CMS
 

8.4.2 includes/EditPage.php

15.06.2007
8.4.1 includes/DefaultSettings.php [  up  ] - [ A - Z ] - [ top ] 8.4.3 includes/MimeMagic.php

8.1   Own MediaWiki Extension
8.2   Caching
8.2.1   eAccelerator
8.3   Upload Large Files
8.4   Include Files (PHP)
8.4.1   includes/DefaultSettings.php
8.4.2   includes/EditPage.php
8.4.3   includes/MimeMagic.php
8.4.4   includes/SpecialFoo.php
8.4.5   includes/SpecialPreferences.php
8.4.6   includes/SpecialUpload.php
8.4.7   includes/UserMailer.php
8.5   Interfaces / API's
8.5.1   Perl Interface
8.5.1.1   WWW::Mediawiki::Client
8.5.1.2   CMS::MediaWiki (Perl Module)
8.5.2   XML Stuff
8.5.3   PHP related
8.6   KnowledgeTree (DMS)
8.7   Security
8.8   Single Sign On
8.9   MySQL Database

Important

Prevent publishing from anonymous users

Edit file /var/www/html/wiki/includes/EditPage.php:

MediaWiki Release: 1.5.3

Status "User Not Logged In"

In function editForm(...


if ( 'save' == $formtype ) {
        # -- No anonymous users
        if ( $wgUser->isAnon() ) {
                $this->userNotLoggedInPage();
                return;
        }

How to prevent publishing from users not e-mail confirmed

Status "User is not Email Confirmed"

In function editForm(...

if ( 'save' == $formtype ) {
        # -- Not e-mail confirmed
        if ( !$wgUser->isEmailConfirmed() ) {
                $this->userNotConfirmedPage();
                return;
        }

You will have to add this function in EditPage.php as well:

...

        function userNotConfirmedPage() {
                global $wgOut;

                $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) );
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
                $wgOut->setArticleRelated( false );

                $wgOut->addWikiText( wfMsg( 'blockedtitle' ) );
                $wgOut->returnToMain( false );
        }
...

Special Note on WikiSysop

You had to make this sql update if you need WikiSysop can update pages after this patch:

mysql> UPDATE foo_user SET user_email_authenticated=20051128163934, user_email='reto@example.com' WHERE user_name='WikiSysop';


8.4.1 includes/DefaultSettings.php       A - Z Index       Top       Disclaimer       8.4.3 includes/MimeMagic.php


$Id: includes-EditPage.html,v 1.85 2007/06/15 11:49:14 webcms Exp $
copyright © 2005-2007 by reto