GIT.Harvie.CZ
/
mirrors
/
Kyberia-bloodline.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleaning warnings
[mirrors/Kyberia-bloodline.git]
/
wwwroot
/
inc
/
smarty
/
resource.kyberia.php
diff --git
a/wwwroot/inc/smarty/resource.kyberia.php
b/wwwroot/inc/smarty/resource.kyberia.php
index 71670c9d105017986ffd60731be6146e9a3774e0..bf28a33be3f153feacd2e2949ac0df59dddc2708 100644
(file)
--- a/
wwwroot/inc/smarty/resource.kyberia.php
+++ b/
wwwroot/inc/smarty/resource.kyberia.php
@@
-15,14
+15,17
@@
function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {
$params['node_creator'] = UBIK_ID;
$params['node_parent'] = 2029360;
$params['node_name'] = "addTemplate execute: node $add_template_id";
$params['node_creator'] = UBIK_ID;
$params['node_parent'] = 2029360;
$params['node_name'] = "addTemplate execute: node $add_template_id";
- $params['node_content'] =
mysql_real
_escape_string("addTemplate execute: node <a href='$add_template_id'>$add_template_id</a> by user ".$_SESSION['user_name']);
+ $params['node_content'] =
db
_escape_string("addTemplate execute: node <a href='$add_template_id'>$add_template_id</a> by user ".$_SESSION['user_name']);
nodes::addNode($params);
*/
nodes::addNode($params);
*/
-
+ /*
if(!($set=$db->query("select node_content from nodes where node_id='$add_template_id'"))) return false;
$set->next();
if(!($set=$db->query("select node_content from nodes where node_id='$add_template_id'"))) return false;
$set->next();
+ */
// populating $tpl_source with actual template contents
// populating $tpl_source with actual template contents
- $tpl_source = stripslashes($set->getString('node_content'));
+ //$tpl_source = stripslashes($set->getString('node_content'));
+ $tpl_source = nodes::getNodeById($add_template_id,empty($_SESSION['user_id']) ? "" : $_SESSION['user_id']);
+ $tpl_source = $tpl_source['node_content'];
// return true on success, false to generate failure notification
return true;
}
// return true on success, false to generate failure notification
return true;
}
@@
-33,7
+36,9
@@
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.
- $tpl_timestamp = time(); // this example will always recompile! FIXME!!! TODO!!!
+ $recompile = 100; //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
return true;
}
// return true on success, false to generate failure notification
return true;
}
This page took
0.138465 seconds
and
4
git commands to generate.