Replace request_var() with $request->variable()

Also this doesn't follow are code guidelines (phpBB guidelines).