Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php |
— | — | @@ -54,18 +54,18 @@ |
55 | 55 | $dbw->begin(); |
56 | 56 | $good = true; |
57 | 57 | |
58 | | - $signs = wfMsgForContent('newusermessage-signs'); |
59 | | - if (!wfEmptyMsg('newusermessage-signs', $signs)) { |
60 | | - $pattern = '/^\* ?(.*?)$/m'; |
61 | | - preg_match_all($pattern, $signs, $signsList, PREG_SET_ORDER); |
62 | | - $rand = rand(0, count($signsList)-1); |
63 | | - $sign = $signsList[$rand][1]; |
| 58 | + $signatures = wfMsgForContent('newusermessage-signatures'); |
| 59 | + if (!wfEmptyMsg('newusermessage-signatures', $signatures)) { |
| 60 | + $pattern = '/^\* ?(.*?)$/m'; |
| 61 | + preg_match_all($pattern, $signatures, $signaturesList, PREG_SET_ORDER); |
| 62 | + $rand = rand(0, count($signaturesList)-1); |
| 63 | + $signature = $signaturesList[$rand][1]; |
64 | 64 | } |
65 | 65 | try { |
66 | | - if (!wfEmptyMsg('newusermessage-signs', $signs)) { |
67 | | - $article->doEdit("{{{$templateTitleText}|$name}}\n--" . $sign . "~~~~~" , wfMsgForContent( 'newuseredit-summary' ), $flags); |
| 66 | + if (!wfEmptyMsg('newusermessage-signatures', $signatures)) { |
| 67 | + $article->doEdit("{{{$templateTitleText}|$name}}\n--" . $signature . "~~~~~" , wfMsgForContent( 'newuseredit-summary' ), $flags); |
68 | 68 | } else { |
69 | | - $article->doEdit("{{{$templateTitleText}|$name}}", wfMsgForContent( 'newuseredit-summary' ), $flags); |
| 69 | + $article->doEdit("{{{$templateTitleText}|$name}}", wfMsgForContent( 'newuseredit-summary' ), $flags); |
70 | 70 | } |
71 | 71 | } catch ( DBQueryError $e ) { |
72 | 72 | $good = false; |