mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Compression sur le content et correction bug
- Rajout de gzinflate() et base64_encode() sur le "content". - Correction bug si tentative de suppression répertoire archiveImg non existant
This commit is contained in:
parent
7144cb9dc7
commit
aa18d7bb62
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
2
view.php
2
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue