From e77f54f65bede639b5680b020bea5af99f8402f6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 9 Apr 2004 10:46:28 +0000 Subject: [PATCH] Un-break large number of actions. Timwi, please read http://www.php.net/switch --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 608bbaca91..6a811df6a5 100644 --- a/index.php +++ b/index.php @@ -103,7 +103,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { case "rollback": case "protect": case "unprotect": - $wgArticle->unprotect(); + $wgArticle->$action(); break; case "print": $wgArticle->view(); @@ -131,7 +131,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) { } include_once( "EditPage.php" ); $editor = new EditPage( $wgArticle ); - $editor->submit(); + $editor->$action(); break; case "history": if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) { -- 2.20.1