getUser() ) { $username = $context->getUser(); $pages = array( "User:$username/common.js" => array( 'type' => 'script' ), "User:$username/" . $context->getSkin() . '.js' => array( 'type' => 'script' ), "User:$username/common.css" => array( 'type' => 'style' ), "User:$username/" . $context->getSkin() . '.css' => array( 'type' => 'style' ), ); // Hack for bug 26283: if we're on a preview page for a CSS/JS page, // we need to exclude that page from this module. In that case, the excludepage // parameter will be set to the name of the page we need to exclude. $excludepage = $context->getRequest()->getVal( 'excludepage' ); if ( isset( $pages[$excludepage] ) ) { unset( $pages[$excludepage] ); } return $pages; } return array(); } /* Methods */ /** * @return string */ public function getGroup() { return 'user'; } }