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

166 Commits

Author SHA1 Message Date
Oleg Pudeyev
767d09227b [ticket/10933] Dependency inject template context.
PHPBB3-10933
2012-11-02 18:51:35 -04:00
Vjacheslav Trushkin
d91abbb146 [ticket/10756] Renaming phpbb_style_template to phpbb_template
Renaming phpbb_style_template to phpbb_template

PHPBB3-10756
2012-04-19 04:25:25 +02:00
Vjacheslav Trushkin
6cecc91326 [ticket/10756] Removing path provider from template class
Removing path provider from template class because it is not used by template class

PHPBB3-10756
2012-04-19 04:21:56 +02:00
Vjacheslav Trushkin
57065095d5 [ticket/10754] Changing $style to $phpbb_style
Renaming global variable $style to $phpbb_style

PHPBB3-10754
2012-04-03 00:41:56 +03:00
Vjacheslav Trushkin
17989c17a0 [feature/merging-style-components] Moving template initialization out of style
Moving template initialization out of style constructor

PHPBB3-10632
2012-03-31 18:10:00 +03:00
Vjacheslav Trushkin
360312f599 [feature/merging-style-components] Initializing locator and provider separately
Moving locator and path provider initialization out of style class

PHPBB3-10632
2012-03-31 17:38:30 +03:00
Vjacheslav Trushkin
fd96f97dc3 [feature/merging-style-components] Updating style initialization
Changing template initialization to style initialization.

PHPBB3-10632
2012-03-15 21:11:34 +02:00
Vjacheslav Trushkin
3997ffac2a [feature/merging-style-components] Creating style class
Creating phpbb_style class, changing template initialization to style initialization

PHPBB3-10632
2012-03-15 13:13:21 +02:00
Vjacheslav Trushkin
b7d84a586c [feature/merging-style-components] Renaming template classes
Changing template classes prefixes from phpbb_template to phpbb_style (for classes that will work with styles) or phpbb_style_template (for classes that are specific to templates)

PHPBB3-10632
2012-03-14 23:12:11 +02:00
Andreas Fischer
237ddf9d22 [ticket/10076] STARTTLS support for SMTP via smtp_class.
PHPBB3-10076
2012-01-28 22:51:35 +01:00
Andreas Fischer
ac492d8f1e [ticket/10076] Move EHLO/HELO code into its own method.
PHPBB3-10076
2012-01-28 22:51:34 +01:00
Andreas Fischer
69a725198b Merge remote-tracking branch 'unknownbliss/ticket/9916' into develop
* unknownbliss/ticket/9916:
  [ticket/9916] Updating header license and removing Version $Id$
2012-01-02 17:54:54 +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
96114f7e35 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10538] Call htmlspecialchars_decode() on Jabber and SMTP passwords.
2011-12-28 16:41:38 +01:00
Andreas Fischer
82fff947c6 [ticket/10538] Call htmlspecialchars_decode() on Jabber and SMTP passwords.
PHPBB3-10538
2011-12-19 14:24:39 +01:00
Igor Wiedler
d766ee3fe6 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().
  [ticket/10446] Remove leftover $headers parameter from anti_abuse_headers().
  [ticket/10446] RFC2047 encode user/server names in X-AntiAbuse headers.
  [ticket/10446] DRY X-AntiAbuse header addition.

Conflicts:
	phpBB/includes/ucp/ucp_register.php
