[Comoblog-commit] comoblog/batch comoblog_batch.php,1.4,1.5
Status: Inactive
Brought to you by:
markwallis
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:45:48
|
Update of /cvsroot/comoblog/comoblog/batch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14199/batch Modified Files: comoblog_batch.php Log Message: Added functionality to allow pre and post database save post filtering. This is prework for the mod_search module Index: comoblog_batch.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/batch/comoblog_batch.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- comoblog_batch.php 4 Oct 2005 05:39:06 -0000 1.4 +++ comoblog_batch.php 5 Oct 2005 00:45:34 -0000 1.5 @@ -55,11 +55,11 @@ else $post['post_mail_body'] = clean_up_html($post['post_mail_body'], true); - // apply filters - global $POST_FILTERS; - if (count($POST_FILTERS) > 0) { - for ($filter_cnt = 0; $filter_cnt < count($POST_FILTERS); $filter_cnt++) { - include (CFG_BASE_PATH.'/modules/'.$POST_FILTERS[$filter_cnt].'/'.$POST_FILTERS[$filter_cnt].'_post_filter.php'); + // apply pre filters + global $POST_PRE_FILTERS; + if (count($POST_PRE_FILTERS) > 0) { + for ($filter_cnt = 0; $filter_cnt < count($POST_PRE_FILTERS); $filter_cnt++) { + include (CFG_BASE_PATH.'/modules/'.$POST_PRE_FILTERS[$filter_cnt].'/'.$POST_PRE_FILTERS[$filter_cnt].'_post_filter.php'); } } @@ -94,6 +94,15 @@ $res = mysql_query($query); $post_id = mysql_insert_id(); + $post['post_id'] = $post_id; + + // apply post filters + global $POST_POST_FILTERS; + if (count($POST_POST_FILTERS) > 0) { + for ($filter_cnt = 0; $filter_cnt < count($POST_POST_FILTERS); $filter_cnt++) { + include (CFG_BASE_PATH.'/modules/'.$POST_POST_FILTERS[$filter_cnt].'/'.$POST_POST_FILTERS[$filter_cnt].'_post_filter.php'); + } + } for ($i = 0; $i < $howmany_images; $i++) { if ($post['images_mime'][$i] == 'image/jpg') |