diff --git a/inc/functions.php b/inc/functions.php index 7c475749a..056339b0d 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -112,7 +112,7 @@ function prepare_url($url,$id) { $content = $r->articleContent->innerHTML; $parametres['title'] = $r->articleTitle->innerHTML; - $parametres['content']=filtre_img($content, $url, $id); + $parametres['content']=base64_encode(gzdeflate(filtre_img($content, $url, $id))); return $parametres; } } @@ -205,11 +205,14 @@ function makeArchiveRep($rep) //supprime le répertoire si on supprime le lien. function delArchiveRep($rep) { + if(is_dir($rep)) + { $files = array_diff(scandir($rep), array('.','..')); foreach ($files as $file) { (is_dir("$rep/$file")) ? delTree("$rep/$file") : unlink("$rep/$file"); } return rmdir($rep); + } } /** diff --git a/view.php b/view.php index dfc26b9d5..f0ae63d42 100755 --- a/view.php +++ b/view.php @@ -20,7 +20,7 @@ if(!empty($id)) { $tpl->assign('id', $entry[0]['id']); $tpl->assign('url', $entry[0]['url']); $tpl->assign('title', $entry[0]['title']); - $tpl->assign('content', $entry[0]['content']); + $tpl->assign('content', gzinflate(base64_decode($entry[0]['content']))); $tpl->assign('is_fav', $entry[0]['is_fav']); $tpl->assign('is_read', $entry[0]['is_read']); $tpl->assign('load_all_js', 0);