$params['node_content'] = mysql_real_escape_string("addTemplate execute: node <a href='$add_template_id'>$add_template_id</a> by user ".$_SESSION['user_name']);
nodes::addNode($params);
*/
-
+ /*
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
- $tpl_source = stripslashes($set->getString('node_content'));
+ //$tpl_source = stripslashes($set->getString('node_content'));
+ $tpl_source = nodes::getNodeById($add_template_id,$user_id);
+ $tpl_source = $tpl_source['node_content'];
// return true on success, false to generate failure notification
return true;
}
// 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;
}