From 6c64fd5afdf7cba8b24f475ba61d8c1c052d024a Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Fri, 25 Feb 2022 05:14:20 +0000 Subject: [PATCH] Fix searching user by link in search.php --- Rocksolid_Light/rocksolid/search.php | 45 +++++++++++++++------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/Rocksolid_Light/rocksolid/search.php b/Rocksolid_Light/rocksolid/search.php index 7b4f315..280679d 100644 --- a/Rocksolid_Light/rocksolid/search.php +++ b/Rocksolid_Light/rocksolid/search.php @@ -36,7 +36,11 @@ include "head.inc"; echo ''; echo ''; echo ''; - echo 'Search Terms: '; + if(!isset($_REQUEST['data'])) { + echo 'Search Terms: '; + } else { + echo 'Search Poster: '; + } echo ''; echo ''; @@ -205,25 +209,25 @@ $results=0; echo ''.$overviewline['newsgroup'].''; echo '

'; - - $articlefrom[0] = $overviewline['name']; - $fromoutput = explode("<", html_entity_decode($articlefrom[0])); -// Just an email address? - if(strlen($fromoutput[0]) < 2) { - preg_match("/\<([^\)]*)\@/", html_entity_decode($articlefrom[0]), $fromaddress); - $fromoutput[0] = $fromaddress[1]; - } - if(strpos($fromoutput[0], "(")) { - preg_match("/\(([^\)]*)\)/", html_entity_decode($articlefrom[0]), $fromaddress); - $fromoutput[0] = $fromaddress[1]; - } - if((isset($CONFIG['hide_email']) && $CONFIG['hide_email'] == true) && (strpos($fromoutput[0], '@') !== false)) { - $poster_name = truncate_email($fromoutput[0]); - } else { - $poster_name = $fromoutput[0]; - } - $poster_name = trim(mb_decode_mimeheader($poster_name), " \n\r\t\v\0\""); - echo '

Posted: '.$newdate.' by: '.create_name_link($poster_name).'

'; + $fromline = address_decode($overviewline['name'],"nirgendwo"); + if (!isset($fromline[0]["host"])) $fromline[0]["host"]=""; + $name_from=$fromline[0]["mailbox"]."@".$fromline[0]["host"]; + $name_username=$fromline[0]["mailbox"]; + if (!isset($fromline[0]["personal"])) { + $poster_name=$fromline[0]["mailbox"]; + } else { + $poster_name=$fromline[0]["personal"]; + } + if(trim($poster_name) == '') { + $fromoutput = explode("<", html_entity_decode($c->name)); + if(strlen($fromoutput[0]) < 1) { + $poster_name = $fromoutput[1]; + } else { + $poster_name = $fromoutput[0]; + } + } + + echo '

Posted: '.$newdate.' by: '.create_name_link($poster_name, $name_from).'

'; if($_POST['searchpoint'] == 'body') { $snip = strip_tags(quoted_printable_decode($overviewline['snippet']), ''); } else { @@ -234,7 +238,6 @@ $results=0; echo ''; if($results++ > ($maxdisplay - 2)) break; -// } } echo '';