From: Leo Koppelkamm Date: Mon, 11 Jul 2011 10:57:01 +0000 (+0000) Subject: Add action-* class to body. Bug 4438. Based on patch by Subfader X-Git-Tag: 1.31.0-rc.0~28937 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=3ac572698587542c23d17cbd4fcb9f1220aaa334;p=lhc%2Fweb%2Fwiklou.git Add action-* class to body. Bug 4438. Based on patch by Subfader --- diff --git a/includes/Skin.php b/includes/Skin.php index 2f2cc5cf94..639d8d456e 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -473,6 +473,7 @@ abstract class Skin { * @return String */ function getPageClasses( $title ) { + global $wgRequest; $numeric = 'ns-' . $title->getNamespace(); if ( $title->getNamespace() == NS_SPECIAL ) { @@ -491,8 +492,13 @@ abstract class Skin { } $name = Sanitizer::escapeClass( 'page-' . $title->getPrefixedText() ); - - return "$numeric $type $name"; + + if ( $wgRequest->getVal('action') ) { + $action = 'action-' . $wgRequest->getVal('action'); + } else { + $action = 'action-view'; + } + return "$numeric $type $name $action"; } /**