added: parameters consist of a name and a value now

sample: /dir/dir2/function/paramname:paramvalue
removed: TemplatesMisc namespace



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@618 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-07-04 20:27:14 +00:00
parent 76e32703ac
commit 50cb88c5ed
17 changed files with 150 additions and 51 deletions

View File

@@ -535,13 +535,15 @@ bool compressing = data.compression && role == responder && redirect_to.empty()
bool Request::IsParam(const char * s)
bool Request::IsParam(const char * param_name)
{
std::vector<std::string*>::iterator i;
ParamTable::iterator i;
for(i=param_table.begin() ; i!=param_table.end() ; ++i)
{
if( **i == s )
// !! make sure that exists std::string::operator==(const char*)
// (optimization)
if( i->name == param_name )
return true;
}
@@ -549,6 +551,21 @@ return false;
}
const std::string & Request::ParamValue(const char * param_name)
{
ParamTable::iterator i;
for(i=param_table.begin() ; i!=param_table.end() ; ++i)
{
if( i->name == param_name )
{
return i->value;
}
}
return str_empty;
}
bool Request::CanChangeUser(const Item & item, long new_user_id)
{