1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 10:39:19 +02:00

10002 Commits

Author SHA1 Message Date
Igor Wiedler
986935c474 [feature/request-class] Adjust some trailing newlines
PHPBB3-9716
2010-09-27 22:50:25 +02:00
Igor Wiedler
c09bdb6c55 [feature/request-class] Remove tricky $_* is_array from acp_profile
PHPBB3-9716
2010-09-25 20:35:07 +02:00
Igor Wiedler
fccd7f0ab5 [feature/request-class] Convert any direct access to $_* to use $request
PHPBB3-9716
2010-09-25 20:32:15 +02:00
Igor Wiedler
15883dfac2 [feature/request-class] Add $request to style.php, minor change
Add $request instantiation to style.php to allow request_var to
work properly.

Also remove unneeded globalization of $request in ucp.php.

PHPBB3-9716
2010-09-20 18:52:08 +02: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
204ee4714b [feature/request-class] Removal of direct access to some superglobals
PHPBB3-9716
2010-09-17 14:08:41 +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
0ae7df8a51 [feature/request-class] Request class test now uses a type cast helper mock.
Removed the dependency of the request class test on having an actual
phpbb_type_cast_helper instance, by replacing it with an object mocking
the phpbb_type_cast_helper_interface.

PHPBB3-9716
2010-09-17 14:03:47 +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
6beeda79eb [feature/request-class] Replace direct use of GET/REQUEST with request_var.
Now with $_VARs causing fatal errors we should really be able to find and
delete all of these occurances.

PHPBB3-9716
2010-09-17 14:00:01 +02:00
Nils Adermann
76e530196b [feature/request-class] Use the request class in the installer & updater.
Just like common.php database_update.php and install/index.php need to
include the request class files and create an instance for use in
request_var.

PHPBB3-9716
2010-09-17 13:59:57 +02:00
Nils Adermann
d87d9d96b2 [feature/request-class] request_var should return after setting the request object.
If the "dependency injection" mechanism is used there should not be any regular
computation of a result value. request_var has to return immediately.

PHPBB3-9716
2010-09-17 13:51:31 +02:00
Nils Adermann
99a3adfba7 [feature/request-class] Instantiate a global request class instance.
It should at all cost be avoided to rely on this global variable.
Instead either use the request_var method (deprecated) or pass the
instance to your function as a parameter or to your object as a
contructor argument or through a setter function.

PHPBB3-9716
2010-09-17 13:50:36 +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
Igor Wiedler
cdadda3554 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9091] Extract IPv4 address from addresses mapped into IPv6.
2010-09-16 23:39:01 +02:00
Igor Wiedler
41245f9f7a Merge branch 'ticket/bantu/9091' into develop-olympus
* ticket/bantu/9091:
  [ticket/9091] Extract IPv4 address from addresses mapped into IPv6.
2010-09-16 23:38:50 +02:00
Igor Wiedler
e35711ddde Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9609] Change header() calls setting HTTP status to send_status_line().
  [ticket/9613] Slightly update language strings.
  [ticket/9613] Fix missing database part for unread posts search load switch.
  [ticket/9613] Implement a load switch for unread posts search feature.
  [ticket/9785] Allow users to request new passwords when board is disabled.
  [ticket/9644] Check $mode before calling user_notification() from submit_post()
2010-09-16 22:42:32 +02:00
Igor Wiedler
46810f8747 Merge branch 'ticket/bantu/9644' into develop-olympus
* ticket/bantu/9644:
  [ticket/9644] Check $mode before calling user_notification() from submit_post()
2010-09-16 22:42:07 +02:00
Igor Wiedler
9015e03d05 Merge branch 'ticket/bantu/9613' into develop-olympus
* ticket/bantu/9613:
  [ticket/9613] Slightly update language strings.
  [ticket/9613] Fix missing database part for unread posts search load switch.
  [ticket/9613] Implement a load switch for unread posts search feature.
2010-09-16 22:34:48 +02:00
Igor Wiedler
3465c5e48d Merge branch 'ticket/bantu/9785' into develop-olympus
* ticket/bantu/9785:
  [ticket/9785] Allow users to request new passwords when board is disabled.
2010-09-16 22:29:18 +02:00
Igor Wiedler
6b5d5e1f63 Merge branch 'ticket/bantu/9609' into develop-olympus
* ticket/bantu/9609:
  [ticket/9609] Change header() calls setting HTTP status to send_status_line().
2010-09-16 22:24:49 +02:00
Andreas Fischer
85e32046e3 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9820] phpBB Debug Error when trying to post a new topic.
  [ticket/9162] BBCode in poll options is broken, when posting without question.
  [ticket/9804] Update docs/AUTHORS. Move DavidMJ, add evil<3.
2010-09-14 16:58:35 +02:00
Andreas Fischer
20460dc12c Merge branch 'ticket/nickvergessen/9162' into develop-olympus
* ticket/nickvergessen/9162:
  [ticket/9162] BBCode in poll options is broken, when posting without question.
2010-09-14 16:47:46 +02:00
Joas Schilling
ffd9437948 [ticket/9820] phpBB Debug Error when trying to post a new topic.
Regression from aa4519fb44f4ff83e923c6cc4d5bde3f20082340

PHPBB3-9820
PHPBB3-7260
2010-09-14 15:43:05 +02:00
Joas Schilling
a81c857c96 [ticket/9162] BBCode in poll options is broken, when posting without question.
PHPBB3-9162
2010-09-14 13:20:38 +02:00
Igor Wiedler
05c88bb00d Merge branch 'ticket/bantu/9804' into develop-olympus
* ticket/bantu/9804:
  [ticket/9804] Update docs/AUTHORS. Move DavidMJ, add evil<3.
