- json_generic_serializer was not set when there was a redirect

- if there is a redirect and the json return answer is requested
  then we send 'redirect_to' field in 'info' space




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1169 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-02-19 10:36:20 +00:00
parent 4f8db81c85
commit 8895f0dcac
4 changed files with 49 additions and 30 deletions

View File

@@ -106,19 +106,6 @@ return true;
*/
// !! zmienic nazwy
// albo w ogole te metody nie sa potrzebne teraz (byly zmiany)
void Emacs::DoRedirectIfNeeded(bool adding)
{
if( cur->request->ParamValue(L"reqtype") != L"json" )
{
system->RedirectTo(cur->request->item);
}
}
int Emacs::NotifyCodeEdit()
{
// !! nie potrzebne
@@ -172,19 +159,17 @@ void Emacs::MakePost()
if( cur->request->status == WINIX_ERR_OK )
{
DoRedirectIfNeeded(adding);
if( adding )
{
system->RedirectToLastFunction(nullptr, false);
}
functions->CheckSpecialFile(cur->request->item);
}
else
{
log << log1 << "Emacs: error: " << cur->request->status << logend;
}
if( cur->request->ParamValue(L"reqtype") == L"json" )
{
cur->request->info.Add(L"status", cur->request->status);
}
}