2011-11-20 18:45:56 +01:00
Andreas Fischer
37c7668193 [ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().
PHPBB3-10446
2011-11-20 16:35:31 +01:00
Andreas Fischer
a7077c9149 [ticket/10446] Remove leftover $headers parameter from anti_abuse_headers().
PHPBB3-10446
2011-11-20 14:02:22 +01:00
Oleg Pudeyev
c68973a9e0 [ticket/10446] RFC2047 encode user/server names in X-AntiAbuse headers.
PHPBB3-10446
2011-11-20 04:17:42 -05:00
Oleg Pudeyev
64d62038cd [ticket/10446] DRY X-AntiAbuse header addition.
PHPBB3-10446
2011-11-20 04:15:44 -05:00
Nils Adermann
520a5f9295 [feature/extension-manager] Refactoring the structure of extension provider
PHPBB3-10323
2011-09-29 16:15:53 +02:00
Nils Adermann
ea46feb115 [feature/extension-manager] Add support for templates in extensions.
This commit adds a template path provider to separate the process of locating
(cached) paths in extensions from the template engine. The locator is supplied
with a list of paths from the path provider.

Admin templates can now be created in ext/<ext>/adm/style/ and regular
templates go into ext/<ext>/styles/<style>/template/. Extension templates
override regular templates. So if an extension supplies a file with a name
used in phpBB, the extension's file will be used.

A side-effect of this commit: Locator and Provider are now able to deal with
arbitrary levels of template inheritance. So we can expose this through
phpbb_template if we choose to, and allow styles to inherit from inherited
styles.

PHPBB3-10323
2011-09-29 16:15:53 +02:00
Nils Adermann
d0f5b527fe Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10245] Use error_collector instead of ob_start() and ob_get_clean().
2011-09-18 23:25:57 +02:00
Andreas Fischer
05515e0510 [ticket/10245] Use error_collector instead of ob_start() and ob_get_clean().
PHPBB3-10245
2011-09-18 22:04:34 +02:00
Igor Wiedler
c5cef773c4 [feature/request-class] Adjust code base to do html decoding manually
PHPBB3-9716
2011-08-18 23:44:30 +02:00
Igor Wiedler
38c65da553 Merge branch 'develop' into feature/request-class
* develop: (157 commits)
  [ticket/10316] Resolve inconsistent move topic behavior
  [ticket/9297] Add network to class name of unit tests.
  [ticket/9297] Fix typo in localhost.
  [ticket/9297] Rename test class to reflect its contents.
  [ticket/9297] Adjust comment - IPv6 is needed for IPv6 connections to work.
  [ticket/9297] Fix markTestSkipped call in setUpBeforeClass.
  [ticket/9608] Remove use of references in topic_review
  [ticket/9297] Skip FTP PASV/EPSV test if FTP connection fails.
  [ticket/9297] Separate ipv4 and ipv6 tests into separate functions.
  [ticket/9297] Update copyright year of unit test file.
  [feature/template-engine] Delete _get_locator function.
  [feature/template-engine] Clean up template locator usage in bbcode.
  [ticket/9297] Make EPSV unit tests work without IPv6.
  [ticket/9297] Unit tests for ftp_fsock PASV and EPSV.
  [ticket/9297] Add support for Extended Passive Mode (EPSV) in ftp_fsock class.
  [ticket/10312] Un-check the shadow option while moving.
  [feature/template-engine] Need to call set_template on template.
  [feature/template-engine] Update installer for template engine changes.
  [feature/template-engine] Dependency inject locator into template.
  [feature/template-engine] Delete useless code from set_template.
  ...

Conflicts:
	phpBB/includes/functions.php
2011-08-18 22:31:25 +02:00
Oleg Pudeyev
acb767f14d [feature/template-engine] Dependency inject locator into template.
PHPBB3-9726
2011-08-09 23:28:40 -04: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
Oleg Pudeyev
d2ac05aa74 [feature/template-engine] Replaced globals with dependency injection.
PHPBB3-9726
2011-05-12 20:13:31 -04:00
Oleg Pudeyev
87832d06cc [feature/template-engine] Delete template class, use phpbb_template instead.
PHPBB3-9726
2011-05-04 00:08:20 -04:00
Andreas Fischer
6ff403c9f8 Merge branch 'ticket/cs278/9061' into develop-olympus
* ticket/cs278/9061:
  [ticket/9061] Simplify conditional statements by reworking the logic.
  [ticket/9061] Fixed a race condition in queue locking.
2010-10-27 13:06:21 +02:00
Chris Smith
9819700247 [ticket/9061] Simplify conditional statements by reworking the logic.
PHPBB3-9061
2010-10-27 11:31:42 +01:00
Oleg Pudeyev
01ef46a510 [ticket/9061] Fixed a race condition in queue locking.
Changed queue locking to cover all queue file operations,
in particular the check for queue file existince and
inclusion of queue file must be done under one lock.

Also refactored queue locking and unlocking into separate
methods.

PHPBB3-9061
2010-10-27 11:31:27 +01:00
Josh Woody
2f312b2175 [ticket/9559] Do not override queue package size in the case of an overflow
This reverts r8025 to includes/functions_messenger.php.  That code caused
problems on hosters with email limits less than package_size*2.5.  And it isn't
desirable in general to over-ride the admin's configuration options.

PHPBB3-9559
2010-07-22 10:44:31 -05:00
Nils Adermann
6e31ce8573 Do not store email templates in database. [Bug #54505]
To explain what this is about, first a short phpBB code history lesson: ;-)

r9823 originally introduced the usage of our template class for emails. The
messenger class uses set_custom_template() to initialise the template object
which neither disables storedb nor inheritance. These two values are set in
$user->theme rather than inside a particular template instance (quite a design
failure if I may add). Thus the html page that is displayed to the user also
determines these settings for the email templates. This obviously causes
problems because both emails and other custom templates can quite simply not
be stored in the database because the db table only stores the filename, not
the path and requires a template id.

r9839 then generally disabled storedb and template inheritance for custom
templates to fix Bug #40515. This works for custom templates, but not for
emails where lots of template objects are created. In such a situation the
last call to set(_custom)_template() would now determine the values of storedb
and inheritance in _tpl_load. So any page sending emails would neither load
its template from the database nor use template inheritance. The same revision
also introduced orig_tpl_* variables in set_template() which on their own are
very much pointless, but could allow resetting the storedb and inheritance
values if they were used to reset $user->theme just before template execution
in _tpl_load.

In r10150 these orig_tpl_* variables are correctly used to access information
about the template of the page being displayed - contrary to the last template
used - from within the bbcode, fixing Bug #51285. However r10150 also introduces
a pointless $template_mode parameter for set_custom_template(). $template_mode
is really just a boolean flag (value you can be 'template' or an arbitrary other
value) that if it set circumvents the unsetting of storedb and template
inheritance. The very code that had been added to prevent issues with emails and
custom templates. Fixing the problem introduced by r8839 but at the same time
reintroducing the much greater problem from the original implementation of email
templates.

And now an explanation of what I did:

Based on this I have now changed the set_custom_template method to always
disable storedb. It can now properly use inheritance, you simply tell it the
path where the parent template can be found, by default the path is false which
will turn inheritance off. To make this work the template class now always
overwrites $user->theme storedb and inheritance variabbles with orig_tpl_* just
before rendering a template in _tpl_load. This way they are guaranteed to always
contain the value they had at the time set_template/set_custom_template were
called. This fixes [Bug #54505].

In summary, using global state is simply a horrible idea in object oriented
programming. Always Pass values, that an object depends on, as parameters - never
through magic global variables. Following this principle will safe you from a lot
of headaches.

Please test this patch as much as possible to make sure templates still work
properly for you, focus on multiple languages, missing language files, and
custom templates in systems that make use of the template class outside of
phpBB itself.


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10460 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 16:52:46 +00:00
Josh Woody
b4d6b1e980 Further fixes for r10447 and r10448. Correctly account for custom language directories (caught by naderman)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10449 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 04:11:58 +00:00
Josh Woody
a314b2807f Remove needless check (revising r10447)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10448 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 03:43:02 +00:00
Josh Woody
ff1aa876b5 Fall back to board default language email template if the file does not exist user's preferred language (#35595)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10447 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 03:30:43 +00:00
Meik Sievertsen
782d680b54 Fix getting host for situations where the name/IP is not resolvable. Related to Bug #41025
Related revisions: r9387 and r10158

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10178 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-22 15:09:09 +00:00
Meik Sievertsen
223b9ed0d6 extend r9387 - check for existance of all functions we use...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10158 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 13:39:50 +00:00
Joas Schilling
697fd5a134 Fix #51285 and more issues with template inherence on set_custom_template
Conflict introduced with r9839 and r9823

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10150 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 08:11:52 +00:00
Meik Sievertsen
19bae65f4c Fix possible wrong encodings in email template files in messenger. Related to bug #46725
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10052 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-25 09:04:38 +00:00
Meik Sievertsen
92a1775294 we will use the non-compliant way for mail() until we further inspected PHP's source.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10015 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 13:24:45 +00:00
Meik Sievertsen
9bcc38ea0b Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10014 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 09:59:24 +00:00
Chris Smith
20bf778b93 Per RFC2047 section 5 do not use quoted strings for encoded recipient names
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10011 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 01:43:51 +00:00
Meik Sievertsen
be963ed938 allow custom template path for email files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9957 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-11 16:24:18 +00:00
Meik Sievertsen
cef8c2d87e Parse email text files with the template engine.
Did not check if this influences styles template cache list/purge/etc.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9823 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-07-22 09:07:24 +00:00
Chris Smith
05548f8f05 Correctly split UTF-8 encoded strings when using mail(). #45815
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9530 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-06-03 16:29:26 +00:00
Meik Sievertsen
b8b578cd99 Messenger now also able to use a custom language path. (Bug #36545)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9450 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-17 09:08:34 +00:00
Meik Sievertsen
0a139376ab fix revision #r9430 - all hail the math!
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9449 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-16 15:39:29 +00:00