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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user