<?php
//funkcie na pridanie Re: alebo Re[x]: do nazvu (by Maniax)
-function title_reply_callback($_matches) {return ($_matches[1].($_matches[2] + 1).$_matches[3]);}
+function title_reply_callback($_matches) {
+ return ($_matches[1].($_matches[2] + 1).$_matches[3]);
+}
+
function title_reply($_in) {
-if (preg_match('/^Re[:\[]/', $_in)) {
-if (preg_match('/^Re\[/', $_in))
-return (preg_replace_callback('/^(Re\[)(\d*)(\].*)$/', 'title_reply_callback', $_in));
-else return (preg_replace('/^(Re)(:.*)$/', '\1[2]\2', $_in));
-} else return ('Re: '.$_in);
+ if (preg_match('/^Re[:\[]/', $_in)) {
+ if (preg_match('/^Re\[/', $_in))
+ return (preg_replace_callback('/^(Re\[)(\d*)(\].*)$/', 'title_reply_callback', $_in));
+ else return (preg_replace('/^(Re)(:.*)$/', '\1[2]\2', $_in));
+ } else return ('Re: '.$_in);
}
//Pridanie prispevku
if ($node_system_access=='crypto') {
- require(SYSTEM_ROOT.'/inc/crypto.inc');
+ require(INCLUDE_DIR.'crypto.inc');
if ($_SESSION['crypto'][$node_parent]) {
$key=$_SESSION['crypto'][$node_parent];
$node_content=crypto::crypto($node_content,$key);
- //setting generated crypto password for viewing
- if ($node_system_access=='crypto') {
- $_SESSION['crypto'][$id]=$key;
- }
}
$params['node_parent']=$node_parent;
$params['node_system_access']=$node_system_access;
$params['node_creator']=$_SESSION['user_id'];
- $params['node_content']=$node_content;
+ $params['node_content']=mysql_escape_string($node_content);
$params['external_link']=$external_link;
nodes::addNode($params);
return true;
- }
- ?>
+}
+
+?>