Oleg Pudeyev
234b891a4b
[feature/template-engine] Fixed description of assign_display().
...
This function returns false on failure, which can happen if
display() failed. Document the failure return value.
PHPBB3-9726
2011-05-01 03:14:11 -04:00
Oleg Pudeyev
2aec6bb07c
[feature/template-engine] Only copy files to cache if they exist.
...
When testing eval code path, compiled templates may not be written
to the file system, and unconditionally trying to copy them
breaks tests.
PHPBB3-9726
2011-05-01 03:12:23 -04:00
Oleg Pudeyev
b884573c1d
[feature/template-engine] Relax missing file exception check.
...
As long as the exception message has the correct description and
file name we should not care which function raised the exception.
PHPBB3-9726
2011-05-01 03:11:13 -04:00
Oleg Pudeyev
c844a277b2
[feature/template-engine] Check return value of display() in assign_display().
...
If display() failed, propagate the failure out of assign_display().
PHPBB3-9726
2011-05-01 03:09:49 -04:00
Oleg Pudeyev
909ee59871
[feature/template-engine] Removed $this from new phpbb_template_compile calls.
...
The compile class no longer takes template as a parameter.
PHPBB3-9726
2011-04-26 22:19:04 -04:00
Igor Wiedler
427a5122d5
[feature/template-engine] Fix negative variable expressions
...
compile_tag_if had the flawed approach of adding an isset statement for
all variables to the beginning of the if. This fails for negative
expressions, and checking those takes a considerable effort.
The easier solution is to make the variable expression itself
conditional, defaulting to null if it is not set.
Thanks to naderman for the solution.
PHPBB3-9726
2011-04-25 23:19:36 -04:00
Oleg Pudeyev
f0b97cfdcf
[feature/template-engine] Added a test for reuse of loop identifiers.
...
This currently does not pass, thus it is commented out.
The reuse appears implausible in the same file, however it may be
also done across template files where it is much harder to detect.
PHPBB3-9726
2011-04-25 23:19:32 -04:00
Oleg Pudeyev
f97411b911
[feature/template-engine] Corrected miscompilation of loop size constructs.
...
PHPBB3-9726
2011-04-25 23:19:25 -04:00
Oleg Pudeyev
8d5e468eb4
[feature/template-engine] Created a script to compile templates.
...
Script takes path to template as the only argument and outputs
the compiled template to standard output.
PHPBB3-9726
2011-04-24 23:13:44 -04:00
Oleg Pudeyev
5afc0b9b90
[feature/template-engine] Corrected an off-by-one error in nested namespaces.
...
This error resulted in a dot from the namespace being placed into
variable reference in compiled template code, thus creating bogus
compiled template code.
PHPBB3-9726
2011-04-24 23:13:13 -04:00
Oleg Pudeyev
e10d62badc
[feature/template-engine] Added a test for multilevel references in loops.
...
This currently fails.
This test is a reduced version of permission_mask template in acp, which
is not correctly compiled by the current template engine code.
PHPBB3-9726
2011-04-24 21:56:26 -04:00
Oleg Pudeyev
5c3ebb3465
[feature/template-engine] Deleted silencing of notices.
...
The code is now supposed to be notice-free, therefore there is no need
to have the notices silenced.
PHPBB3-9726
2011-04-24 21:22:43 -04:00
Oleg Pudeyev
a2c75f6053
[feature/template-engine] Deleted $template from phpbb_template_compile class.
...
phpbb_template_compile is now much simpler. It takes complete file paths
as inputs, either source template path or source template path and output
compiled template path. The number of methods also went down to two -
compile template and returned compiled text or compile and write to file.
phpbb_compile class is responsible for determining source and compiled
paths. It already had all the data necessary for this, now the code is
in the same place as the data it uses.
PHPBB3-9726
2011-04-24 21:18:18 -04:00
Igor Wiedler
81962d1d8f
[ticket/9924] Pass template instance into $template->display hook
...
This is a cherry-pick of 053cf790a93e9cfb521f484901d79c72783f868f
which appears to have been partially reverted here.
PHPBB3-9924
2011-04-24 11:23:46 -04:00
Oleg Pudeyev
c8db531fcb
[feature/template-engine] Removed a useless space.
...
PHPBB3-9726
2011-04-24 01:59:40 -04:00
Oleg Pudeyev
321ecf4273
[feature/template-engine] Delete class_exists checks, rely on autoloading.
...
PHPBB3-9726
2011-04-24 01:18:58 -04:00
Oleg Pudeyev
f29f32e0d6
[feature/template-engine] Allow leading underscores in variable names.
...
Subsilver uses ._file in overall_header.
PHPBB3-9726
2011-04-24 01:08:48 -04:00
Oleg Pudeyev
203187a841
[feature/template-engine] Fix recompilation logic.
...
Do not change $recompile from true to false - any recompilation
condition alone is sufficient to force recompilation.
Also uncomment the nonexistent file test which passes with this fix.
PHPBB3-9726
2011-04-24 01:08:48 -04:00
Oleg Pudeyev
4dfe4c7f13
[feature/template-engine] Adjust path in includephp template.
...
Now that tests are run from top level the '..' is wrong.
PHPBB3-9726
2011-04-24 01:08:30 -04:00
Oleg Pudeyev
4f3e966fdc
[feature/template-engine] Delete ?>, add newline at EOF.
...
PHPBB3-9726
2011-04-23 22:49:08 -04:00
Marek A. Ruszczynski
2d11e1c095
[feature/template-engine] Improved template engine.
...
PHPBB3-9726
2011-04-23 22:49:02 -04:00
Marek A. Ruszczynski
4b646c6c80
[feature/template-engine] Update tests.
...
PHPBB3-9726
2011-04-23 22:48:50 -04:00
Andreas Fischer
513b95642e
Merge branch 'develop-olympus' into develop
...
* develop-olympus:
[ticket/10147] Corrected a typo in includes/functions_template.php.
2011-04-23 21:52:04 +02:00
Andreas Fischer
8a97722464
Merge branch 'ticket/p/10147' into develop-olympus
...
* ticket/p/10147:
[ticket/10147] Corrected a typo in includes/functions_template.php.
2011-04-23 21:51:49 +02:00
Oleg Pudeyev
a8ecd30fe1
[ticket/10147] Corrected a typo in includes/functions_template.php.
...
PHPBB3-10147
2011-04-23 15:36:45 -04:00
Andreas Fischer
ca0a066854
Merge branch 'develop-olympus' into develop
...
* develop-olympus:
[ticket/10141] Save a hash lookup when value is not in cache.
[ticket/10141] Split double-assignment into conditional and unconditional part.
[ticket/10141] Use a cache in $auth->_fill_acl() for better performance.
2011-04-22 11:17:39 +02:00
Andreas Fischer
bc48fe1704
Merge branch 'ticket/p/10141' into develop-olympus
...
* ticket/p/10141:
[ticket/10141] Save a hash lookup when value is not in cache.
[ticket/10141] Split double-assignment into conditional and unconditional part.
[ticket/10141] Use a cache in $auth->_fill_acl() for better performance.
2011-04-22 11:16:32 +02:00
Oleg Pudeyev
f08880e2c4
Merge branch 'develop-olympus' into develop
...
* develop-olympus:
[ticket/10137] Remove unintended space at end of PHP_URL_FOPEN_SUPPORT_EXPLAIN.
2011-04-22 00:16:37 -04:00
Oleg Pudeyev
0a8893498d
Merge branch 'ticket/bantu/10137' into develop-olympus
...
* ticket/bantu/10137:
[ticket/10137] Remove unintended space at end of PHP_URL_FOPEN_SUPPORT_EXPLAIN.
2011-04-22 00:16:21 -04:00
Oleg Pudeyev
2a566b0863
Merge branch 'develop-olympus' into develop
...
* develop-olympus:
[ticket/10105] Update AIM express link.
[ticket/10105] Update AIM application download link.
2011-04-22 00:04:51 -04:00
Oleg Pudeyev
ff5274181c
Merge branch 'ticket/bantu/10105' into develop-olympus
2011-04-22 00:03:02 -04:00
Oleg Pudeyev
f49656986c
[ticket/10141] Save a hash lookup when value is not in cache.
...
PHPBB3-10141
2011-04-21 23:15:51 -04:00
Andreas Fischer
8c3cfbb40e
[ticket/10105] Update AIM express link.
...
PHPBB3-10105
2011-04-22 00:42:49 +02:00
Andreas Fischer
78fa3a3b03
[ticket/10105] Update AIM application download link.
...
PHPBB3-10105
2011-04-22 00:41:55 +02:00
Andreas Fischer
6ee6245e5b
[ticket/10137] Remove unintended space at end of PHP_URL_FOPEN_SUPPORT_EXPLAIN.
...
PHPBB3-10137
2011-04-22 00:30:13 +02:00
Andreas Fischer
b1367bce48
[ticket/10141] Split double-assignment into conditional and unconditional part.
...
PHPBB3-10141
2011-04-22 00:20:09 +02:00
Oleg Pudeyev
37b38abec6
Merge branch 'ticket/bantu/10139' into develop
2011-04-21 04:43:27 -04:00
Bart van Bragt
11dd4b54fa
[ticket/10141] Use a cache in $auth->_fill_acl() for better performance.
...
Many sequences being converted are the same. Use a local cache to
convert each sequence once, speeding up the function.
PHPBB3-10141
2011-04-21 04:21:09 -04:00
Andreas Fischer
2701a587ac
[ticket/10139] Make signatures of set_atomic() consistent by using $new_value.
...
PHPBB3-10139
2011-04-19 10:17:18 +02:00
Andreas Fischer
9241aa79ff
[ticket/10139] Rename $cache to $use_cache to avoid confusion with cache object
...
PHPBB3-10139
2011-04-19 10:13:18 +02:00
Oleg Pudeyev
8fe75aefbb
Merge branch 'ticket/erikfrerejean/10006' into develop
2011-04-19 00:28:21 -04:00
Andreas Fischer
dcfab4e507
Merge branch 'ticket/p/7252' into develop
...
* ticket/p/7252:
[ticket/7252] Removed an outdated comment pertaining to PHP 4.x.
2011-04-18 17:06:04 +02:00
Erik Frèrejean
27bbfde243
[ticket/10006] Remove unneeded if statements
...
Remove some of the additional `if (isset)` checks
PHPBB3-10006
2011-04-18 12:28:47 +02:00
Erik Frèrejean
f93ac340a2
[ticket/10006] Remove return values
...
Remove some unneeded return values
PHPBB3-10006
2011-04-18 12:28:47 +02:00
Erik Frèrejean
503b87da48
[ticket/10006] More testing
...
Change the DB test to test agains new cache/config mock objects
PHPBB3-10006
2011-04-18 12:28:47 +02:00
Erik Frèrejean
7b1638c37f
[ticket/10006] Tweak the tests a bit
...
PHPBB3-10006
2011-04-18 12:28:47 +02:00
Erik Frèrejean
2f67ade05a
[ticket/10006] Add phpbb_config::delete
...
Add the missing `phpbb_config::delete` method to the config class
PHPBB3-10006
2011-04-18 12:28:47 +02:00
Oleg Pudeyev
9a8a8d41d3
[ticket/7252] Removed an outdated comment pertaining to PHP 4.x.
...
PHPBB3-7252
2011-04-17 18:41:18 -04:00
Oleg Pudeyev
8c5a9979ad
Merge branch 'develop-olympus' into develop
...
* develop-olympus:
[ticket/10109] Fix "Undefined Index" errors when copying a topic.
2011-04-17 11:09:17 -04:00
Oleg Pudeyev
32bc980ca0
Merge branch 'ticket/nickvergessen/10109' into develop-olympus
...
* ticket/nickvergessen/10109:
[ticket/10109] Fix "Undefined Index" errors when copying a topic.
2011-04-17 03:20:22 -04:00