2010-09-12 20:36:34 +02:00
Andreas Fischer
4776952959 [ticket/9804] Update docs/AUTHORS. Move DavidMJ, add evil<3.
PHPBB3-9804
2010-09-12 19:19:30 +02:00
Igor Wiedler
3e8d45910d Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9754] Populate S_USER_POSTED variable with correct value in search.php
  [ticket/9748] Replace <br /> before converting < and > to their entities.
  [ticket/9503] Show 'No subject specified' in 'Posts awaiting approval'.
2010-09-12 15:01:17 +02:00
Igor Wiedler
161be96c66 Merge branch 'ticket/bantu/9748' into develop-olympus
* ticket/bantu/9748:
  [ticket/9748] Replace <br /> before converting < and > to their entities.
2010-09-12 14:59:59 +02:00
Igor Wiedler
c0d645c319 Merge branch 'ticket/bantu/7252' into develop
* ticket/bantu/7252:
  [ticket/7252] Align array keys and values to "=>".
  [ticket/7252] Replace magic values with PHP constants.
  [ticket/7252] Replace magic values with PHP constants.
2010-09-12 14:48:09 +02:00
Igor Wiedler
e08395745b Merge branch 'ticket/bantu/9503' into develop-olympus
* ticket/bantu/9503:
  [ticket/9503] Show 'No subject specified' in 'Posts awaiting approval'.
2010-09-12 13:40:02 +02:00
Andreas Fischer
0edcf575a0 [ticket/7252] Align array keys and values to "=>".
PHPBB3-7252
2010-09-12 13:26:17 +02:00
Igor Wiedler
e51e7701cd Merge branch 'ticket/bantu/9754' into develop-olympus
* ticket/bantu/9754:
  [ticket/9754] Populate S_USER_POSTED variable with correct value in search.php
2010-09-12 13:11:21 +02:00
Andreas Fischer
26c31704cc Merge branch 'ticket/evil3/9394' into develop
* ticket/evil3/9394:
  [ticket/9394] Fix comment in functions_upload
2010-09-12 13:00:06 +02:00
Andreas Fischer
bef108a5cc [ticket/9609] Change header() calls setting HTTP status to send_status_line().
PHPBB3-9609
2010-09-11 22:01:31 +02:00
Chris Smith
0a50a02b66 [ticket/7252] Replace magic values with PHP constants.
get_supported_image_types() in includes/functions_posting.php contained
the values of PHP constants hardcoded instead of using the constants.

PHPBB3-7252
2010-09-10 21:26:20 +01:00
Chris Smith
818955062a [ticket/7252] Replace magic values with PHP constants.
fileupload::image_types() contained hardcoded references to values of built
in PHP constants, these have been replaced with the constants instead now.

PHPBB3-7252
2010-09-10 21:26:08 +01:00
Igor Wiedler
b89a4cd8d4 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/8935] Prevent setting maximum avatar dimensions less than the minimums.
2010-09-10 10:31:15 +02:00
Chris Smith
264ef66c5c [ticket/8935] Prevent setting maximum avatar dimensions less than the minimums.
This change actually applies to any configruation setting that is a pair
of values one representing the maximum and one minimum. This change enforces
that the maximum value cannot be less than the minimum value.

PHPBB3-8935
2010-09-09 23:42:20 +01:00
Igor Wiedler
2baa8c61d1 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [task/git-tools] Change the GNU --lines argument to the POSIX -l
  [task/git-tools] Solve dependency on the GNU wc --max-line-length option
  [ticket/8944] Patch db_tools to support index length for MySQL4
  [ticket/9039] Make mssqlnative.php non-executable
  [ticket/8944] Add index length to CREATE INDEX for MySQL4 in database_update
  [ticket/9800] Update tracker URL in docs/README.html
2010-09-09 00:23:33 +02:00
Chris Smith
1b3b79b694 Merge branch 'ticket/evil3/8944' into develop-olympus
* ticket/evil3/8944:
  [ticket/8944] Patch db_tools to support index length for MySQL4
  [ticket/8944] Add index length to CREATE INDEX for MySQL4 in database_update
2010-09-05 02:41:34 +01:00
Chris Smith
7de1fc40b3 Merge branch 'ticket/evil3/9800' into develop-olympus
* ticket/evil3/9800:
  [ticket/9800] Update tracker URL in docs/README.html
2010-09-05 02:14:46 +01:00
Igor Wiedler
e7b86871f0 [ticket/8944] Patch db_tools to support index length for MySQL4 2010-09-05 03:14:27 +02:00
Igor Wiedler
58bdd91d61 [ticket/9039] Make mssqlnative.php non-executable
PHPBB3-9039
2010-09-03 22:43:29 +02:00
Igor Wiedler
bb191a1d69 [ticket/8944] Add index length to CREATE INDEX for MySQL4 in database_update
Fixes following SQL error when updating the database to 3.0.6.

BLOB column 'post_username' used in key specification without a key length

PHPBB3-8944
2010-09-03 22:26:06 +02:00
Igor Wiedler
fdd04eef49 [ticket/9800] Update tracker URL in docs/README.html
PHPBB3-9800
2010-09-02 20:15:33 +02:00
Igor Wiedler
09ef1dc170 [ticket/9394] Fix comment in functions_upload
PHPBB3-9394
2010-09-02 17:46:50 +02:00
Andreas Fischer
ea4d204cf6 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9662] Search flood interval no longer applies to non-keyword searches
  [ticket/9615] magic_quotes_gpc: call stripslashes() before utf8_basename()
2010-09-02 17:35:44 +02:00