fix for bug 102043 - hide redirected URLs after adding them to global history

r=radha, sr=rpotts
This commit is contained in:
alecf%netscape.com 2001-11-19 20:22:14 +00:00
Родитель e5539c0bc8
Коммит 12bb7e7da4
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -3327,6 +3327,19 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
ShouldAddToGlobalHistory(uri, &updateHistory);
if (updateHistory) {
AddToGlobalHistory(uri);
// this is a redirect, so hide the page from
// being enumerated in history
// this is temporary until bug 71482 is fixed
if (mGlobalHistory) {
nsCOMPtr<nsIBrowserHistory> browserHistory =
do_QueryInterface(mGlobalHistory);
if (browserHistory) {
nsXPIDLCString urlString;
if (NS_SUCCEEDED(uri->GetSpec(getter_Copies(urlString))))
browserHistory->HidePage(urlString);
}
}
}
} // uri
} // channel