Compare commits
2 Commits
d52936c9d9
...
e6a3cbf774
Author | SHA1 | Date |
---|---|---|
Retro_Guy | e6a3cbf774 | |
Retro_Guy | c7e05a3f9d |
|
@ -1549,9 +1549,14 @@ function create_xref_from_msgid($msgid, $thisgroup = null, $thisnumber = null)
|
|||
return ($xref);
|
||||
}
|
||||
|
||||
function get_search_snippet($body, $content_type = '')
|
||||
function get_search_snippet($body, $content_type = '', $content_transfer_encoding = null)
|
||||
{
|
||||
$body = quoted_printable_decode($body);
|
||||
if($content_transfer_encoding == 'base64') {
|
||||
$body = base64_decode($body);
|
||||
}
|
||||
if($content_transfer_encoding == 'quoted-printable') {
|
||||
$body = quoted_printable_decode($body);
|
||||
}
|
||||
if ($content_type !== '') {
|
||||
$mysnippet = recode_charset($body, $content_type, "utf8");
|
||||
} else {
|
||||
|
|
|
@ -116,6 +116,7 @@ if ((! isset($_POST['key']) || ! password_verify($CONFIG['thissitekey'], $_POST[
|
|||
echo '<input name="block_poster" type="hidden" id="block_poster" value="' . $_GET['terms'] . '"></td>';
|
||||
echo '</tr>';
|
||||
echo '<td><input type="submit" name="Submit" value="Add poster to my block list"></td>';
|
||||
echo '<tr><td>(refresh pages if articles still appear)</td></tr>';
|
||||
echo '</tr></table></td></form>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,6 +291,7 @@ function get_articles($ns, $group)
|
|||
$integrity = false;
|
||||
$is_header = 1;
|
||||
$body = "";
|
||||
$content_transfer_encoding = null;
|
||||
while (strcmp($response, ".") != 0) {
|
||||
$is_xref = false;
|
||||
$bytes = $bytes + mb_strlen($response, '8bit');
|
||||
|
@ -338,6 +339,12 @@ function get_articles($ns, $group)
|
|||
$banned = "subject_filter";
|
||||
}
|
||||
}
|
||||
// Transfer encoding
|
||||
if (stripos($response, "Content-Transfer-Encoding: ") === 0) {
|
||||
$enco = explode(': ', $response, 2);
|
||||
$content_transfer_encoding = $enco[1];
|
||||
}
|
||||
|
||||
if (stripos($response, "Newsgroups: ") === 0) {
|
||||
$response = str_ireplace($group, $group, $response);
|
||||
// Identify each group name for xref
|
||||
|
@ -435,7 +442,7 @@ function get_articles($ns, $group)
|
|||
if ($CONFIG['article_database'] == '1') {
|
||||
unlink($articleHandle);
|
||||
// CREATE SEARCH SNIPPET
|
||||
$this_snippet = get_search_snippet($body, $content_type[1]);
|
||||
$this_snippet = get_search_snippet($body, $content_type[1], $content_transfer_encoding);
|
||||
} else {
|
||||
if ($article_date > time()) {
|
||||
$article_date = time();
|
||||
|
|
Loading…
Reference in New Issue