aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_messenger.php
Commit message (Collapse)AuthorAgeFilesLines
* [ticket/10986] message.id fallback to SERVER_NAME or phpbb.generatedNils Adermann2013-02-241-1/+23
| | | | | | | Rather than send invalid message ids with a missing domain part we try to read one from $_SERVER and otherwise use phpbb.generated PHPBB3-10986
* [ticket/10602] Avoid a race condition.Oleg Pudeyev2012-12-051-2/+4
| | | | PHPBB3-10602
* [ticket/10602] Use last_queue_run for its intended purpose.Oleg Pudeyev2012-12-051-3/+8
| | | | | | | | | | | | | | | | | We keep the last queue run time around, therefore for determining whether enough time has passed since the last run we can simply use this config variable. When there is no queue file we consider a queue run successful. Previously queue.php ("cache file") modification time would be used for determining whether enough time has passed since last queue run. The problem was that modification time would be updated whenever anything was added to the queue, creating a situation where if queue is processed less frequently than it is added to that email would not be sent. PHPBB3-10602
* [ticket/10538] Call htmlspecialchars_decode() on Jabber and SMTP passwords.Andreas Fischer2011-12-191-3/+3
| | | | PHPBB3-10538
* [ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().Andreas Fischer2011-11-201-3/+6
| | | | PHPBB3-10446
* [ticket/10446] Remove leftover $headers parameter from anti_abuse_headers().Andreas Fischer2011-11-201-1/+2
| | | | PHPBB3-10446
* [ticket/10446] RFC2047 encode user/server names in X-AntiAbuse headers.Oleg Pudeyev2011-11-201-2/+2
| | | | PHPBB3-10446
* [ticket/10446] DRY X-AntiAbuse header addition.Oleg Pudeyev2011-11-201-0/+12
| | | | PHPBB3-10446
* [ticket/10245] Use error_collector instead of ob_start() and ob_get_clean().Andreas Fischer2011-09-181-5/+21
| | | | PHPBB3-10245
* Merge branch 'ticket/cs278/9061' into develop-olympusAndreas Fischer2010-10-271-19/+68
|\ | | | | | | | | | | * ticket/cs278/9061: [ticket/9061] Simplify conditional statements by reworking the logic. [ticket/9061] Fixed a race condition in queue locking.
| * [ticket/9061] Simplify conditional statements by reworking the logic.Chris Smith2010-10-271-12/+18
| | | | | | | | PHPBB3-9061
| * [ticket/9061] Fixed a race condition in queue locking.Oleg Pudeyev2010-10-271-19/+62
| | | | | | | | | | | | | | | | | | | | | | 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
* | [ticket/9559] Do not override queue package size in the case of an overflowJosh Woody2010-07-221-0/+7
|/ | | | | | | | 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
* Do not store email templates in database. [Bug #54505]Nils Adermann2010-01-261-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Further fixes for r10447 and r10448. Correctly account for custom language ↵Josh Woody2010-01-261-1/+10
| | | | | | directories (caught by naderman) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10449 89ea8834-ac86-4346-8a33-228a782c2dd0
* Remove needless check (revising r10447)Josh Woody2010-01-261-7/+4
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10448 89ea8834-ac86-4346-8a33-228a782c2dd0
* Fall back to board default language email template if the file does not ↵Josh Woody2010-01-261-2/+8
| | | | | | exist user's preferred language (#35595) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10447 89ea8834-ac86-4346-8a33-228a782c2dd0
* Fix getting host for situations where the name/IP is not resolvable. Related ↵Meik Sievertsen2009-09-221-1/+18
| | | | | | | | 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
* extend r9387 - check for existance of all functions we use...Meik Sievertsen2009-09-171-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10158 89ea8834-ac86-4346-8a33-228a782c2dd0
* Fix #51285 and more issues with template inherence on set_custom_templateJoas Schilling2009-09-161-1/+1
| | | | | | | | 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
* Fix possible wrong encodings in email template files in messenger. Related ↵Meik Sievertsen2009-08-251-0/+3
| | | | | | to bug #46725 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10052 89ea8834-ac86-4346-8a33-228a782c2dd0
* we will use the non-compliant way for mail() until we further inspected ↵Meik Sievertsen2009-08-181-11/+3
| | | | | | PHP's source. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10015 89ea8834-ac86-4346-8a33-228a782c2dd0
* Fix email problems on servers with PHP installations not accepting ↵Meik Sievertsen2009-08-181-11/+32
| | | | | | 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
* Per RFC2047 section 5 do not use quoted strings for encoded recipient namesChris Smith2009-08-181-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10011 89ea8834-ac86-4346-8a33-228a782c2dd0
* allow custom template path for email filesMeik Sievertsen2009-08-111-3/+6
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9957 89ea8834-ac86-4346-8a33-228a782c2dd0
* Parse email text files with the template engine.Meik Sievertsen2009-07-221-22/+53
| | | | | | 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
* Correctly split UTF-8 encoded strings when using mail(). #45815Chris Smith2009-06-031-5/+9
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9530 89ea8834-ac86-4346-8a33-228a782c2dd0
* Messenger now also able to use a custom language path. (Bug #36545)Meik Sievertsen2009-04-171-2/+3
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9450 89ea8834-ac86-4346-8a33-228a782c2dd0
* fix revision #r9430 - all hail the math!Meik Sievertsen2009-04-161-2/+2
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9449 89ea8834-ac86-4346-8a33-228a782c2dd0
* Correctly split long subject lines according to the used RFC. This fixes ↵Meik Sievertsen2009-04-101-5/+6
| | | | | | extra spaces within long subjects. (Bug #43715) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9430 89ea8834-ac86-4346-8a33-228a782c2dd0
* Erm, yes, we use EOL in queue too. :/ (me is ashamed). Paul, thanks for ↵Meik Sievertsen2009-04-081-0/+5
| | | | | | giving me access to debug this. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9429 89ea8834-ac86-4346-8a33-228a782c2dd0
* make sure eol is set (if PHP_EOL is empty? :o)Meik Sievertsen2009-04-081-0/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9427 89ea8834-ac86-4346-8a33-228a782c2dd0
* Mass Email works again for users with empty jabber address but notification ↵Meik Sievertsen2009-03-171-2/+25
| | | | | | set to 'both'. (Bug #39755) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9389 89ea8834-ac86-4346-8a33-228a782c2dd0
* Use FQDN for SMTP EHLO/HELO command. (Bug #41025)Meik Sievertsen2009-03-171-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9387 89ea8834-ac86-4346-8a33-228a782c2dd0
* Use OS-specific line endings for mail headers. (related to Bug #42755)Meik Sievertsen2009-03-111-21/+27
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9364 89ea8834-ac86-4346-8a33-228a782c2dd0
* add IN_PHPBB check to generated cache filesMeik Sievertsen2009-03-111-2/+2
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9363 89ea8834-ac86-4346-8a33-228a782c2dd0
* Missing read permission from calls to phpbb_chmod()Chris Smith2008-12-191-2/+2
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9208 89ea8834-ac86-4346-8a33-228a782c2dd0
* Do not try to send jabber notifications if no jid entered (Bug #36775)Meik Sievertsen2008-11-221-0/+11
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9078 89ea8834-ac86-4346-8a33-228a782c2dd0
* some whitespace changes and opening files in binary mode in functions_messengerMeik Sievertsen2008-10-061-1/+1
| | | | git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8971 89ea8834-ac86-4346-8a33-228a782c2dd0
* Use phpBB 3.1.x method for storing cached data to prevent PHP bug with our ↵Meik Sievertsen2008-09-291-2/+2
| | | | | | usage of var_export(). (Thanks to Techie Micheal and HoL for pointing out possible problems) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8955 89ea8834-ac86-4346-8a33-228a782c2dd0
* change the way we do chmodd'ing. I know, my implementation really sucked... ↵Meik Sievertsen2008-08-221-3/+3
| | | | | | good we have motivated community members who point this out. ;) Thanks to faw for providing a way better function and for discussing and also abiding to our needs. :) LEW21 should maybe credited too... he gave the inspiration without knowing it. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8780 89ea8834-ac86-4346-8a33-228a782c2dd0
* the chmod change i already had within the changelog (by mistake). This ↵Meik Sievertsen2008-08-161-10/+10
| | | | | | | | should further secure writable directories and created files. Installation need to be tested on different hosts. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8763 89ea8834-ac86-4346-8a33-228a782c2dd0
* Do not error out if php_uname function disabled / Authenticating on SMTP ↵Meik Sievertsen2008-03-181-3/+2
| | | | | | Server (Bug #22235 - patch by HoL) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8449 89ea8834-ac86-4346-8a33-228a782c2dd0
* some further fixesMeik Sievertsen2007-11-171-7/+2
| | | | | | | - re-introduce grabbing random number from /dev/urandom git-svn-id: file:///svn/phpbb/trunk@8241 89ea8834-ac86-4346-8a33-228a782c2dd0
* fixing tiny bugsMeik Sievertsen2007-11-101-1/+1
| | | | git-svn-id: file:///svn/phpbb/trunk@8232 89ea8834-ac86-4346-8a33-228a782c2dd0
* dumdidum... sorry. ;)Meik Sievertsen2007-10-051-2/+10
| | | | git-svn-id: file:///svn/phpbb/trunk@8146 89ea8834-ac86-4346-8a33-228a782c2dd0
* - correct jabber token handlingMeik Sievertsen2007-09-141-3/+3
| | | | | | | | - undisclosed-recipients:; instead of undisclosed-recipient:; - PM details button should not be there git-svn-id: file:///svn/phpbb/trunk@8090 89ea8834-ac86-4346-8a33-228a782c2dd0
* fixing some bugsMeik Sievertsen2007-09-021-6/+6
| | | | git-svn-id: file:///svn/phpbb/trunk@8075 89ea8834-ac86-4346-8a33-228a782c2dd0
* - two new packages... diff and utfMeik Sievertsen2007-08-161-4/+4
| | | | | | | | - only 60 chars for topic title if new post (please see changelog for explanation) - change utf8_wordwrap (had some bugs david and nils spotted - was not really functional, sorry for this. :D) git-svn-id: file:///svn/phpbb/trunk@8034 89ea8834-ac86-4346-8a33-228a782c2dd0
* some bugs fixedMeik Sievertsen2007-08-151-4/+4
| | | | git-svn-id: file:///svn/phpbb/trunk@8033 89ea8834-ac86-4346-8a33-228a782c2dd0