Commit graph

478 commits

Author SHA1 Message Date
pdontthink
bd32ccbdf9 Massive rewrite of Template class to implement template inheritance, along with a fallback template (different than concept of a default which just helps catch void in user prefs). As suggested by Alexandros, a caching mechanism replaces the heaps of file_exists() calls in previous implementation, although this introduces more complexity, so watch for bugs! Inheritance implies changes in stylesheet and javascript file loading, in that now all such files inherited from all ancestors are loaded in case a template falls back to one of those ancestors (or the fallback set). Template config file caching and an easy API to get those settings also implemented. Finally, when a template set falls back to another set with a different template engine for a given page, the engine is swapped out dynamically (although this is less than ideal and should be discouraged when authors are creating template sets). 2006-10-02 09:38:05 +00:00
stevetruckstuff
05dc4ac0a8 Add tempalte config var for alternate stylesheets 2006-09-29 22:14:26 +00:00
stevetruckstuff
f7f0248729 Add tempalte config for alternate stylesheets 2006-09-29 22:13:17 +00:00
pdontthink
c2f00d5729 File name change 2006-09-28 14:09:18 +00:00
pdontthink
277876ec43 New Template class implementation 2006-09-28 14:02:11 +00:00
pdontthink
135bc9cf14 renamed with proper class file naming conventions 2006-09-28 14:01:19 +00:00
pdontthink
1cee629ce7 Solved recursion problem and increased efficiency of template_construct hook by adding file name to the end of the hook name, such as template_construct_login.tpl. Changed hook type to use the newly reworked concat_hook_function which can support merged arrays retued from the plugins. 2006-09-22 03:43:26 +00:00
pdontthink
1cd83a21d0 Adding template_construct and template_output hooks. Yikes. 2006-09-21 15:24:41 +00:00
pdontthink
6305990e9f Fixed error check 2006-09-21 13:29:22 +00:00
pdontthink
2268abdccf Forgot to check default template set before falling back to plugin default template for plugin t12n 2006-09-21 13:25:09 +00:00
pdontthink
d61bf277e5 Abstract template file location logic and enable plugin templating. This class still needs abstraction which is the next task here. Only possibly contentious change people should look at here is the use of file_exists() to find template files instead of reling on a hard-coded list of files in template.php. 2006-09-21 12:51:27 +00:00
pdontthink
70bb37e238 Clarifications, questions, proposals 2006-09-19 13:26:08 +00:00
stevetruckstuff
f41a7c9454 Fix unreachable code 2006-09-18 14:38:46 +00:00
stevetruckstuff
706860df49 Delivery notifications and Read notifications are currently treated as identical, which they are not. This patch creates a separate var for these two types of notifications. compose.php will be patched to handle this correctly when templatization (t12n) is completed. 2006-09-15 19:31:32 +00:00
stevetruckstuff
464a61b52b Add explicit saveDelayedErrors() member function 2006-09-15 14:36:34 +00:00
stevetruckstuff
4df9981f2d Prevent the same error from being displayed twice 2006-08-31 18:05:41 +00:00
stevetruckstuff
bac4cf6314 Correct typo in previous commit. 2006-08-31 14:44:51 +00:00
stevetruckstuff
69f9454fbb Fix error with trying to resend the header on a fatal error.
We *really* need to figure out why changes to member variables aren't being remembered outside of the member function in which they are changed.  This is afflicting the Template class and the Error class.
2006-08-31 14:14:28 +00:00
stevetruckstuff
dd7175b447 Move always included vars to init.php because it is confusing when not logged in. 2006-08-18 21:27:51 +00:00
stevetruckstuff
143ca2440c Some variables are needed by all templates to make creation easier. Make sure they are passed as variables to the template. 2006-08-18 20:17:43 +00:00
stevetruckstuff
3f002629a4 Implement delayed error handling. Defaults to FALSE. Enable this feature by calling $oErrorHandler->setDealyedErrors(true). This allows errors to be held on certain pages, e.g. webmail.php and displayed at a more appropriate time, e.g. at the bottom of left_main.php. 2006-08-10 22:31:56 +00:00
tokul
59ae6f3ac2 removing trailing ?> from function scripts 2006-07-15 12:01:32 +00:00
tokul
dbd9f69d03 resubmitting last Monday updates and adding php 5.1.0 timezone support 2006-05-13 19:11:08 +00:00
Thijs Kinkhorst
f46dd4944d - Improve recovery when EHLO not supported on legacy SMTP servers
(#1031455).
2006-05-12 14:39:55 +00:00
Thijs Kinkhorst
5641a73844 Correct references trimming: array_walk can't in all PHP versions use
a callback function that is a member function. Moving the function out
of the class seems the best solution.
2006-05-03 13:37:53 +00:00
stekkel
a0e99d40e5 Do not use ob_end_flush because the fetch method returns the content of the
buffer. If we do not clear the buffer the to display template will be
displayed twice (paginator.tpl in this case)
2006-04-23 09:05:22 +00:00
Thijs Kinkhorst
409270e9cf Reduce references header in a smart way to avoid "header too long"
errors from SMTP servers in really long threads (#1167754, #1465342).
2006-04-18 16:38:38 +00:00
stevetruckstuff
531803ca42 Added error handling if template.php or requested template is not found. 2006-04-06 19:49:28 +00:00
stevetruckstuff
8ca0997cc8 Added ability for template authors to include additional stylesheets. This allows them to add additional CSS defs while maintaining SQM default defintions. 2006-03-28 22:17:44 +00:00
stekkel
5963418896 Fix from Dimitar Pashev to make sure the rfc822 from adres isn't mixed up
when we set the $from vars to '' to make sure MAIL FROM <> is sent (MDN
receipt).
Could be a php 5.x thing because normally $from isn't a reference.
2006-03-14 17:05:01 +00:00
jangliss
b25a3ff9bf Make the use_*_tls options half respect old values. If you leave it as
true, then it would try to use STARTTLS.  While I understand this is a
new feature, and this is the dev branch, a little backwards compatibility
is easy in this case.  The value 2 is considered true... Using === instead
is an exact match, so you'd have to have 2 in the use_*_tls options for it
to trigger starttls mode.
2006-02-26 06:32:17 +00:00
stevetruckstuff
ab879d1c55 Incoproated template config file. Templates can now include their own javascript files. Also, if a template pack does not incorporate a specific template, the default template will be used instead. 2006-02-24 22:32:11 +00:00
stekkel
0ee5d97177 Update documentation 2006-02-11 15:24:58 +00:00
stekkel
f28f5bb0eb Fix for #1093360.
The fix also includes the move from manual generated error messages in
imap_general to the central error handler.
In order to catch non fatal error message in compose.php I had to collect
the error messages array before the header redirect and write them to the
session. In read_body.php, compose.php and right_main.php I add the error
messages to the error handler again and clean up the delayed error messages
array.
I also modified the error handler in order to display the page_header in
case it wasn't displayed yet.
2006-02-11 15:14:31 +00:00
stekkel
8a1d9e2fdf made the code work for triggering imap related errors. 2006-02-08 07:59:19 +00:00
Thijs Kinkhorst
52b7f27fa0 remove unneeded default which had a horrible backslash in a path 2006-01-29 12:14:58 +00:00
tokul
57ae2c61ce Added IMAP and SMTP STARTTLS extension support.
Saved SMTP EHLO response in class parameters.
Moved sanitizing of SMTP errors from delivery class to display scripts.
Allowed to use configtest.php when client_ip matches server_ip.
There is no 1.3.3 version. TLS was introduced in 1.4.0.
2006-01-28 19:24:08 +00:00
tokul
83fdb4c332 copyright update 2006-01-23 18:46:41 +00:00
tokul
e482d9d3d7 adding error checking in deliver_sendmail class.
sendmail -i -t arguments moved to configuration
fixed unsanitized output in plain_error_message() calls.
2005-12-08 18:24:47 +00:00
tokul
d58b6ad0b0 if we can't open stream. we make up server's error message 2005-12-07 06:49:07 +00:00
Erin Schnabel
8b02cc2477 require the hide_squirrelmail_header value to be defined as a constant
to avoid manipulation via GET/POST
2005-11-28 17:12:57 +00:00
Erin Schnabel
2317f3f40f reword some of the text around email/full name options, and introduce
a variable that can be added to config_local to remove the SM header
altogether if desired (e.g. in home installations).
2005-11-27 19:36:35 +00:00
tokul
9d85fd232c $this->content_type == '' test causes E_NOTICE in php 5.1, when
$this->content_type is object. content_type should always store ContentType
object and this code is only to make sure that parameter is not default
string.
2005-11-27 08:16:02 +00:00
Thijs Kinkhorst
51eb17263a * Centralise the attachment deleting code into the Message class
* Use this from the various places in the code where this was duplicated
* Fix the broken code in signout.php to cleanup lingering attachments
  by using this same function.
2005-11-21 20:11:48 +00:00
indiri69
e1677776db If loop exit is caused by $i being greater than or equal to $cnt, do try to append the non existent value 2005-11-17 21:21:50 +00:00
Fredrik Jervfors
c5fc10f625 Formatting as in STABLE 2005-11-09 23:45:20 +00:00
Fredrik Jervfors
ea10bb191a Updating documentation 2005-11-05 20:27:07 +00:00
Fredrik Jervfors
9ed98bb1ec phpDocumentor updates 2005-09-18 10:25:54 +00:00
Fredrik Jervfors
d3abcd651b Adding more index.php files
Unifying index.php files
2005-09-11 07:05:54 +00:00
stekkel
864d67873d Respect the error_reporting setting in php.ini and do not display errors
when the error level is not enabled in php.ini
2005-08-06 12:01:39 +00:00