GIT.Harvie.CZ
/
mirrors
/
Kyberia-bloodline.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2c46794
)
Trasovatelne templaty
author
Harvie
<tomas@mudrunka.cz>
Tue, 29 May 2012 12:29:46 +0000
(14:29 +0200)
committer
Harvie
<tomas@mudrunka.cz>
Tue, 29 May 2012 12:29:46 +0000
(14:29 +0200)
wwwroot/inc/smarty/resource.kyberia.php
patch
|
blob
|
blame
|
history
diff --git
a/wwwroot/inc/smarty/resource.kyberia.php
b/wwwroot/inc/smarty/resource.kyberia.php
index c25e0f6f7844e2a16691f415d152a9db38e602ba..916309a88b13676009dafb4693ff40b490538429 100644
(file)
--- a/
wwwroot/inc/smarty/resource.kyberia.php
+++ b/
wwwroot/inc/smarty/resource.kyberia.php
@@
-17,7
+17,9
@@
function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {
if (is_numeric($template_id)) {
$tpl_source = nodes::getNodeById($template_id,empty($_SESSION['user_id']) ? "" : $_SESSION['user_id']);
}
if (is_numeric($template_id)) {
$tpl_source = nodes::getNodeById($template_id,empty($_SESSION['user_id']) ? "" : $_SESSION['user_id']);
}
- $tpl_source = $tpl_source['node_content'];
+ $tpl_source = "\n<!-- BEGIN TEMPLATE $template_id -->\n".
+ $tpl_source['node_content'].
+ "\n<!-- END TEMPLATE $template_id -->\n";
// return true on success, false to generate failure notification
return (bool)$tpl_source;
// return true on success, false to generate failure notification
return (bool)$tpl_source;
@@
-29,7
+31,7
@@
function db_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj)
// do database call here to populate $tpl_timestamp
// with unix epoch time value of last template modification.
// This is used to determine if recompile is necessary.
// do database call here to populate $tpl_timestamp
// with unix epoch time value of last template modification.
// This is used to determine if recompile is necessary.
- $recompile = 10
0
; //recompile every N seconds
+ $recompile = 10; //recompile every N seconds
$tpl_timestamp = floor(time()/$recompile)*$recompile;
// this example will recompile even unchanged templates! XXX!!! FIXME!!! TODO!!!
// return true on success, false to generate failure notification
$tpl_timestamp = floor(time()/$recompile)*$recompile;
// this example will recompile even unchanged templates! XXX!!! FIXME!!! TODO!!!
// return true on success, false to generate failure notification
This page took
0.108909 seconds
and
4
git commands to generate.