From: Arne Heizmann Date: Fri, 9 Apr 2004 10:29:54 +0000 (+0000) Subject: Make code infinitely more readable and understandable by seizing use of a pointless, X-Git-Tag: 1.3.0beta1~529 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=444b3b8b84f950dc48b7394cf433e45f60716794;p=lhc%2Fweb%2Fwiklou.git Make code infinitely more readable and understandable by seizing use of a pointless, confusing and error-prone feature of PHP. --- 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')) {