1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

14 Commits

Author SHA1 Message Date
Andreas Fischer
42d9edc4f2 [ticket/10495] Update request/type_cast_helper for PHP 5.4 magic_quotes_gpc drop
PHPBB3-10495
2012-02-04 00:57:39 +01:00
Unknown
7a04c9048c [ticket/9916] Updating header license and removing Version $Id$
PHPBB3-9916
2011-12-31 13:32:52 +00:00
Igor Wiedler
fd08cd8dd0 [feature/request-class] Remove $html_encode arg, force manual decoding
PHPBB3-9716
2011-08-18 23:19:48 +02:00
Igor Wiedler
a48889fed8 [feature/request-class] Add is_secure method to request for HTTPS
PHPBB3-9716
2011-08-18 22:26:30 +02:00
Igor Wiedler
24e9fb24d1 [feature/request-class] Make server() use the $html_encode parameter
$request->server() should not auto html-escape values. header() however should.
Also introduce some tests for this behaviour.

Thanks to nn- for catching this.

PHPBB3-9716
2011-08-06 19:47:12 +02:00
Igor Wiedler
76aa24e6b7 [feature/request-class] Minor spacing CS adjustments
PHPBB3-9716
2011-07-16 14:59:52 +02:00
Igor Wiedler
0bf6966c52 [feature/request-class] Add server(), header() and is_ajax() to request
Extend the request class with helpers for reading server vars (server())
and HTTP request headers (header()). Refactor the existing code base
to make use of these helpers, make $_SERVER a deactivated super global.

Also introduce an is_ajax() method, which checks the X-Requested-With
header for the value 'XMLHttpRequest', which is sent by JavaScript
libraries, such as jQuery.

PHPBB3-9716
2011-07-15 22:34:24 +02:00
Igor Wiedler
597311ba6b [feature/request-class] Fix the error message when accessing superglobal
Adjust the misleading "This error message was generated" text.

PHPBB3-9716
2011-02-28 08:04:40 +01:00
Igor Wiedler
55808e11c9 [feature/request-class] Prevent recursive_set_var from applying htmlspecialchars twice
PHPBB3-9716
2010-09-19 15:31:00 +02:00
Igor Wiedler
456de63912 [feature/request-class] Refactor request classes to use autoloading
All class names have been adjusted to use a phpbb_request prefix,
allowing them to be autoloaded.

Also introduces some improvements to autoloading in general.

PHPBB3-9716
2010-09-17 14:08:14 +02:00
Igor Wiedler
b3558b5078 [feature/request-class] Automatically normalize multibyte data in request_var
To save users from having to run everything through
utf8_normalize_nfc(), a call is done automatically from within set_var,
which is called by request_var.

PHPBB3-9716
2010-09-17 14:03:57 +02:00
Nils Adermann
ea919ad8b2 [feature/request-class] Refactored request class and wrapper functions.
The request class
- now makes use of the new type cast helper (dependency injection)
- has no static methods anymore.
- now has a constructor argument to leave super globals turned on

Brought back the set_var function in functions.php. It is now a wrapper
around the type cast helper. It creates an instance on the fly.

The request_var wrapper function now has an optional last argument to
inject the request class instance, rather than abusing the $var_name.

PHPBB3-9716
2010-09-17 14:00:01 +02:00
Nils Adermann
85b6d3b9a1 [feature/request-class] Extracted type casting helpers from the request class.
These methods should be available without having to instantiate a request class
object, better separation of concerns. A set_var wrapper around this class no
longer requires a request object at all.

PHPBB3-9716
2010-09-17 14:00:01 +02:00
Nils Adermann
d7e52ee0f8 [feature/request-class] Adding a request class based on ascraeus-experiment.
The well known request_var function is now a wrapper that calls a method
on a phpbb_request object. The class provides additional functionality.
It can replace all super globals with special objects that throw errors
when being accessed. They still allow isset operations to keep backward
compatibility with isset($_POST['var']) checks. The phpbb_request class
implements the phpbb_request_interface which is available for easy mocking
of input in tests.

PHPBB3-9716
2010-09-17 13:50:09 +02:00