// If it seems to be a reply but a header couldn't be found take the last message with matching subject
if(!x($datarray,'parent-uri')and$reply){
$r=q("SELECT `uri` , `parent-uri` FROM `item` WHERE MATCH (`title`) AGAINST ('".'"%s"'."' IN BOOLEAN MODE) AND `uid` = %d ORDER BY `created` DESC LIMIT 1",
//$r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE MATCH (`title`) AGAINST ('".'"%s"'."' IN BOOLEAN MODE) AND `uid` = %d ORDER BY `created` DESC LIMIT 1",
$r=q("SELECT `uri` , `parent-uri` FROM `item` WHERE `title` = \"%s\" AND `uid` = %d ORDER BY `created` DESC LIMIT 1",
@ -509,6 +511,7 @@ function admin_page_site(&$a) {
'$itemcache_duration'=>array('itemcache_duration',t("Cache duration in seconds"),get_config('system','itemcache_duration'),t("How long should the cache files be hold? Default value is 86400 seconds (One day).")),
'$lockpath'=>array('lockpath',t("Path for lock file"),get_config('system','lockpath'),"The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
'$temppath'=>array('temppath',t("Temp path"),get_config('system','temppath'),"If you have a restricted system where the webserver can't access the system temp path, enter another path here."),
'$basepath'=>array('basepath',t("Base path to installation"),get_config('system','basepath'),"If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),