From 444b3b8b84f950dc48b7394cf433e45f60716794 Mon Sep 17 00:00:00 2001 From: Arne Heizmann Date: Fri, 9 Apr 2004 10:29:54 +0000 Subject: [PATCH] Make code infinitely more readable and understandable by seizing use of a pointless, confusing and error-prone feature of PHP. --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 9793044043..608bbaca91 100644 --- a/index.php +++ b/index.php @@ -80,7 +80,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { if ( Namespace::getMedia() == $wgTitle->getNamespace() ) { $wgTitle = Title::makeTitle( Namespace::getImage(), $wgTitle->getDBkey() ); } - + switch( $wgTitle->getNamespace() ) { case NS_IMAGE: include_once( "ImagePage.php" ); @@ -94,7 +94,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { switch( $action ) { case "view": $wgOut->setSquidMaxage( $wgSquidMaxage ); - $wgArticle->$action(); + $wgArticle->view(); break; case "watch": case "unwatch": @@ -103,7 +103,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { case "rollback": case "protect": case "unprotect": - $wgArticle->$action(); + $wgArticle->unprotect(); break; case "print": $wgArticle->view(); @@ -131,7 +131,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { } include_once( "EditPage.php" ); $editor = new EditPage( $wgArticle ); - $editor->$action(); + $editor->submit(); break; case "history": if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) { -- 2.20.1