added: to the Item: auth_path - a path to a static file (if auth is different from auth_none)

added: function 'mv' (move)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@596 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-03-15 01:47:26 +00:00
parent ebd868fa33
commit 6fbcffe63b
33 changed files with 1122 additions and 319 deletions

View File

@@ -211,10 +211,10 @@ void Content::MakeStandardFunction()
else
if( request.pfunction->code == FUN_UPTIME )
{ /* do nothing */ }
/* else
else
if( request.pfunction->code == FUN_MV )
FunMv();
else
/* else
if( request.pfunction->code == FUN_UNAME )
FunUname();
*/
@@ -309,6 +309,10 @@ void Content::MakePost()
PostFunAddUser();
break;
case FUN_MV:
PostFunMv();
break;
default:
log << log1 << "Content: unknown post function" << logend;
break;
@@ -375,6 +379,9 @@ void Content::Make()
if( request.session->spam_score > 0 )
log << log1 << "Content: spam score: " << request.session->spam_score << logend;
if( request.IsParam("noredirect") )
request.redirect_to.clear();
if( !request.redirect_to.empty() )
return;
@@ -397,7 +404,7 @@ void Content::Make()
// !! mozna zrobic jakas obsluge kiedy nie mozemy sie redirectnac, np gdy wystapil blad
// !! moze zwracac jakas wartosc?
void Content::RedirectTo(const Item & item)
void Content::RedirectTo(const Item & item, const char * postfix)
{
std::string path;
@@ -418,11 +425,14 @@ std::string path;
request.redirect_to += path;
request.redirect_to += item.url;
}
if( postfix )
request.redirect_to += postfix;
}
void Content::RedirectTo(long item_id)
void Content::RedirectTo(long item_id, const char * postfix)
{
std::string path;
Item * pdir;
@@ -455,6 +465,9 @@ Item * pdir;
log << log1 << "Content: Can't redirect: no such item: id: " << item_id << logend;
}
}
if( postfix )
request.redirect_to += postfix;
}