added: 'subject' winix function is using WINIX_FILE_CHANGED message now (when changing a file's subject)
added: 'postredirect' global parameter (it can be a param or post value) you can use this parameter in a html POST form after processing the POST request winix will make a redirect to the value git-svn-id: svn://ttmath.org/publicrep/winix/trunk@881 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
21
core/app.cpp
21
core/app.cpp
@@ -465,6 +465,25 @@ bool sent = false;
|
||||
}
|
||||
|
||||
|
||||
void App::CheckPostRedirect()
|
||||
{
|
||||
if( cur.request->method == Request::post )
|
||||
{
|
||||
if( cur.request->IsParam(L"postredirect") )
|
||||
{
|
||||
cur.request->redirect_to = cur.request->ParamValue(L"postredirect");
|
||||
cur.request->redirect_type = 303;
|
||||
}
|
||||
else
|
||||
if( cur.request->IsPostVar(L"postredirect") )
|
||||
{
|
||||
cur.request->redirect_to = cur.request->PostVar(L"postredirect");
|
||||
cur.request->redirect_type = 303;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// zmienic nazwe np na ProcessRequest
|
||||
// !! ta nazwa chyba juz zajeta...
|
||||
void App::Make()
|
||||
@@ -494,6 +513,8 @@ void App::Make()
|
||||
if( cur.request->status == WINIX_ERR_OK )
|
||||
plugin.Call(WINIX_PROCESS_REQUEST);
|
||||
|
||||
CheckPostRedirect();
|
||||
|
||||
if( !cur.request->redirect_to.empty() )
|
||||
return;
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -130,6 +130,7 @@ private:
|
||||
bool ShouldNotUseSSL();
|
||||
bool CheckSSLcorrectness();
|
||||
void SetLocale();
|
||||
void CheckPostRedirect();
|
||||
void MakePage();
|
||||
void Make();
|
||||
void SaveSessionsIfNeeded(); // !! wywalic do menagera sesji??
|
||||
|
Reference in New Issue
Block a user