@@ -256,28 +256,24 @@ public function action($req, $res, $args)
256256 return $ this ->model ->change_pass ($ args ['id ' ]);
257257 }
258258
259- View::setPageInfo (array (
260- 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Change pass ' )),
261- 'active_page ' => 'profile ' ,
262- 'id ' => $ args ['id ' ],
263- 'focus_element ' => array ('change_pass ' , ((!User::get ()->is_admmod ) ? 'req_old_password ' : 'req_new_password1 ' )),
264- ));
265-
266- View::addTemplate ('profile/change_pass.php ' )->display ();
259+ return View::setPageInfo (array (
260+ 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Change pass ' )),
261+ 'active_page ' => 'profile ' ,
262+ 'id ' => $ args ['id ' ]
263+ )
264+ )->addTemplate ('profile/change_pass.php ' )->display ();
267265
268266 } elseif ($ args ['action ' ] == 'change_email ' ) {
269267 if (Request::isPost ()) {
270268 return $ this ->model ->change_email ($ args ['id ' ]);
271269 }
272270
273- View::setPageInfo (array (
274- 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Change email ' )),
275- 'active_page ' => 'profile ' ,
276- 'focus_element ' => array ('change_email ' , 'req_new_email ' ),
277- 'id ' => $ args ['id ' ],
278- ));
279-
280- View::addTemplate ('profile/change_mail.php ' )->display ();
271+ return View::setPageInfo (array (
272+ 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Change email ' )),
273+ 'active_page ' => 'profile ' ,
274+ 'id ' => $ args ['id ' ],
275+ )
276+ )->addTemplate ('profile/change_mail.php ' )->display ();
281277
282278 } elseif ($ args ['action ' ] == 'upload_avatar ' || $ args ['action ' ] == 'upload_avatar2 ' ) {
283279 if (ForumSettings::get ('o_avatars ' ) == '0 ' ) {
@@ -292,14 +288,12 @@ public function action($req, $res, $args)
292288 return $ this ->model ->upload_avatar ($ args ['id ' ], $ _FILES );
293289 }
294290
295- View::setPageInfo (array (
296- 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Upload avatar ' )),
297- 'active_page ' => 'profile ' ,
298- 'focus_element ' => array ('upload_avatar ' , 'req_file ' ),
299- 'id ' => $ args ['id ' ],
300- ));
301-
302- View::addTemplate ('profile/upload_avatar.php ' )->display ();
291+ return View::setPageInfo (array (
292+ 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Profile ' ), __ ('Upload avatar ' )),
293+ 'active_page ' => 'profile ' ,
294+ 'id ' => $ args ['id ' ],
295+ )
296+ )->addTemplate ('profile/upload_avatar.php ' )->display ();
303297
304298 } elseif ($ args ['action ' ] == 'delete_avatar ' ) {
305299 if (User::get ()->id != $ args ['id ' ] && !User::get ()->is_admmod ) {
@@ -346,7 +340,6 @@ public function email($req, $res, $args)
346340 View::setPageInfo (array (
347341 'title ' => array (Utils::escape (ForumSettings::get ('o_board_title ' )), __ ('Send email to ' ).' ' .Utils::escape ($ mail ['recipient ' ])),
348342 'active_page ' => 'email ' ,
349- 'focus_element ' => array ('email ' , 'req_subject ' ),
350343 'id ' => $ args ['id ' ],
351344 'mail ' => $ mail
352345 ))->addTemplate ('misc/email.php ' )->display ();
0 commit comments