added: parameter 'l' to 'ls' function

added: Db::ItemQuery struct for querying items
changed: some refactoring (renamed some config variables)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@589 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-02-22 22:52:09 +00:00
parent 16e51cd4e5
commit 3702efc5be
29 changed files with 396 additions and 195 deletions

View File

@@ -519,7 +519,7 @@ bool compressing = data.compression && role == responder && redirect_to.empty()
// if there is a redirect or a file to send then we do not send a content
return;
if( header == h_200 && role == authorizer && is_item && item.static_auth != Item::static_none )
if( header == h_200 && role == authorizer && is_item && item.auth != Item::auth_none )
// if there is an item and the item has 'file' storage we do not send a content
return;
@@ -867,21 +867,21 @@ bool Request::CanUseUpload(const Item & item, bool check_root)
if( !data.mounts.pmount )
return false;
if( data.mounts.pmount->fs == Mount::simplefs && data.static_simplefs_dir.empty() )
if( data.mounts.pmount->fs == Mount::simplefs && data.auth_simplefs_dir.empty() )
{
log << log1 << "Request: can't use upload function, static_simplefs_dir must be set in the config file" << logend;
log << log1 << "Request: can't use upload function, auth_simplefs_dir must be set in the config file" << logend;
return false;
}
if( data.mounts.pmount->fs == Mount::hashfs && data.static_hashfs_dir.empty() )
if( data.mounts.pmount->fs == Mount::hashfs && data.auth_hashfs_dir.empty() )
{
log << log1 << "Request: can't use upload function, static_hashfs_dir must be set in the config file" << logend;
log << log1 << "Request: can't use upload function, auth_hashfs_dir must be set in the config file" << logend;
return false;
}
if( data.static_tmp_dir.empty() )
if( data.auth_tmp_dir.empty() )
{
log << log1 << "Request: can't use upload function, static_tmp_dir must be set in the config file" << logend;
log << log1 << "Request: can't use upload function, auth_tmp_dir must be set in the config file" << logend;
return false;
}
@@ -943,11 +943,11 @@ bool Request::MakePathSimpleFs(std::string & path, bool create_dir)
{
size_t i;
path = data.static_simplefs_dir;
path = data.auth_simplefs_dir;
if( path.empty() )
{
log << log1 << "Request: static_simplefs_dir is not set in the config file" << logend;
log << log1 << "Request: auth_simplefs_dir is not set in the config file" << logend;
return false;
}
@@ -979,10 +979,10 @@ char * hash = buffer;
buffer[0] = '0';
sprintf(buffer+1, "%lx", (unsigned long)id);
path = data.static_hashfs_dir;
path = data.auth_hashfs_dir;
if( path.empty() )
{
log << log1 << "Request: static_hashfs_dir is not set in the config file" << logend;
log << log1 << "Request: auth_hashfs_dir is not set in the config file" << logend;
return false;
}