Skip to content

Commit 6b9314c

Browse files
committed
Revert "Added ignoreCache parameter to loadBrowserURL"
This reverts commit 85df037.
1 parent 51b412e commit 6b9314c

File tree

6 files changed

+10
-15
lines changed

6 files changed

+10
-15
lines changed

MTA10/core/CWebView.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void CWebView::CloseBrowser ()
7979
m_pWebView->GetHost ()->CloseBrowser ( true );
8080
}
8181

82-
bool CWebView::LoadURL ( const SString& strURL, bool bFilterEnabled, const SString& strPostData, bool bURLEncoded, bool bIgnoreCache )
82+
bool CWebView::LoadURL ( const SString& strURL, bool bFilterEnabled, const SString& strPostData, bool bURLEncoded )
8383
{
8484
if ( !m_pWebView )
8585
return false;
@@ -97,10 +97,6 @@ bool CWebView::LoadURL ( const SString& strURL, bool bFilterEnabled, const SStri
9797
if ( strPostData.empty () )
9898
{
9999
pFrame->LoadURL ( strURL );
100-
101-
// Reload immediately and flush the cache if either requested or test mode is enabled
102-
if ( bIgnoreCache || g_pCore->GetWebCore ()->IsTestModeEnabled () )
103-
m_pWebView->ReloadIgnoreCache ();
104100
}
105101
else
106102
{

MTA10/core/CWebView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CWebView : public CWebViewInterface, private CefClient, private CefRenderH
4343
void SetBeingDestroyed ( bool state ) { m_bBeingDestroyed = state; }
4444

4545
// Exported methods
46-
bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true, bool bIgnoreCache = false );
46+
bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true );
4747
bool IsLoading ();
4848
SString GetURL ();
4949
const SString& GetTitle ();

MTA10/mods/shared_logic/CClientWebBrowser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ bool CClientWebBrowser::IsLoading ()
5151
return m_pWebView->IsLoading ();
5252
}
5353

54-
bool CClientWebBrowser::LoadURL ( const SString& strURL, bool bFilterEnabled, const SString& strPostData, bool bURLEncoded, bool bIgnoreCache )
54+
bool CClientWebBrowser::LoadURL ( const SString& strURL, bool bFilterEnabled, const SString& strPostData, bool bURLEncoded )
5555
{
56-
return m_pWebView->LoadURL ( strURL, bFilterEnabled, strPostData, bURLEncoded, bIgnoreCache );
56+
return m_pWebView->LoadURL ( strURL, bFilterEnabled, strPostData, bURLEncoded );
5757
}
5858

5959
const SString& CClientWebBrowser::GetTitle ()

MTA10/mods/shared_logic/CClientWebBrowser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CClientWebBrowser : public CClientTexture, public CWebBrowserEventsInterfa
2828
inline CWebViewInterface* GetWebView () { return m_pWebView; }
2929

3030
bool IsLoading ();
31-
bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true, bool bIgnoreCache = false );
31+
bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true );
3232
const SString& GetTitle ();
3333
SString GetURL ();
3434
void SetRenderingPaused ( bool bPaused );

MTA10/mods/shared_logic/lua/CLuaFunctionDefs.Browser.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,14 @@ int CLuaFunctionDefs::RequestBrowserDomains ( lua_State* luaVM )
111111

112112
int CLuaFunctionDefs::LoadBrowserURL ( lua_State* luaVM )
113113
{
114-
// bool loadBrowserURL ( browser webBrowser, string url [, string postData = "", bool postURLEncoded = true, bool ignoreCache = false ] )
115-
CClientWebBrowser* pWebBrowser; SString strURL; SString strPostData; bool bURLEncoded; bool bIgnoreCache;
114+
// bool loadBrowserURL ( browser webBrowser, string url [, string postData = "", bool postURLEncoded = true ] )
115+
CClientWebBrowser* pWebBrowser; SString strURL; SString strPostData; bool bURLEncoded;
116116

117117
CScriptArgReader argStream ( luaVM );
118118
argStream.ReadUserData ( pWebBrowser );
119119
argStream.ReadString ( strURL );
120120
argStream.ReadString ( strPostData, "" );
121121
argStream.ReadBool ( bURLEncoded, true );
122-
argStream.ReadBool ( bIgnoreCache, false );
123122

124123
if ( !argStream.HasErrors () )
125124
{
@@ -133,7 +132,7 @@ int CLuaFunctionDefs::LoadBrowserURL ( lua_State* luaVM )
133132
return 1;
134133
}
135134

136-
lua_pushboolean ( luaVM, pWebBrowser->LoadURL ( strURL, !isLocalURL, strPostData, bURLEncoded, bIgnoreCache ) );
135+
lua_pushboolean ( luaVM, pWebBrowser->LoadURL ( strURL, !isLocalURL, strPostData, bURLEncoded ) );
137136
return 1;
138137
}
139138

@@ -149,7 +148,7 @@ int CLuaFunctionDefs::LoadBrowserURL ( lua_State* luaVM )
149148
// Output deprecated warning, TODO: Remove this at a later point
150149
m_pScriptDebugging->LogWarning ( luaVM, "This URL scheme is deprecated and may not work in future versions. Please consider using http://mta/* instead. See https://wiki.mtasa.com/wiki/LoadBrowserURL for details" );
151150

152-
lua_pushboolean ( luaVM, pWebBrowser->LoadURL ( "mtalocal://" + strURL, false, strPostData, bURLEncoded, bIgnoreCache ) );
151+
lua_pushboolean ( luaVM, pWebBrowser->LoadURL ( "mtalocal://" + strURL, false, strPostData, bURLEncoded ) );
153152
return 1;
154153
}
155154
}

MTA10/sdk/core/CWebViewInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CWebViewInterface
2020
public:
2121
virtual void Initialise () = 0;
2222
virtual void SetWebBrowserEvents( CWebBrowserEventsInterface* pInterface ) = 0;
23-
virtual bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true, bool bIgnoreCache = false ) = 0;
23+
virtual bool LoadURL ( const SString& strURL, bool bFilterEnabled = true, const SString& strPostData = SString(), bool bURLEncoded = true ) = 0;
2424
virtual bool IsLoading () = 0;
2525
virtual void SetBeingDestroyed ( bool state ) = 0;
2626

0 commit comments

Comments
 (0)