fixed: winix_subdomain ezc function
didn't print the subdomain added: to rm winix function: bool Rm::RemoveItemByPath(const std::wstring & path, bool check_access) fixed: in Upload winix function when uploading an image we have to get a mount point where the image is placed (parent dir) (it was cur->mount beforehand) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@844 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -35,10 +35,6 @@ bool Upload::HasAccess(const Item & item)
|
||||
// you can use 'upload' only in a directory
|
||||
if( item.type != Item::dir )
|
||||
return false;
|
||||
|
||||
// we must know where to store the file
|
||||
if( !system->mounts.pmount )
|
||||
return false;
|
||||
|
||||
if( config->upload_dir.empty() )
|
||||
{
|
||||
@@ -93,7 +89,7 @@ bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_fi
|
||||
|
||||
void Upload::ResizeImage(Item & item)
|
||||
{
|
||||
::Mount & m = *cur->mount;
|
||||
::Mount * m = system->mounts.CalcMount(item.parent_id);
|
||||
size_t cx = config->image_cx;
|
||||
size_t cy = config->image_cy;
|
||||
int mode = config->image_mode;
|
||||
@@ -102,23 +98,23 @@ void Upload::ResizeImage(Item & item)
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParImageSize();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 2 )
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
cx = Tol(m.param[index].arg[0]);
|
||||
cy = Tol(m.param[index].arg[1]);
|
||||
cx = Tol(m->param[index].arg[0]);
|
||||
cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading image mode from the mount point (if exists)
|
||||
index = system->mounts.MountParImageMode();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 1 )
|
||||
mode = Toi(m.param[index].arg[0]);
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParImageQuality();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 1 )
|
||||
quality = Toi(m.param[index].arg[0]);
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
system->image.Resize(item, cx, cy, mode, quality);
|
||||
}
|
||||
@@ -127,7 +123,7 @@ void Upload::ResizeImage(Item & item)
|
||||
|
||||
void Upload::CreateThumb(Item & item)
|
||||
{
|
||||
::Mount & m = *cur->mount;
|
||||
::Mount * m = system->mounts.CalcMount(item.parent_id);
|
||||
size_t cx = config->thumb_cx;
|
||||
size_t cy = config->thumb_cy;
|
||||
int mode = config->thumb_mode;
|
||||
@@ -136,23 +132,23 @@ void Upload::CreateThumb(Item & item)
|
||||
// reading width and height from the mount point (if exists)
|
||||
int index = system->mounts.MountParThumbSize();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 2 )
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 2 )
|
||||
{
|
||||
cx = Tol(m.param[index].arg[0]);
|
||||
cy = Tol(m.param[index].arg[1]);
|
||||
cx = Tol(m->param[index].arg[0]);
|
||||
cy = Tol(m->param[index].arg[1]);
|
||||
}
|
||||
|
||||
// reading thumb mode from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbMode();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 1 )
|
||||
mode = Toi(m.param[index].arg[0]);
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
mode = Toi(m->param[index].arg[0]);
|
||||
|
||||
// reading image quality from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbQuality();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 1 )
|
||||
quality = Toi(m.param[index].arg[0]);
|
||||
if( m && m->param[index].defined && m->param[index].arg.size() == 1 )
|
||||
quality = Toi(m->param[index].arg[0]);
|
||||
|
||||
system->image.CreateThumb(item, cx, cy, mode, quality);
|
||||
}
|
||||
|
Reference in New Issue
Block a user