@@ -824,37 +824,37 @@ public function update_profile($id, $info, $section)
824824
825825 case 'display ' :
826826 {
827- $ form = array (
828- 'disp_topics ' => intval (Input::post ('form_disp_topics ' )),
829- 'disp_posts ' => intval (Input::post ('form_disp_posts ' )),
827+ $ prefs = array (
828+ 'disp.topics ' => intval (Input::post ('form_disp_topics ' )),
829+ 'disp.posts ' => intval (Input::post ('form_disp_posts ' )),
830830 'show_smilies ' => Input::post ('form_show_smilies ' ) ? '1 ' : '0 ' ,
831831 'show_img ' => Input::post ('form_show_img ' ) ? '1 ' : '0 ' ,
832832 'show_img_sig ' => Input::post ('form_show_img_sig ' ) ? '1 ' : '0 ' ,
833833 'show_avatars ' => Input::post ('form_show_avatars ' ) ? '1 ' : '0 ' ,
834834 'show_sig ' => Input::post ('form_show_sig ' ) ? '1 ' : '0 ' ,
835835 );
836836
837- if ($ form [ ' disp_topics ' ] != '' ) {
838- if ($ form [ ' disp_topics ' ] < 3 ) {
839- $ form [ ' disp_topics ' ] = 3 ;
840- } elseif ($ form [ ' disp_topics ' ] > 75 ) {
841- $ form [ ' disp_topics ' ] = 75 ;
837+ if ($ prefs [ ' disp.topics ' ] != '' ) {
838+ if ($ prefs [ ' disp.topics ' ] < 3 ) {
839+ $ prefs [ ' disp.topics ' ] = 3 ;
840+ } elseif ($ prefs [ ' disp.topics ' ] > 75 ) {
841+ $ prefs [ ' disp.topics ' ] = 75 ;
842842 }
843843 }
844844
845- if ($ form [ ' disp_posts ' ] != '' ) {
846- if ($ form [ ' disp_posts ' ] < 3 ) {
847- $ form [ ' disp_posts ' ] = 3 ;
848- } elseif ($ form [ ' disp_posts ' ] > 75 ) {
849- $ form [ ' disp_posts ' ] = 75 ;
845+ if ($ prefs [ ' disp.posts ' ] != '' ) {
846+ if ($ prefs [ ' disp.posts ' ] < 3 ) {
847+ $ prefs [ ' disp.posts ' ] = 3 ;
848+ } elseif ($ prefs [ ' disp.posts ' ] > 75 ) {
849+ $ prefs [ ' disp.posts ' ] = 75 ;
850850 }
851851 }
852852
853853 // Make sure we got a valid style string
854854 if (Input::post ('form_style ' )) {
855855 $ styles = \FeatherBB \Core \Lister::getStyles ();
856- $ form ['style ' ] = Utils::trim (Input::post ('form_style ' ));
857- if (!in_array ($ form ['style ' ], $ styles )) {
856+ $ prefs ['style ' ] = Utils::trim (Input::post ('form_style ' ));
857+ if (!in_array ($ prefs ['style ' ], $ styles )) {
858858 throw new Error (__ ('Bad request ' ), 404 );
859859 }
860860 }
@@ -998,7 +998,7 @@ public function update_profile($id, $info, $section)
998998
999999 public function get_user_info ($ id )
10001000 {
1001- $ user ['select ' ] = array ('u.id ' , 'u.username ' , 'u.email ' , 'u.title ' , 'u.realname ' , 'u.url ' , 'u.location ' , 'u.signature ' , 'u.disp_topics ' , ' u.disp_posts ' , ' u. email_setting ' , 'u.notify_with_post ' , 'u.auto_notify ' , 'u.show_img ' , 'u.show_img_sig ' , 'u.show_avatars ' , 'u.show_sig ' , 'u.num_posts ' , 'u.last_post ' , 'u.registered ' , 'u.registration_ip ' , 'u.admin_note ' , 'u.last_visit ' , 'g.g_id ' , 'g.g_user_title ' , 'g.g_moderator ' );
1001+ $ user ['select ' ] = array ('u.id ' , 'u.username ' , 'u.email ' , 'u.title ' , 'u.realname ' , 'u.url ' , 'u.location ' , 'u.signature ' , 'u.email_setting ' , 'u.notify_with_post ' , 'u.auto_notify ' , 'u.show_img ' , 'u.show_img_sig ' , 'u.show_avatars ' , 'u.show_sig ' , 'u.num_posts ' , 'u.last_post ' , 'u.registered ' , 'u.registration_ip ' , 'u.admin_note ' , 'u.last_visit ' , 'g.g_id ' , 'g.g_user_title ' , 'g.g_moderator ' );
10021002
10031003 $ user = DB ::for_table ('users ' )
10041004 ->table_alias ('u ' )
0 commit comments