From: <sy...@us...> - 2007-02-28 22:54:21
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv23962 Modified Files: tiki-view_blog.php Log Message: [FIX]blog: rollback 1.39.2.6 commit by runix2 - the guy is no more around - The comment was 'Fixes problems with wysiwyg editor' but it doesn't parse anymore correctly page with special char as ~169~. I do not understand why edit problem interfers(the editor = edit) with display problem.. Index: tiki-view_blog.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-view_blog.php,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- tiki-view_blog.php 12 Feb 2007 12:14:15 -0000 1.58 +++ tiki-view_blog.php 28 Feb 2007 22:54:20 -0000 1.59 @@ -36,11 +36,17 @@ $smarty->display("error.tpl"); die; } +if (!$blog_data = $tikilib->get_blog($_REQUEST["blogId"])) { + $smarty->assign('msg', tra('Incorrect param')); + $smarty->display("error.tpl"); + die; +} $smarty->assign('individual', 'n'); if ($userlib->object_has_one_permission($_REQUEST["blogId"], 'blog')) { $smarty->assign('individual', 'y'); + $blog_data['public'] = 'n'; if ($tiki_p_admin != 'y') { // Now get all the permissions that are set for this type of permissions 'image gallery' @@ -64,6 +70,7 @@ $perms_array = $categlib->get_object_categories_perms($user, 'blog', $_REQUEST['blogId']); if ($perms_array) { $is_categorized = TRUE; + $blog_data['public'] = 'n'; foreach ($perms_array as $perm => $value) { $$perm = $value; } @@ -92,14 +99,13 @@ $smarty->assign('tiki_p_read_blog', 'y'); } -if ($tiki_p_read_blog != 'y') { +if ($tiki_p_read_blog != 'y' && $blog_data['public'] != 'y' && $user != $blog_data['user']) { $smarty->assign('msg', tra("Permission denied you can not view this section")); $smarty->display("error.tpl"); die; } -$blog_data = $tikilib->get_blog($_REQUEST["blogId"]); $ownsblog = 'n'; if ($user && $user == $blog_data["user"]) { @@ -190,7 +196,7 @@ $temp_max = count($listpages["data"]); for ($i = 0; $i < $temp_max; $i++) { - $listpages["data"][$i]["parsed_data"] =preg_replace("/&#([0-9]+);/me", "chr('\\1')", strtr($tikilib->parse_data($bloglib->get_page($listpages["data"][$i]["data"], 1)), array_flip(get_html_translation_table(HTML_ENTITIES)))) ; + $listpages["data"][$i]["parsed_data"] =$tikilib->parse_data($bloglib->get_page($listpages["data"][$i]["data"], 1)); if ($feature_freetags == 'y') { // And get the Tags for the posts $listpages["data"][$i]["freetags"] = $freetaglib->get_tags_on_object($listpages["data"][$i]["postId"], "blog post"); |