Fix for bug # 55055 r=adamlock sr=rpotts

This commit is contained in:
radha%netscape.com 2000-10-19 06:40:46 +00:00
Родитель 2deb0e499f
Коммит 02b23a1dbe
3 изменённых файлов: 16 добавлений и 5 удалений

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

@ -21,4 +21,4 @@ dnsNotFound=%s could not be found. Please check the name and try again.
protocolNotFound=%s is not a registered protocol.
connectionFailure=The connection was refused when attempting to contact %s.
netTimeout=The operation timed out when attempting to contact %s.
repost=The page to be loaded has form elements with post data. Do you want to repost the form data?
repost=The page you are trying to view processes data you entered in an online form(such as an order form or a membership application) earlier in this Netscape 6 session. To view the page, re-submitting the data, click Yes. Otherwise, click Cancel.

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

@ -4054,10 +4054,14 @@ NS_IMETHODIMP nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry)
nsresult rv = stringBundle->GetStringFromName(NS_ConvertASCIItoUCS2("repost").GetUnicode(),
getter_Copies(messageStr));
if (NS_SUCCEEDED(rv) && messageStr) {
if (NS_SUCCEEDED(rv) && messageStr) {
prompter->Confirm(nsnull, messageStr, &repost);
if (!repost)
postData = nsnull;
/* If the user pressed cancel in the dialog,
* return failure. Don't try to load the page with out
* the post data.
*/
if (!repost)
return NS_ERROR_FAILURE;
}
}
}

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

@ -507,7 +507,14 @@ nsSHistory::LoadEntry(PRInt32 aIndex, PRBool aReloadFlag, long aLoadType)
loadInfo->SetLoadType(aLoadType);
loadInfo->SetSHEntry(nextEntry);
// Time to initiate a document load
return docShell->LoadURI(nexturi, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE);
nsresult rv = docShell->LoadURI(nexturi, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE);
/* If the loadURI call failed for some reason,
* reset mIndex to what it was. so that back/forward
* won't misbehave
*/
if (!NS_SUCCEEDED(rv))
mIndex = oldIndex;
return rv;
}