confusing and error-prone feature of PHP.
if ( Namespace::getMedia() == $wgTitle->getNamespace() ) {
$wgTitle = Title::makeTitle( Namespace::getImage(), $wgTitle->getDBkey() );
}
-
+
switch( $wgTitle->getNamespace() ) {
case NS_IMAGE:
include_once( "ImagePage.php" );
switch( $action ) {
case "view":
$wgOut->setSquidMaxage( $wgSquidMaxage );
- $wgArticle->$action();
+ $wgArticle->view();
break;
case "watch":
case "unwatch":
case "rollback":
case "protect":
case "unprotect":
- $wgArticle->$action();
+ $wgArticle->unprotect();
break;
case "print":
$wgArticle->view();
}
include_once( "EditPage.php" );
$editor = new EditPage( $wgArticle );
- $editor->$action();
+ $editor->submit();
break;
case "history":
if ($_SERVER["REQUEST_URI"] == $wgTitle->getInternalURL('action=history')) {