Pull name from db if enabled in overboard.php and remove quotes in display

This commit is contained in:
Retro_Guy 2021-04-06 01:39:40 -07:00
parent a8d52c97c6
commit 5932d4a9c6
2 changed files with 10 additions and 7 deletions

View File

@ -1228,6 +1228,7 @@ function format_log_date() {
function create_name_link($name) {
global $CONFIG;
$name = preg_replace('/\"/', '', $name);
if(strpos($name, '...@') !== false && (isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true)) {
$return = '<span class="visited">'.substr(htmlspecialchars($name),0,20).'</span>';
} else {

View File

@ -109,7 +109,7 @@ foreach($grouplist as $findgroup) {
$query->execute(['findgroup' => $findgroup]);
while (($overviewline = $query->fetch()) !== false) {
$articles[] = $spoolpath.$thisgroup.'/'.$overviewline['number'];
$db_articles[] = $findgroup.':'.$overviewline['number'].':'.$overviewline['date'];
$db_articles[] = $findgroup.':'.$overviewline['number'].':'.$overviewline['date'].':'.$overviewline['name'];
}
}
}
@ -237,11 +237,13 @@ foreach($files as $article) {
if(trim($this_encoding[1]) == "base64") {
$body=base64_decode($body);
}
preg_match('/From:.*/', htmlspecialchars($header), $articlefrom);
$isfrom = explode("From: ", $articlefrom[0]);
$articlefrom[0] = $isfrom[1];
if($CONFIG['article_database'] == '1') {
$articlefrom[0] = $data[3];
} else {
preg_match('/From:.*/', htmlspecialchars($header), $articlefrom);
$isfrom = explode("From: ", $articlefrom[0]);
$articlefrom[0] = $isfrom[1];
}
$fromoutput = explode("<", html_entity_decode($articlefrom[0]));
// Just an email address?
@ -271,7 +273,7 @@ foreach($files as $article) {
} else {
$poster_name = $fromoutput[0];
}
$poster_name = trim($poster_name, "\"");
echo '<p class=np_ob_posted_date>Posted: '.$date_interval.' by: '.create_name_link(mb_decode_mimeheader($poster_name)).'</p>';
// echo '<p class=np_ob_posted_date>Posted: '.$date_interval.' by: '.mb_decode_mimeheader($fromoutput[0]).'</p>';
# Try to display useful snippet