Index: trunk/extensions/SocialProfile/UserRelationship/SpecialAddRelationship.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | * @param $params Mixed: parameter(s) passed to the page or null |
29 | 29 | */ |
30 | 30 | public function execute( $params ) { |
31 | | - global $wgUser, $wgOut, $wgRequest, $wgUploadPath, $wgUserRelationshipScripts; |
| 31 | + global $wgUser, $wgOut, $wgRequest, $wgUserRelationshipScripts; |
32 | 32 | |
33 | 33 | // Can't use $this->setHeaders(); here because then it'll set the page |
34 | 34 | // title to <removerelationship> and we don't want that, we'll be |
— | — | @@ -105,14 +105,12 @@ |
106 | 106 | } |
107 | 107 | |
108 | 108 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
109 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
110 | | - $avatar->getAvatarImage() . '" alt="" border="0" />'; |
111 | 109 | |
112 | 110 | $out = ''; |
113 | 111 | $wgOut->setPageTitle( wfMsg( 'ur-error-title' ) ); |
114 | 112 | |
115 | 113 | $out .= "<div class=\"relationship-action\"> |
116 | | - {$avatar_img} |
| 114 | + {$avatar->getAvatarURL()} |
117 | 115 | " . $error . " |
118 | 116 | <div class=\"relationship-buttons\"> |
119 | 117 | <input type=\"button\" class=\"site-button\" value=\"" . wfMsg( 'ur-main-page' ) . "\" size=\"20\" onclick=\"window.location='index.php?title=" . wfMsgForContent( 'mainpage' ) . "'\"/> |
— | — | @@ -132,13 +130,11 @@ |
133 | 131 | } |
134 | 132 | |
135 | 133 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
136 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
137 | | - $avatar->getAvatarImage() . '" alt="" border="0" />'; |
138 | 134 | |
139 | 135 | $out = ''; |
140 | 136 | $wgOut->setPageTitle( wfMsg( 'ur-add-error-message-pending-request-title' ) ); |
141 | 137 | $out .= "<div class=\"relationship-action\"> |
142 | | - {$avatar_img} |
| 138 | + {$avatar->getAvatarURL()} |
143 | 139 | " . $error . " |
144 | 140 | <div class=\"relationship-buttons\"> |
145 | 141 | <input type=\"button\" class=\"site-button\" value=\"" . wfMsg( 'ur-main-page' ) . "\" size=\"20\" onclick=\"window.location='index.php?title=" . wfMsgForContent( 'mainpage' ) . "'\"/> |
— | — | @@ -179,8 +175,6 @@ |
180 | 176 | $rel = $rel->addRelationshipRequest( $this->user_name_to, $this->relationship_type, $wgRequest->getVal( 'message' ) ); |
181 | 177 | |
182 | 178 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
183 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
184 | | - $avatar->getAvatarImage() . '" alt="" border="0" />'; |
185 | 179 | |
186 | 180 | $out = ''; |
187 | 181 | |
— | — | @@ -193,7 +187,7 @@ |
194 | 188 | } |
195 | 189 | |
196 | 190 | $out .= "<div class=\"relationship-action\"> |
197 | | - {$avatar_img} |
| 191 | + {$avatar->getAvatarURL()} |
198 | 192 | " . $sent . " |
199 | 193 | <div class=\"relationship-buttons\"> |
200 | 194 | <input type=\"button\" class=\"site-button\" value=\"" . wfMsg( 'ur-main-page' ) . "\" size=\"20\" onclick=\"window.location='index.php?title=" . wfMsgForContent( 'mainpage' ) . "'\"/> |
— | — | @@ -215,7 +209,7 @@ |
216 | 210 | * @return $form Mixed: HTML code for the form |
217 | 211 | */ |
218 | 212 | function displayForm() { |
219 | | - global $wgOut, $wgUploadPath; |
| 213 | + global $wgOut; |
220 | 214 | |
221 | 215 | if ( $this->relationship_type == 1 ) { |
222 | 216 | $wgOut->setPageTitle( wfMsg( 'ur-add-title-friend', $this->user_name_to ) ); |
— | — | @@ -228,12 +222,10 @@ |
229 | 223 | } |
230 | 224 | |
231 | 225 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
232 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
233 | | - $avatar->getAvatarImage() . '" alt="" border="0" />'; |
234 | 226 | |
235 | 227 | $form = "<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" name=\"form1\"> |
236 | 228 | <div class=\"relationship-action\"> |
237 | | - {$avatar_img} |
| 229 | + {$avatar->getAvatarURL()} |
238 | 230 | " . $add . |
239 | 231 | '<div class="cleared"></div> |
240 | 232 | </div> |
Index: trunk/extensions/SocialProfile/UserRelationship/SpecialRemoveRelationship.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | * @param $params Mixed: parameter(s) passed to the page or null |
28 | 28 | */ |
29 | 29 | public function execute( $params ) { |
30 | | - global $wgUser, $wgOut, $wgRequest, $wgUploadPath, $wgUserRelationshipScripts; |
| 30 | + global $wgUser, $wgOut, $wgRequest, $wgUserRelationshipScripts; |
31 | 31 | |
32 | 32 | // Can't use $this->setHeaders(); here because then it'll set the page |
33 | 33 | // title to <removerelationship> and we don't want that, we'll be |
— | — | @@ -65,8 +65,8 @@ |
66 | 66 | $out = ''; |
67 | 67 | if ( $wgUser->getID() == $this->user_id_to ) { |
68 | 68 | $wgOut->setPageTitle( wfMsg( 'ur-error-title' ) ); |
69 | | - $out .= '<div class="relationship-error-message">' |
70 | | - . wfMsg( 'ur-remove-error-message-remove-yourself' ) . |
| 69 | + $out .= '<div class="relationship-error-message">' . |
| 70 | + wfMsg( 'ur-remove-error-message-remove-yourself' ) . |
71 | 71 | '</div> |
72 | 72 | <div> |
73 | 73 | <input type="button" class="site-button" value="' . wfMsg( 'ur-main-page' ) . '" size="20" onclick=\'window.location="index.php?title=' . wfMsgForContent( 'mainpage' ) . '"\' />'; |
— | — | @@ -129,12 +129,11 @@ |
130 | 130 | $this->relationship_type |
131 | 131 | ); |
132 | 132 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
133 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
134 | | - $avatar->getAvatarImage() . '" alt="" border="" />'; |
135 | 133 | |
136 | 134 | $wgOut->setPageTitle( $confirmTitle ); |
| 135 | + |
137 | 136 | $out .= "<div class=\"relationship-action\"> |
138 | | - {$avatar_img}" . |
| 137 | + {$avatar->getAvatarURL()}" . |
139 | 138 | $confirmMsg . |
140 | 139 | "<div class=\"relationship-buttons\"> |
141 | 140 | <input type=\"button\" class=\"site-button\" value=\"" . wfMsg( 'ur-main-page' ) . "\" size=\"20\" onclick=\"window.location='index.php?title=" . wfMsgForContent( 'mainpage' ) . "'\"/> |
— | — | @@ -157,11 +156,9 @@ |
158 | 157 | * @return $form Mixed: HTML code for the form |
159 | 158 | */ |
160 | 159 | function displayForm() { |
161 | | - global $wgOut, $wgUploadPath; |
| 160 | + global $wgOut; |
162 | 161 | |
163 | 162 | $avatar = new wAvatar( $this->user_id_to, 'l' ); |
164 | | - $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . |
165 | | - $avatar->getAvatarImage() . '" alt="avatar" />'; |
166 | 163 | |
167 | 164 | if ( $this->relationship_type == 1 ) { |
168 | 165 | $title = wfMsg( 'ur-remove-relationship-title-friend', $this->user_name_to ); |
— | — | @@ -174,7 +171,7 @@ |
175 | 172 | |
176 | 173 | $form = "<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" name=\"form1\"> |
177 | 174 | <div class=\"relationship-action\"> |
178 | | - {$avatar_img}" . |
| 175 | + {$avatar->getAvatarURL()}" . |
179 | 176 | $remove . |
180 | 177 | '<div class="relationship-buttons"> |
181 | 178 | <input type="hidden" name="user" value="' . addslashes( $this->user_name_to ) . '" /> |