Index: trunk/extensions/CustomUserSignup/CustomUserSignup.hooks.php |
— | — | @@ -9,8 +9,9 @@ |
10 | 10 | class CustomUserSignupHooks { |
11 | 11 | |
12 | 12 | public static function userCreateForm( &$template ) { |
13 | | - if( isset( $_GET['campaign'] ) ) { |
14 | | - $campaign = $_GET['campaign']; |
| 13 | + global $wgRequest; |
| 14 | + if( isset( $wgRequest->getVal( 'campaign' ) ) ) { |
| 15 | + $campaign = $wgRequest->getVal( 'campaign' ); |
15 | 16 | $newTemplate; |
16 | 17 | if( get_class( $template ) == 'UserloginTemplate' ) { |
17 | 18 | $newTemplate = new CustomUserloginTemplate(); |
— | — | @@ -43,8 +44,9 @@ |
44 | 45 | } |
45 | 46 | |
46 | 47 | public static function welcomeScreen( &$welcomeCreationMsg, &$injected_html ) { |
47 | | - if( isset( $_GET['campaign'] ) ) { |
48 | | - $campaign = $_GET['campaign']; |
| 48 | + global $wgRequest; |
| 49 | + if( isset( $wgRequest->getVal( 'campaign' ) ) ) { |
| 50 | + $campaign = $wgRequest->getVal( 'campaign' ); |
49 | 51 | |
50 | 52 | if( wfMsg( "customusertemplate-$campaign-welcomecreation" ) != "<customusertemplate-$campaign-welcomecreation>" ) { |
51 | 53 | $welcomeCreationMsg = "customusertemplate-$campaign-welcomecreation"; |
Index: trunk/extensions/CustomUserSignup/CustomUserTemplate.php |
— | — | @@ -5,9 +5,10 @@ |
6 | 6 | protected $campaign = null; |
7 | 7 | |
8 | 8 | function __construct() { |
| 9 | + global $wgRequest; |
9 | 10 | parent::__construct(); |
10 | | - if( isset( $_GET['campaign'] ) ) { |
11 | | - preg_match( '/[A-Za-z0-9]+/', $_GET['campaign'], $matches ); |
| 11 | + if( isset( $wgRequest->getVal( 'campaign' ) ) ) { |
| 12 | + preg_match( '/[A-Za-z0-9]+/', $wgRequest->getVal( 'campaign' ), $matches ); |
12 | 13 | $this->campaign = $matches[0]; |
13 | 14 | } |
14 | 15 | } |
— | — | @@ -45,9 +46,10 @@ |
46 | 47 | protected $campaign = null; |
47 | 48 | |
48 | 49 | function __construct() { |
| 50 | + global $wgRequest; |
49 | 51 | parent::__construct(); |
50 | | - if( isset( $_GET['campaign'] ) ) { |
51 | | - preg_match( '/[A-Za-z0-9]+/', $_GET['campaign'], $matches ); |
| 52 | + if( isset( $wgRequest->getVal( 'campaign' ) ) ) { |
| 53 | + preg_match( '/[A-Za-z0-9]+/', $wgRequest->getVal( 'campaign' ), $matches ); |
52 | 54 | $this->campaign = $matches[0]; |
53 | 55 | } |
54 | 56 | } |