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:
2012-09-04 20:24:42 +00:00
parent 43b4075b16
commit 0c6ddc2218
34 changed files with 194 additions and 10 deletions

View File

@@ -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;