Commit 2f789145 authored by sampaioprimo's avatar sampaioprimo

[MRG] Automatic merge, branches/7.x 34576 to 34583

parent 951bdb5b
......@@ -551,7 +551,7 @@ class BlogLib extends TikiDb_Bridge
$res['avatar'] = $tikilib->get_user_avatar($res['user']);
if (isset($res['excerpt'])) {
$res['excerpt'] = $tikilib->parse_data($res['excerpt']);
$res['excerpt'] = $tikilib->parse_data($res['excerpt'], array('is_html' => true));
}
$ret[] = $res;
......@@ -698,6 +698,8 @@ class BlogLib extends TikiDb_Bridge
}
$data = TikiFilter::get('purifier')->filter($data);
$excerpt = TikiFilter::get('purifier')->filter($excerpt);
$query = "insert into `tiki_blog_posts`(`blogId`,`data`,`excerpt`,`created`,`user`,`title`,`priv`,`wysiwyg`) values(?,?,?,?,?,?,?,?)";
$result = $this->query($query, array((int) $blogId, $data, $excerpt, (int) $created, $user, $title, $priv, $wysiwyg));
$query = "select max(`postId`) from `tiki_blog_posts` where `created`=? and `user`=?";
......@@ -930,6 +932,9 @@ class BlogLib extends TikiDb_Bridge
) {
global $tikilib, $prefs;
$data = TikiFilter::get('purifier')->filter($data);
$excerpt = TikiFilter::get('purifier')->filter($excerpt);
$wysiwyg=$is_wysiwyg==TRUE?'y':'n';
if ($prefs['feature_blog_edit_publish_date'] == 'y') {
if(!$created) {
......
......@@ -45,7 +45,8 @@ if ($output["data"] == "EMPTY") {
include_once ('tiki-sefurl.php');
foreach($changes["data"] as $data) {
$data["$descId"] = $tikilib->parse_data($data[$descId], array(
'print' => true
'print' => true,
'is_html' => true,
));
$data['sefurl'] = filter_out_sefurl(sprintf($readrepl, $data['postId']) , $smarty, 'blogpost', $data['title']);
$tmp[] = $data;
......
......@@ -31,7 +31,7 @@ if (!$blog_data) {
die;
}
$parsed_data = $tikilib->parse_data($post_info["data"]);
$parsed_data = $tikilib->parse_data($post_info["data"], array('is_html' => true));
$parsed_data = preg_replace('/\.\.\.page\.\.\./','<hr />',$parsed_data);
$smarty->assign('blog_data', $blog_data);
......
......@@ -115,7 +115,7 @@ $date_max = isset($_REQUEST['date_max']) ? $_REQUEST['date_max'] : $tikilib->now
$listpages = $bloglib->list_blog_posts($_REQUEST["blogId"], true, $offset, $blog_data["maxPosts"], $sort_mode, $find, $date_min, $date_max);
$temp_max = count($listpages["data"]);
for ($i = 0; $i < $temp_max; $i++) {
$listpages["data"][$i]["parsed_data"] = $tikilib->parse_data($bloglib->get_page($listpages["data"][$i]["data"], 1), array('is_html' => ($listpages["data"][$i]["wysiwyg"]=='y'?TRUE:FALSE)));
$listpages["data"][$i]["parsed_data"] = $tikilib->parse_data($bloglib->get_page($listpages["data"][$i]["data"], 1), array('is_html' => true));
if ($prefs['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");
}
......
......@@ -106,7 +106,7 @@ $smarty->assign('find', $_REQUEST["find"]);
$offset = $_REQUEST["offset"];
$sort_mode = $_REQUEST["sort_mode"];
$find = $_REQUEST["find"];
$parsed_data = $tikilib->parse_data($post_info["data"], array('is_html' => ($post_info["wysiwyg"]=='y'?TRUE:FALSE)));
$parsed_data = $tikilib->parse_data($post_info["data"], array('is_html' => true));
if (!isset($_REQUEST['page'])) $_REQUEST['page'] = 1;
$pages = $bloglib->get_number_of_pages($parsed_data);
$post_info['parsed_data'] = $bloglib->get_page($parsed_data, $_REQUEST['page']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment