fixed: UGContainer<Type> used a std::vector<Type> and when a new item was inserted
then current iterators (and pointers) were invalidated now we are using std::vector<Type*> this caused some crashes when a new user was added by 'adduser' winix function added: plugin 'export' is able to upload files on a remote server now (not finished yet) changed: Thumb class is now called: Image and we are able to resize images too (some new options in the config and in mount points) added: some new plugin messages git-svn-id: svn://ttmath.org/publicrep/winix/trunk@764 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
72be443414
commit
39923d6617
|
@ -18,7 +18,7 @@ app.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
|
|||
app.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
||||
app.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h
|
||||
app.o: ../templates/misc.h ../templates/htmltextstream.h mounts.h
|
||||
app.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h thumb.h
|
||||
app.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h image.h
|
||||
app.o: basethread.h threadmanager.h sessionmanager.h sessioncontainer.h
|
||||
app.o: ../functions/functions.h ../functions/functionbase.h ../core/request.h
|
||||
app.o: ../core/system.h ../core/synchro.h ../functions/functionparser.h
|
||||
|
@ -64,7 +64,7 @@ config.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
config.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
config.o: ugcontainer.h lastcontainer.h ../templates/misc.h
|
||||
config.o: ../templates/htmltextstream.h mounts.h mountparser.h crypt.h run.h
|
||||
config.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
config.o: users.h groups.h group.h loadavg.h image.h basethread.h
|
||||
config.o: threadmanager.h sessionmanager.h sessioncontainer.h
|
||||
config.o: ../functions/functions.h ../functions/functionbase.h
|
||||
config.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
|
@ -124,6 +124,44 @@ groups.o: user.h plugindata.h rebus.h mount.h ../templates/locale.h
|
|||
groups.o: ../core/confparser.h
|
||||
htmlfilter.o: htmlfilter.h
|
||||
httpsimpleparser.o: httpsimpleparser.h
|
||||
image.o: image.h basethread.h textstream.h ../db/db.h ../db/dbbase.h
|
||||
image.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
|
||||
image.o: item.h requesttypes.h ../core/error.h ../db/dbitemquery.h
|
||||
image.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
image.o: ../core/dircontainer.h ../core/ugcontainer.h log.h logmanipulators.h
|
||||
image.o: slog.h cur.h request.h error.h config.h confparser.h htmlfilter.h
|
||||
image.o: ../templates/htmltextstream.h session.h user.h plugindata.h rebus.h
|
||||
image.o: mount.h ../templates/locale.h ../core/confparser.h ../core/config.h
|
||||
image.o: ../../ezc/src/utf8.h system.h dirs.h dircontainer.h
|
||||
image.o: ../notify/notify.h ../notify/notifypool.h ../templates/patterns.h
|
||||
image.o: ../templates/locale.h ../templates/localefilter.h
|
||||
image.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
image.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
image.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
image.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
image.o: ../notify/templatesnotify.h ../core/users.h ugcontainer.h
|
||||
image.o: lastcontainer.h ../templates/misc.h ../templates/htmltextstream.h
|
||||
image.o: mounts.h mountparser.h crypt.h run.h users.h groups.h group.h
|
||||
image.o: loadavg.h threadmanager.h plugin.h pluginmsg.h sessionmanager.h
|
||||
image.o: sessioncontainer.h ../functions/functions.h
|
||||
image.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
image.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
|
||||
image.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
|
||||
image.o: ../functions/privchanger.h ../functions/chown.h
|
||||
image.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
|
||||
image.o: ../functions/download.h ../functions/emacs.h ../functions/last.h
|
||||
image.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
|
||||
image.o: ../functions/ls.h ../functions/mkdir.h ../functions/mv.h
|
||||
image.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
|
||||
image.o: ../functions/priv.h ../functions/reload.h ../functions/rm.h
|
||||
image.o: ../functions/sort.h ../functions/specialdefault.h
|
||||
image.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
|
||||
image.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
|
||||
image.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
|
||||
image.o: ../core/htmlfilter.h ../templates/templates.h
|
||||
image.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
image.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
image.o: ../core/sessionmanager.h
|
||||
item.o: item.h misc.h requesttypes.h crypt.h run.h config.h confparser.h
|
||||
item.o: htmlfilter.h user.h
|
||||
lastcontainer.o: lastcontainer.h log.h textstream.h logmanipulators.h slog.h
|
||||
|
@ -196,7 +234,7 @@ mounts.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
mounts.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
mounts.o: ugcontainer.h lastcontainer.h ../templates/misc.h
|
||||
mounts.o: ../templates/htmltextstream.h mountparser.h plugin.h pluginmsg.h
|
||||
mounts.o: system.h crypt.h run.h users.h groups.h group.h loadavg.h thumb.h
|
||||
mounts.o: system.h crypt.h run.h users.h groups.h group.h loadavg.h image.h
|
||||
mounts.o: basethread.h threadmanager.h sessionmanager.h sessioncontainer.h
|
||||
mounts.o: ../functions/functions.h ../functions/functionbase.h
|
||||
mounts.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
|
@ -234,7 +272,7 @@ plugin.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
plugin.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
plugin.o: ugcontainer.h lastcontainer.h ../templates/misc.h
|
||||
plugin.o: ../templates/htmltextstream.h mounts.h mountparser.h crypt.h run.h
|
||||
plugin.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
plugin.o: users.h groups.h group.h loadavg.h image.h basethread.h
|
||||
plugin.o: threadmanager.h sessionmanager.h sessioncontainer.h
|
||||
plugin.o: ../functions/functions.h ../functions/functionbase.h
|
||||
plugin.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
|
@ -274,7 +312,7 @@ plugindata.o: ../core/basethread.h synchro.h ../notify/templatesnotify.h
|
|||
plugindata.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h
|
||||
plugindata.o: ../templates/misc.h ../templates/htmltextstream.h mounts.h
|
||||
plugindata.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h
|
||||
plugindata.o: thumb.h basethread.h threadmanager.h sessionmanager.h
|
||||
plugindata.o: image.h basethread.h threadmanager.h sessionmanager.h
|
||||
plugindata.o: sessioncontainer.h ../functions/functions.h
|
||||
plugindata.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
plugindata.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
|
||||
|
@ -326,7 +364,7 @@ request.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
request.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
request.o: ugcontainer.h lastcontainer.h ../templates/misc.h
|
||||
request.o: ../templates/htmltextstream.h mounts.h mountparser.h crypt.h run.h
|
||||
request.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
request.o: users.h groups.h group.h loadavg.h image.h basethread.h
|
||||
request.o: threadmanager.h sessionmanager.h sessioncontainer.h
|
||||
request.o: ../functions/functions.h ../functions/functionbase.h
|
||||
request.o: ../core/request.h ../core/system.h ../core/synchro.h
|
||||
|
@ -381,7 +419,7 @@ sessionmanager.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
sessionmanager.o: ../notify/templatesnotify.h ../core/config.h
|
||||
sessionmanager.o: ../core/users.h ugcontainer.h ../templates/misc.h
|
||||
sessionmanager.o: ../templates/htmltextstream.h mounts.h mountparser.h
|
||||
sessionmanager.o: crypt.h run.h users.h groups.h group.h loadavg.h thumb.h
|
||||
sessionmanager.o: crypt.h run.h users.h groups.h group.h loadavg.h image.h
|
||||
sessionmanager.o: basethread.h threadmanager.h sessionparser.h plugin.h
|
||||
sessionmanager.o: pluginmsg.h ../functions/functions.h
|
||||
sessionmanager.o: ../functions/functionbase.h ../core/request.h
|
||||
|
@ -435,7 +473,7 @@ system.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
|||
system.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
||||
system.o: ugcontainer.h lastcontainer.h ../templates/misc.h
|
||||
system.o: ../templates/htmltextstream.h mounts.h mountparser.h crypt.h run.h
|
||||
system.o: users.h groups.h group.h loadavg.h thumb.h basethread.h
|
||||
system.o: users.h groups.h group.h loadavg.h image.h basethread.h
|
||||
system.o: threadmanager.h ../templates/templates.h
|
||||
system.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
system.o: ../templates/patterns.h ../templates/changepatterns.h ../core/cur.h
|
||||
|
@ -462,23 +500,4 @@ threadmanager.o: item.h error.h config.h confparser.h htmlfilter.h
|
|||
threadmanager.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
|
||||
threadmanager.o: session.h user.h plugindata.h rebus.h mount.h
|
||||
threadmanager.o: ../templates/locale.h ../core/confparser.h
|
||||
thumb.o: thumb.h basethread.h textstream.h ../db/db.h ../db/dbbase.h
|
||||
thumb.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
|
||||
thumb.o: item.h requesttypes.h ../core/error.h ../db/dbitemquery.h
|
||||
thumb.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
|
||||
thumb.o: ../core/dircontainer.h ../core/ugcontainer.h log.h logmanipulators.h
|
||||
thumb.o: slog.h cur.h request.h error.h config.h confparser.h htmlfilter.h
|
||||
thumb.o: ../templates/htmltextstream.h session.h user.h plugindata.h rebus.h
|
||||
thumb.o: mount.h ../templates/locale.h ../core/confparser.h ../core/config.h
|
||||
thumb.o: ../../ezc/src/utf8.h system.h dirs.h dircontainer.h
|
||||
thumb.o: ../notify/notify.h ../notify/notifypool.h ../templates/patterns.h
|
||||
thumb.o: ../templates/locale.h ../templates/localefilter.h
|
||||
thumb.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
thumb.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
|
||||
thumb.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
|
||||
thumb.o: ../notify/notifythread.h ../core/basethread.h synchro.h
|
||||
thumb.o: ../notify/templatesnotify.h ../core/users.h ugcontainer.h
|
||||
thumb.o: lastcontainer.h ../templates/misc.h ../templates/htmltextstream.h
|
||||
thumb.o: mounts.h mountparser.h crypt.h run.h users.h groups.h group.h
|
||||
thumb.o: loadavg.h threadmanager.h
|
||||
users.o: users.h
|
||||
|
|
|
@ -1 +1 @@
|
|||
o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o confparser.o crypt.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o item.o lastcontainer.o loadavg.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionmanager.o sessionparser.o slog.o synchro.o system.o textstream.o threadmanager.o thumb.o users.o
|
||||
o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o confparser.o crypt.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o image.o item.o lastcontainer.o loadavg.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionmanager.o sessionparser.o slog.o synchro.o system.o textstream.o threadmanager.o users.o
|
||||
|
|
|
@ -127,6 +127,12 @@ void Config::AssignValues(bool stdout_is_closed)
|
|||
thumb_mode = Int(L"thumb_mode", 2);
|
||||
thumb_cx = Size(L"thumb_cx", 150);
|
||||
thumb_cy = Size(L"thumb_cy", 150);
|
||||
thumb_quality = Int(L"thumb_quality", 92);
|
||||
image_resize = Bool(L"image_resize", true);
|
||||
image_mode = Int(L"image_mode", 6);
|
||||
image_cx = Size(L"image_cx", 1000);
|
||||
image_cy = Size(L"image_cy", 800);
|
||||
image_quality = Int(L"image_quality", 92);
|
||||
convert_cmd = Text(L"convert_cmd", L"/usr/local/bin/convert");
|
||||
|
||||
templates_dir = Text(L"templates_dir");
|
||||
|
|
|
@ -259,7 +259,36 @@ public:
|
|||
// default: 150
|
||||
size_t thumb_cy;
|
||||
|
||||
// the convert program
|
||||
// quality of thumbnails
|
||||
// from 0 (the worst) to 100 (the best)
|
||||
// more info: http://www.imagemagick.org/script/command-line-options.php?ImageMagick=p4jtel7557hovd34ui3tgb54h6#quality
|
||||
// default: 92
|
||||
int thumb_quality;
|
||||
|
||||
// resizing images
|
||||
// this not affects thumbnails
|
||||
// default: true
|
||||
bool image_resize;
|
||||
|
||||
// the mode of resizing an image
|
||||
// the same as 'thumb_mode' above
|
||||
// default: 6
|
||||
int image_mode;
|
||||
|
||||
// width of images
|
||||
// default: 1000
|
||||
size_t image_cx;
|
||||
|
||||
// height of images
|
||||
// default: 800
|
||||
size_t image_cy;
|
||||
|
||||
// quality of an image (the same as in thumbnails)
|
||||
// from 0 (the worst) to 100 (the best)
|
||||
// default: 92
|
||||
int image_quality;
|
||||
|
||||
// the convert program (for images and thumbnails)
|
||||
// default: /usr/local/bin/convert
|
||||
std::wstring convert_cmd;
|
||||
|
||||
|
|
|
@ -158,10 +158,10 @@ DirContainer::ParentIterator Dirs::ParentEnd()
|
|||
}
|
||||
|
||||
|
||||
// dodatkowo moze metoda AppendPath dodajaca sciezke do biezacego stringa?
|
||||
// !! dodatkowo moze metoda AppendPath dodajaca sciezke do biezacego stringa?
|
||||
// albo tutaj stringa nie czyscic?
|
||||
// O(m * log n) (m- how many parts are in 'id')
|
||||
// path with a slash at the end
|
||||
// path with a slash at the end and at the beginning
|
||||
bool Dirs::MakePath(long id, std::wstring & path, bool clear_path)
|
||||
{
|
||||
DirContainer::Iterator i;
|
||||
|
|
|
@ -39,7 +39,7 @@ Group * Groups::GetGroup(long group_id)
|
|||
if( i == table.End() )
|
||||
return 0;
|
||||
|
||||
return &(*i);
|
||||
return &(**i);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +50,7 @@ Group * Groups::GetGroup(const std::wstring & name)
|
|||
if( i == table.End() )
|
||||
return 0;
|
||||
|
||||
return &(*i);
|
||||
return &(**i);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,415 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctime>
|
||||
#include "image.h"
|
||||
#include "utf8.h"
|
||||
#include "log.h"
|
||||
#include "system.h"
|
||||
#include "plugin.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void Image::SetDb(Db * pdb)
|
||||
{
|
||||
db = pdb;
|
||||
}
|
||||
|
||||
|
||||
void Image::SetConfig(Config * pconfig)
|
||||
{
|
||||
config = pconfig;
|
||||
}
|
||||
|
||||
|
||||
void Image::SetSystem(System * psystem)
|
||||
{
|
||||
system = psystem;
|
||||
}
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::Resize(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_RESIZE;
|
||||
item_temp.file = item;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Image::CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality)
|
||||
{
|
||||
item_temp.type = WINIX_IMAGE_TYPE_CREATE_THUMB;
|
||||
item_temp.file = item;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
item_temp.quality = quality;
|
||||
|
||||
CheckParam(item_temp);
|
||||
image_tab.insert(image_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Image::CheckParam(ImageItem & item)
|
||||
{
|
||||
if( item.aspect_mode < 1 )
|
||||
item.aspect_mode = 1;
|
||||
|
||||
if( item.aspect_mode > 7 )
|
||||
item.aspect_mode = 7;
|
||||
|
||||
if( item.quality < 0 )
|
||||
item.quality = 0;
|
||||
|
||||
if( item.quality > 100 )
|
||||
item.quality = 100;
|
||||
|
||||
if( item_temp.cx < 5 )
|
||||
item_temp.cx = 5;
|
||||
|
||||
if( item_temp.cy < 5 )
|
||||
item_temp.cy = 5;
|
||||
|
||||
if( item_temp.cx > 10000 )
|
||||
item_temp.cx = 10000;
|
||||
|
||||
if( item_temp.cy > 10000 )
|
||||
item_temp.cy = 10000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects locked)
|
||||
bool Image::SignalReceived()
|
||||
{
|
||||
return !image_tab.empty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects not locked)
|
||||
void Image::Do()
|
||||
{
|
||||
ImageTab::iterator i;
|
||||
bool end;
|
||||
|
||||
Lock();
|
||||
i = image_tab.begin();
|
||||
Unlock();
|
||||
|
||||
do
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( i != image_tab.end() )
|
||||
{
|
||||
item_work = *i;
|
||||
image_tab.erase(i++);
|
||||
end = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = true;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
|
||||
if( !end )
|
||||
CreateImage();
|
||||
|
||||
}
|
||||
while( !end && !IsExitSignal() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Image::Add(const std::wstring & in, TextStream<std::string> & out)
|
||||
{
|
||||
Ezc::WideToUTF8(in, add_tempa);
|
||||
out << add_tempa;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void Image::EscapePath(const std::string & path, TextStream<std::string> & out, bool clear_stream)
|
||||
{
|
||||
if( clear_stream )
|
||||
out.Clear();
|
||||
|
||||
out << '"';
|
||||
|
||||
for(size_t i=0 ; i<path.size() ; ++i)
|
||||
{
|
||||
if( path[i] == '"' )
|
||||
out << '\\';
|
||||
|
||||
out << path[i];
|
||||
}
|
||||
|
||||
out << '\"';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
from: http://www.imagemagick.org/script/command-line-processing.php#geometry
|
||||
|
||||
scale% Height and width both scaled by specified percentage.
|
||||
scale-x%xscale-y% Height and width individually scaled by specified percentages. (Only one % symbol needed.)
|
||||
width Width given, height automagically selected to preserve aspect ratio.
|
||||
xheight Height given, width automagically selected to preserve aspect ratio.
|
||||
widthxheight Maximum values of height and width given, aspect ratio preserved.
|
||||
widthxheight^ Minimum values of width and height given, aspect ratio preserved.
|
||||
widthxheight! Width and height emphatically given, original aspect ratio ignored.
|
||||
widthxheight> Change as per widthxheight but only if an image dimension exceeds a specified dimension.
|
||||
widthxheight< Change dimensions only if both image dimensions exceed specified dimensions.
|
||||
*/
|
||||
void Image::SelectAspect()
|
||||
{
|
||||
switch( item_work.aspect_mode )
|
||||
{
|
||||
case WINIX_IMAGE_MODE_1:
|
||||
command << item_work.cx;
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_3:
|
||||
command << item_work.cx << "x" << item_work.cy;
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_4:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "^\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_5:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "!\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_6:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << ">\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_7:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "<\"";
|
||||
break;
|
||||
|
||||
case WINIX_IMAGE_MODE_2:
|
||||
default:
|
||||
command << "x" << item_work.cy;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects locked)
|
||||
bool Image::CreateInputFileName()
|
||||
{
|
||||
if( system->MakeFilePath(item_work.file, src_path) )
|
||||
{
|
||||
Ezc::WideToUTF8(src_path, input_file_name);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Image: cannot create a source path" << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// second thread (objects locked)
|
||||
void Image::CreateTmpFileName()
|
||||
{
|
||||
stream_tmp_path.Clear();
|
||||
stream_tmp_path << config->upload_dir << L"/tmp/image_" << std::time(0);
|
||||
Ezc::WideToUTF8(stream_tmp_path.Str(), tmp_file_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
bool Image::CreateCommand()
|
||||
{
|
||||
Lock();
|
||||
|
||||
iq.SetAll(true, false);
|
||||
iq.WhereId(item_work.file.id);
|
||||
|
||||
// !! skoro teraz i tak wczytujemy caly obiekt
|
||||
// to teraz w kolejce wystarczy zapamietywac tylko samo item.id (a nie caly obiekt item)
|
||||
|
||||
// the file could have been changed especially when there is a long queue of files
|
||||
if( db->GetItem(item_work.file, iq) != WINIX_ERR_OK )
|
||||
{
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !CreateInputFileName() )
|
||||
{
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
command.Clear();
|
||||
Add(config->convert_cmd, command);
|
||||
|
||||
command << " ";
|
||||
EscapePath(input_file_name, command, false);
|
||||
command << " -quiet -quality " << item_work.quality;
|
||||
|
||||
if( item_work.type == WINIX_IMAGE_TYPE_RESIZE )
|
||||
command << " -resize ";
|
||||
else
|
||||
command << " -strip -thumbnail ";
|
||||
|
||||
SelectAspect();
|
||||
CreateTmpFileName();
|
||||
|
||||
command << " ";
|
||||
EscapePath(tmp_file_name, command, false);
|
||||
|
||||
log << log4 << "Image: running: " << command.Str() << logend;
|
||||
|
||||
Unlock();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
void Image::SaveImage()
|
||||
{
|
||||
bool moved = false;
|
||||
|
||||
Lock();
|
||||
|
||||
// the file could have been changed especially when creating the image lasted too long
|
||||
iq.SetAll(true, false);
|
||||
iq.WhereId(item_work.file.id);
|
||||
|
||||
if( db->GetItem(item_work.file, iq) == WINIX_ERR_OK )
|
||||
{
|
||||
bool thumb = (item_work.type == WINIX_IMAGE_TYPE_CREATE_THUMB);
|
||||
|
||||
if( system->MakeFilePath(item_work.file, dst_path, thumb, true, config->upload_dirs_chmod) )
|
||||
{
|
||||
if( RenameFile(stream_tmp_path.Str(), dst_path) )
|
||||
{
|
||||
if( thumb )
|
||||
{
|
||||
item_work.file.has_thumb = true;
|
||||
db->EditHasThumbById(true, item_work.file.id);
|
||||
log << log3 << "Image: generated a thumbnail: " << dst_path << logend;
|
||||
plugin.Call(WINIX_CREATED_THUMB, &item_work.file);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log3 << "Image: image resized: " << dst_path << logend;
|
||||
plugin.Call(WINIX_IMAGE_RESIZED, &item_work.file);
|
||||
}
|
||||
|
||||
moved = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Image: cannot move a temporary file: " << stream_tmp_path.Str() << ", to: " << dst_path << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Image: cannot create a destination path" << logend;
|
||||
}
|
||||
}
|
||||
|
||||
if( !moved )
|
||||
::RemoveFile(stream_tmp_path.Str());
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
void Image::CreateImage()
|
||||
{
|
||||
if( !CreateCommand() )
|
||||
return;
|
||||
|
||||
int res = std::system(command.CStr());
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
SaveImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
Lock();
|
||||
log << log3 << "Image: some problems with creating an image"
|
||||
<< ", 'convert' process returned: " << res << logend;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
// !! there is a problem with GIF files
|
||||
// Bus error (core dumped)
|
||||
/*
|
||||
#include "wand/MagickWand.h"
|
||||
|
||||
// compiler options:
|
||||
// include: -I/usr/local/include/ImageMagick
|
||||
// link with: `MagickWand-config --ldflags --libs`
|
||||
|
||||
void Image::CreateThumbnail()
|
||||
{
|
||||
Ezc::WideToUTF8(item_work.source, sourcea);
|
||||
Ezc::WideToUTF8(item_work.dst, dsta);
|
||||
|
||||
MagickWandGenesis();
|
||||
|
||||
MagickWand * wand = NewMagickWand();
|
||||
|
||||
if( MagickReadImage(wand, sourcea.c_str()) )
|
||||
{
|
||||
MagickThumbnailImage(wand, item_work.cx, item_work.cy);
|
||||
|
||||
if( MagickWriteImage(wand, dsta.c_str()) )
|
||||
{
|
||||
Lock();
|
||||
log << log3 << "Image: created a thumbnail: " << dsta << logend;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
DestroyMagickWand(wand);
|
||||
|
||||
MagickWandTerminus();
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_core_thumb
|
||||
#define headerfile_winix_core_thumb
|
||||
#ifndef headerfile_winix_core_image
|
||||
#define headerfile_winix_core_image
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
@ -24,73 +24,90 @@ class System;
|
|||
|
||||
|
||||
// Width given, height automagically selected to preserve aspect ratio.
|
||||
#define WINIX_THUMB_MODE_1 1
|
||||
#define WINIX_IMAGE_MODE_1 1
|
||||
|
||||
// Height given, width automagically selected to preserve aspect ratio.
|
||||
#define WINIX_THUMB_MODE_2 2
|
||||
#define WINIX_IMAGE_MODE_2 2
|
||||
|
||||
// Maximum values of height and width given, aspect ratio preserved.
|
||||
#define WINIX_THUMB_MODE_3 3
|
||||
#define WINIX_IMAGE_MODE_3 3
|
||||
|
||||
// Minimum values of width and height given, aspect ratio preserved.
|
||||
#define WINIX_THUMB_MODE_4 4
|
||||
#define WINIX_IMAGE_MODE_4 4
|
||||
|
||||
// Width and height emphatically given, original aspect ratio ignored.
|
||||
#define WINIX_THUMB_MODE_5 5
|
||||
#define WINIX_IMAGE_MODE_5 5
|
||||
|
||||
// Change as per widthxheight but only if an image dimension exceeds a specified dimension.
|
||||
#define WINIX_THUMB_MODE_6 6
|
||||
#define WINIX_IMAGE_MODE_6 6
|
||||
|
||||
// Change dimensions only if both image dimensions are less than specified dimensions.
|
||||
#define WINIX_THUMB_MODE_7 7
|
||||
#define WINIX_IMAGE_MODE_7 7
|
||||
|
||||
|
||||
// resizing
|
||||
#define WINIX_IMAGE_TYPE_RESIZE 1
|
||||
|
||||
// generating a thumbnail
|
||||
#define WINIX_IMAGE_TYPE_CREATE_THUMB 2
|
||||
|
||||
|
||||
|
||||
|
||||
class Thumb : public BaseThread
|
||||
class Image : public BaseThread
|
||||
{
|
||||
public:
|
||||
|
||||
void CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode);
|
||||
|
||||
void SetDb(Db * pdb);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetSystem(System * psystem);
|
||||
|
||||
void Resize(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality);
|
||||
void CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode, int quality);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
Db * db;
|
||||
Config * config;
|
||||
System * system;
|
||||
|
||||
struct ThumbItem
|
||||
struct ImageItem
|
||||
{
|
||||
int type; // WINIX_IMAGE_TYPE_*
|
||||
Item file;
|
||||
size_t cx;
|
||||
size_t cy;
|
||||
int aspect_mode;
|
||||
int quality;
|
||||
};
|
||||
|
||||
// queue of thumbnails to create
|
||||
typedef std::list<ThumbItem> ThumbTab;
|
||||
ThumbTab thumb_tab;
|
||||
ThumbItem item_temp;
|
||||
typedef std::list<ImageItem> ImageTab;
|
||||
ImageTab image_tab;
|
||||
ImageItem item_temp;
|
||||
|
||||
// only for second thread
|
||||
ThumbItem item_work;
|
||||
ImageItem item_work;
|
||||
std::wstring src_path, dst_path;
|
||||
std::string tempa, string_tmp_patha;
|
||||
TextStream<std::string> command;
|
||||
TextStream<std::wstring> stream_tmp_path;
|
||||
DbItemQuery iq;
|
||||
std::string add_tempa;
|
||||
std::string input_file_name;
|
||||
std::string tmp_file_name;
|
||||
|
||||
virtual bool SignalReceived();
|
||||
virtual void Do();
|
||||
bool CreateCommand();
|
||||
void SaveTmpThumbnail();
|
||||
void CreateThumbnail();
|
||||
bool CreateInputFileName();
|
||||
void CreateTmpFileName();
|
||||
void SaveImage();
|
||||
void CreateImage();
|
||||
void SelectAspect();
|
||||
void EscapePath(const std::string & path);
|
||||
void EscapePath(const std::string & path, TextStream<std::string> & out, bool clear_stream = true);
|
||||
void CheckParam(ImageItem & item);
|
||||
void Add(const std::wstring & in, TextStream<std::string> & out);
|
||||
};
|
||||
|
||||
|
|
@ -1102,9 +1102,6 @@ void RemovePostFileTmp(PostFileTab & post_file_tab)
|
|||
|
||||
if( !tmp_filename.empty() && RemoveFile(tmp_filename) )
|
||||
log << log3 << "Deleted tmp file: " << tmp_filename << logend;
|
||||
else
|
||||
if( !tmp_filename.empty() )
|
||||
log << "swinka" << logend; //!!usunac
|
||||
}
|
||||
}
|
||||
|
||||
|
|
42
core/misc.h
42
core/misc.h
|
@ -258,7 +258,7 @@ const wchar_t * SkipWhite(const wchar_t * s);
|
|||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubString(const StringType1 * short_str, const StringType2 * long_str)
|
||||
bool IsSubStringp(const StringType1 * short_str, const StringType2 * long_str)
|
||||
{
|
||||
while( *short_str && *long_str && wchar_t(*short_str) == wchar_t(*long_str) )
|
||||
{
|
||||
|
@ -274,12 +274,18 @@ return false;
|
|||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubString(const StringType1 & short_str, const StringType2 & long_str)
|
||||
bool IsSubString(const StringType1 * short_str, const StringType2 * long_str)
|
||||
{
|
||||
return IsSubString(short_str.c_str(), long_str.c_str());
|
||||
return IsSubStringp(short_str, long_str);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubString(const StringType1 & short_str, const StringType2 & long_str)
|
||||
{
|
||||
return IsSubStringp(short_str.c_str(), long_str.c_str());
|
||||
}
|
||||
|
||||
|
||||
template<class StringType1, class StringType2>
|
||||
bool IsSubStringNoCase(const StringType1 * short_str, const StringType2 * long_str)
|
||||
|
@ -353,6 +359,36 @@ bool EqualNoCase(const StringType1 & str1, const StringType2 & str2)
|
|||
|
||||
|
||||
|
||||
/*
|
||||
looking for 'look_for' string in 'buf' and replacing it with 'replace'
|
||||
'replace' can be empty (so only 'look_for' will be deleted)
|
||||
*/
|
||||
template<class StringType>
|
||||
void ReplaceString(StringType & buf, const StringType & look_for, const StringType & replace)
|
||||
{
|
||||
size_t i = 0;
|
||||
|
||||
if( look_for.empty() )
|
||||
return;
|
||||
|
||||
while( i < buf.size() )
|
||||
{
|
||||
if( IsSubString(look_for.c_str(), buf.c_str() + i) )
|
||||
{
|
||||
buf.erase(i, look_for.size());
|
||||
buf.insert(i, replace);
|
||||
i += replace.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class StringType>
|
||||
void NoLastSlash(StringType & s)
|
||||
{
|
||||
|
|
|
@ -49,6 +49,10 @@ void Mounts::CreateMountPar()
|
|||
mount_par_page = AddMountPar(L"page");
|
||||
mount_par_thumb_size = AddMountPar(L"thumb_size");
|
||||
mount_par_thumb_mode = AddMountPar(L"thumb_mode");
|
||||
mount_par_thumb_quality = AddMountPar(L"thumb_quality");
|
||||
mount_par_image_size = AddMountPar(L"image_size");
|
||||
mount_par_image_mode = AddMountPar(L"image_mode");
|
||||
mount_par_image_quality = AddMountPar(L"image_quality");
|
||||
//mount_par_thread = AddMountPar(L"thread");
|
||||
//mount_par_createthread_on = AddMountPar(L"createthread_on");
|
||||
mount_par_only_root_remove = AddMountPar(L"only_root_remove");
|
||||
|
|
|
@ -69,6 +69,10 @@ public:
|
|||
int MountParPage() { return mount_par_page; }
|
||||
int MountParThumbSize() { return mount_par_thumb_size; }
|
||||
int MountParThumbMode() { return mount_par_thumb_mode; }
|
||||
int MountParThumbQuality() { return mount_par_thumb_quality; }
|
||||
int MountParImageSize() { return mount_par_image_size; }
|
||||
int MountParImageMode() { return mount_par_image_mode; }
|
||||
int MountParImageQuality() { return mount_par_image_quality; }
|
||||
//int MountParThread() { return mount_par_thread; }
|
||||
//int MountParCreatethreadOn() { return mount_par_createthread_on; }
|
||||
int MountParOnlyRootRemove() { return mount_par_only_root_remove; }
|
||||
|
@ -139,6 +143,10 @@ private:
|
|||
int mount_par_page;
|
||||
int mount_par_thumb_size;
|
||||
int mount_par_thumb_mode;
|
||||
int mount_par_thumb_quality;
|
||||
int mount_par_image_size;
|
||||
int mount_par_image_mode;
|
||||
int mount_par_image_quality;
|
||||
//int mount_par_thread;
|
||||
//int mount_par_createthread_on;
|
||||
int mount_par_only_root_remove;
|
||||
|
|
|
@ -245,6 +245,11 @@ bool Plugin::HasPlugin(const std::wstring & name)
|
|||
}
|
||||
|
||||
|
||||
bool Plugin::HasMessage(int message)
|
||||
{
|
||||
return (slots.find(message) != slots.end());
|
||||
}
|
||||
|
||||
|
||||
void Plugin::Call(int message, Slots::iterator & slot, PluginInfo & info)
|
||||
{
|
||||
|
|
|
@ -156,6 +156,8 @@ public:
|
|||
bool HasPlugin(const wchar_t * name);
|
||||
bool HasPlugin(const std::wstring & name);
|
||||
|
||||
bool HasMessage(int message);
|
||||
|
||||
void Call(int message);
|
||||
void Call(int message, void * p1_);
|
||||
void Call(int message, void * p1_, void * p2_);
|
||||
|
|
|
@ -105,6 +105,43 @@
|
|||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_FILE_CHANGED 3016
|
||||
|
||||
// a file (page) has been copied
|
||||
// in p1 you have a pointer to the Item struct
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_COPIED 3017
|
||||
|
||||
// a file will be moved
|
||||
// in p1 you have a pointer to the Item struct
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_PREPARE_TO_MOVE 3018
|
||||
|
||||
// a file has been moved
|
||||
// in p1 you have a pointer to the Item struct (new file)
|
||||
// not every fields of Item struct are filled
|
||||
#define WINIX_FILE_MOVED 3019
|
||||
|
||||
|
||||
|
||||
// a thumbnail was created
|
||||
// this message is called from another thread
|
||||
// the thread is called Lock() before sending this message
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_CREATED_THUMB 3020
|
||||
|
||||
// an image has been resized
|
||||
// this message is called from another thread
|
||||
// the thread is called Lock() before sending this message
|
||||
// in p1 you have a pointer to the Item struct
|
||||
#define WINIX_IMAGE_RESIZED 3022
|
||||
|
||||
|
||||
// content of a directory was sorted
|
||||
// (winix 'sort' function was used)
|
||||
// in p1 you have a pointer to the Item struct (of the directory)
|
||||
// this is from system->dirs so you should not change the item
|
||||
#define WINIX_DIR_CONTENT_SORTED 3030
|
||||
|
||||
|
||||
// here you add your own html templates
|
||||
// call TemplatesFunctions::patterns.Add(L"file_name.html")
|
||||
// the method returns an index which you have to remember
|
||||
|
@ -113,7 +150,7 @@
|
|||
// the message will be sent too whenever 'reload/templates' winix function is called
|
||||
// templates you should add only in this message
|
||||
// in other cases after 'reload' function the indexes would be wrong
|
||||
#define WINIX_ADD_TEMPLATE 3017
|
||||
#define WINIX_ADD_TEMPLATE 3100
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -74,10 +74,10 @@ void System::Init()
|
|||
notify.SetThreadManager(&thread_manager);
|
||||
notify.Init();
|
||||
|
||||
thumb.SetDb(db);
|
||||
thumb.SetConfig(config);
|
||||
thumb.SetSystem(this);
|
||||
thread_manager.Add(&thumb);
|
||||
image.SetDb(db);
|
||||
image.SetConfig(config);
|
||||
image.SetSystem(this);
|
||||
thread_manager.Add(&image);
|
||||
|
||||
crypt.SetConfig(config);
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ return res;
|
|||
|
||||
|
||||
|
||||
Error System::AddFile(Item & item, int notify_code)
|
||||
Error System::AddFile(Item & item, int notify_code, bool call_plugins)
|
||||
{
|
||||
if( item.type != Item::file )
|
||||
return WINIX_ERR_FILE_EXPECTED;
|
||||
|
@ -679,7 +679,8 @@ Error System::AddFile(Item & item, int notify_code)
|
|||
if( notify_code )
|
||||
notify.ItemChanged(notify_code, item);
|
||||
|
||||
plugin.Call(WINIX_FILE_ADDED, &item);
|
||||
if( call_plugins )
|
||||
plugin.Call(WINIX_FILE_ADDED, &item);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -688,7 +689,7 @@ return status;
|
|||
|
||||
|
||||
|
||||
Error System::EditFile(Item & item, bool with_url, int notify_code)
|
||||
Error System::EditFile(Item & item, bool with_url, int notify_code, bool call_plugins)
|
||||
{
|
||||
if( item.type != Item::file )
|
||||
return WINIX_ERR_FILE_EXPECTED;
|
||||
|
@ -710,7 +711,8 @@ Error System::EditFile(Item & item, bool with_url, int notify_code)
|
|||
if( notify_code )
|
||||
notify.ItemChanged(notify_code, item);
|
||||
|
||||
plugin.Call(WINIX_FILE_CHANGED, &item);
|
||||
if( call_plugins )
|
||||
plugin.Call(WINIX_FILE_CHANGED, &item);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "rebus.h"
|
||||
#include "loadavg.h"
|
||||
#include "synchro.h"
|
||||
#include "thumb.h"
|
||||
#include "image.h"
|
||||
#include "threadmanager.h"
|
||||
#include "notify/notify.h"
|
||||
|
||||
|
@ -55,8 +55,8 @@ public:
|
|||
// notifications (by emails)
|
||||
Notify notify;
|
||||
|
||||
// thumbnails (special thread)
|
||||
Thumb thumb;
|
||||
// images (resizing, generating thumbnails)
|
||||
Image image;
|
||||
|
||||
// the time when the winix starts
|
||||
time_t system_start;
|
||||
|
@ -109,8 +109,8 @@ public:
|
|||
|
||||
bool MakePath(const Item & item, std::wstring & path, bool clear_path = true);
|
||||
|
||||
Error AddFile(Item & item, int notify_code = 0);
|
||||
Error EditFile(Item & item, bool with_url = true, int notify_code = 0);
|
||||
Error AddFile(Item & item, int notify_code = 0, bool call_plugins = true);
|
||||
Error EditFile(Item & item, bool with_url = true, int notify_code = 0, bool call_plugins = true);
|
||||
|
||||
// converting GMT time to local time (different for each user)
|
||||
time_t LocalTime(time_t gmt_time);
|
||||
|
|
309
core/thumb.cpp
309
core/thumb.cpp
|
@ -1,309 +0,0 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctime>
|
||||
#include "thumb.h"
|
||||
#include "utf8.h"
|
||||
#include "log.h"
|
||||
#include "system.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void Thumb::SetDb(Db * pdb)
|
||||
{
|
||||
db = pdb;
|
||||
}
|
||||
|
||||
|
||||
void Thumb::SetConfig(Config * pconfig)
|
||||
{
|
||||
config = pconfig;
|
||||
}
|
||||
|
||||
|
||||
void Thumb::SetSystem(System * psystem)
|
||||
{
|
||||
system = psystem;
|
||||
}
|
||||
|
||||
|
||||
// first thread (objects locked)
|
||||
void Thumb::CreateThumb(const Item & item, size_t cx, size_t cy, int aspect_mode)
|
||||
{
|
||||
item_temp.file = item;
|
||||
item_temp.cx = cx;
|
||||
item_temp.cy = cy;
|
||||
item_temp.aspect_mode = aspect_mode;
|
||||
|
||||
thumb_tab.insert(thumb_tab.end(), item_temp);
|
||||
WakeUpThread();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects locked)
|
||||
bool Thumb::SignalReceived()
|
||||
{
|
||||
return !thumb_tab.empty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects not locked)
|
||||
void Thumb::Do()
|
||||
{
|
||||
ThumbTab::iterator i;
|
||||
bool end;
|
||||
|
||||
Lock();
|
||||
i = thumb_tab.begin();
|
||||
Unlock();
|
||||
|
||||
do
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( i != thumb_tab.end() )
|
||||
{
|
||||
item_work = *i;
|
||||
thumb_tab.erase(i++);
|
||||
end = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = true;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
|
||||
if( !end )
|
||||
CreateThumbnail();
|
||||
|
||||
}
|
||||
while( !end && !IsExitSignal() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Thumb::EscapePath(const std::string & path)
|
||||
{
|
||||
command << '"';
|
||||
|
||||
for(size_t i=0 ; i<path.size() ; ++i)
|
||||
{
|
||||
if( path[i] == '"' )
|
||||
command << '\\';
|
||||
|
||||
command << path[i];
|
||||
}
|
||||
|
||||
command << "\" ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
from: http://www.imagemagick.org/script/command-line-processing.php#geometry
|
||||
|
||||
scale% Height and width both scaled by specified percentage.
|
||||
scale-x%xscale-y% Height and width individually scaled by specified percentages. (Only one % symbol needed.)
|
||||
width Width given, height automagically selected to preserve aspect ratio.
|
||||
xheight Height given, width automagically selected to preserve aspect ratio.
|
||||
widthxheight Maximum values of height and width given, aspect ratio preserved.
|
||||
widthxheight^ Minimum values of width and height given, aspect ratio preserved.
|
||||
widthxheight! Width and height emphatically given, original aspect ratio ignored.
|
||||
widthxheight> Change as per widthxheight but only if an image dimension exceeds a specified dimension.
|
||||
widthxheight< Change dimensions only if both image dimensions exceed specified dimensions.
|
||||
*/
|
||||
void Thumb::SelectAspect()
|
||||
{
|
||||
switch( item_work.aspect_mode )
|
||||
{
|
||||
case WINIX_THUMB_MODE_1:
|
||||
command << item_work.cx;
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_3:
|
||||
command << item_work.cx << "x" << item_work.cy;
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_4:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "^\"";
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_5:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "!\"";
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_6:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << ">\"";
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_7:
|
||||
command << '"' << item_work.cx << "x" << item_work.cy << "<\"";
|
||||
break;
|
||||
|
||||
case WINIX_THUMB_MODE_2:
|
||||
default:
|
||||
command << "x" << item_work.cy;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
bool Thumb::CreateCommand()
|
||||
{
|
||||
bool res;
|
||||
|
||||
command.Clear();
|
||||
stream_tmp_path.Clear();
|
||||
|
||||
Lock();
|
||||
|
||||
Ezc::WideToUTF8(config->convert_cmd, tempa);
|
||||
command << tempa << " -quiet -strip -thumbnail ";
|
||||
SelectAspect();
|
||||
command << " ";
|
||||
|
||||
if( system->MakeFilePath(item_work.file, src_path) )
|
||||
{
|
||||
Ezc::WideToUTF8(src_path, tempa);
|
||||
EscapePath(tempa);
|
||||
|
||||
stream_tmp_path << config->upload_dir << L"/tmp/thumb_" << std::time(0);
|
||||
Ezc::WideToUTF8(stream_tmp_path.Str(), string_tmp_patha);
|
||||
EscapePath(string_tmp_patha);
|
||||
|
||||
res = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Thumb: cannot create a source path" << logend;
|
||||
res = false;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
void Thumb::SaveTmpThumbnail()
|
||||
{
|
||||
bool moved = false;
|
||||
|
||||
Lock();
|
||||
|
||||
// the file could have been changed especially when creating thumbnail lasted too long
|
||||
iq.SetAll(false, false);
|
||||
iq.sel_parent_id = true;
|
||||
iq.sel_file = true;
|
||||
iq.sel_url = true;
|
||||
iq.sel_type = true;
|
||||
iq.WhereId(item_work.file.id);
|
||||
|
||||
if( db->GetItem(item_work.file, iq) == WINIX_ERR_OK )
|
||||
{
|
||||
if( system->MakeFilePath(item_work.file, dst_path, true, true, config->upload_dirs_chmod) )
|
||||
{
|
||||
if( RenameFile(stream_tmp_path.Str(), dst_path) )
|
||||
{
|
||||
log << log3 << "Thumb: created a thumbnail: " << dst_path << logend;
|
||||
db->EditHasThumbById(true, item_work.file.id);
|
||||
moved = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Thumb: cannot move a temporary file: " << stream_tmp_path.Str() << ", to: " << dst_path << logend;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Thumb: cannot create a destination path" << logend;
|
||||
}
|
||||
}
|
||||
|
||||
if( !moved )
|
||||
::RemoveFile(stream_tmp_path.Str());
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
void Thumb::CreateThumbnail()
|
||||
{
|
||||
if( !CreateCommand() )
|
||||
return;
|
||||
|
||||
int res = std::system(command.CStr());
|
||||
|
||||
if( res == 0 )
|
||||
{
|
||||
SaveTmpThumbnail();
|
||||
}
|
||||
else
|
||||
{
|
||||
Lock();
|
||||
log << log3 << "Thumb: some problems with creating a thumbnail " << tempa
|
||||
<< ", 'convert' process returned: " << res << logend;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread (objects are not locked)
|
||||
// !! there is a problem with GIF files
|
||||
// Bus error (core dumped)
|
||||
/*
|
||||
#include "wand/MagickWand.h"
|
||||
|
||||
// compiler options:
|
||||
// include: -I/usr/local/include/ImageMagick
|
||||
// link with: `MagickWand-config --ldflags --libs`
|
||||
|
||||
void Thumb::CreateThumbnail()
|
||||
{
|
||||
Ezc::WideToUTF8(item_work.source, sourcea);
|
||||
Ezc::WideToUTF8(item_work.dst, dsta);
|
||||
|
||||
MagickWandGenesis();
|
||||
|
||||
MagickWand * wand = NewMagickWand();
|
||||
|
||||
if( MagickReadImage(wand, sourcea.c_str()) )
|
||||
{
|
||||
MagickThumbnailImage(wand, item_work.cx, item_work.cy);
|
||||
|
||||
if( MagickWriteImage(wand, dsta.c_str()) )
|
||||
{
|
||||
Lock();
|
||||
log << log3 << "Thumb: created a thumbnail: " << dsta << logend;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
DestroyMagickWand(wand);
|
||||
|
||||
MagickWandTerminus();
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
#define headerfile_winix_core_ugcontainer
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
|
||||
|
@ -21,11 +22,16 @@
|
|||
template<class Type>
|
||||
class UGContainer
|
||||
{
|
||||
|
||||
public:
|
||||
typedef typename std::vector<Type> Table;
|
||||
typedef typename Table::iterator Iterator;
|
||||
typedef typename Table::size_type SizeType;
|
||||
|
||||
~UGContainer();
|
||||
|
||||
// we have to use a pointer (Type*) here
|
||||
// because we are remembering some pointers to the items elsewhere
|
||||
// so the pointers should not be invalidated
|
||||
typedef typename std::vector<Type*> Table;
|
||||
typedef typename Table::iterator Iterator;
|
||||
typedef typename Table::size_type SizeType;
|
||||
|
||||
typedef typename std::map<long, SizeType> TableId;
|
||||
typedef typename std::map<std::wstring, SizeType> TableName;
|
||||
|
@ -65,7 +71,14 @@ private:
|
|||
|
||||
|
||||
template<class Type>
|
||||
UGContainer<Type>::UGContainer() // : table(100)
|
||||
UGContainer<Type>::~UGContainer()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
UGContainer<Type>::UGContainer()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -108,7 +121,7 @@ typename UGContainer<Type>::Iterator UGContainer<Type>::PushBack(const Type & ty
|
|||
if( Is(type.id) || Is(type.name) )
|
||||
return End();
|
||||
|
||||
table.push_back(type);
|
||||
table.push_back(new Type(type));
|
||||
log << log2 << "UGCont: added, id: " << type.id << ", name: " << type.name << logend;
|
||||
|
||||
AddIndexes( table.size() - 1 );
|
||||
|
@ -121,6 +134,9 @@ return --table.end();
|
|||
template<class Type>
|
||||
void UGContainer<Type>::Clear()
|
||||
{
|
||||
for(size_t i=0 ; i<table.size() ; ++i)
|
||||
delete table[i];
|
||||
|
||||
table.clear();
|
||||
table_id.clear();
|
||||
table_name.clear();
|
||||
|
@ -182,10 +198,10 @@ return table.begin() + i->second;
|
|||
template<class Type>
|
||||
void UGContainer<Type>::AddIndexes(UGContainer<Type>::SizeType pos)
|
||||
{
|
||||
table_id.insert( std::make_pair(table[pos].id, pos) );
|
||||
table_name.insert( std::make_pair(table[pos].name, pos) );
|
||||
table_id.insert( std::make_pair(table[pos]->id, pos) );
|
||||
table_name.insert( std::make_pair(table[pos]->name, pos) );
|
||||
|
||||
log << log4 << "UGCont: added indexes to: id: " << table[pos].id << ", name: " << table[pos].name << logend;
|
||||
log << log4 << "UGCont: added indexes to: id: " << table[pos]->id << ", name: " << table[pos]->name << logend;
|
||||
}
|
||||
|
||||
|
||||
|
@ -216,7 +232,7 @@ Type & UGContainer<Type>::operator[](UGContainer<Type>::SizeType pos)
|
|||
if( pos >= table.size() )
|
||||
throw std::out_of_range("UGContainer: operator[]: index is out of range");
|
||||
|
||||
return table[pos];
|
||||
return *table[pos];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ void Users::SetTimeZoneOffset(int offset)
|
|||
|
||||
for(i=table.Begin() ; i!=table.End() ; ++i)
|
||||
{
|
||||
i->time_zone_offset = offset;
|
||||
(*i)->time_zone_offset = offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ User * Users::GetUser(long user_id)
|
|||
if( i == table.End() )
|
||||
return 0;
|
||||
|
||||
return &(*i);
|
||||
return &(**i);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@ User * Users::GetUser(const std::wstring & name)
|
|||
if( i == table.End() )
|
||||
return 0;
|
||||
|
||||
return &(*i);
|
||||
return &(**i);
|
||||
}
|
||||
|
||||
|
||||
|
|
12
db/db.cpp
12
db/db.cpp
|
@ -1523,7 +1523,7 @@ void Db::GetUsers(UGContainer<User> & user_tab)
|
|||
u.email = AssertValueWide(r, i, cemail);
|
||||
u.notify = AssertValueInt(r, i, cnotify);
|
||||
|
||||
log << log2 << "Db: user: id:" << u.id << ", name:" << u.name << ", super_user:" << u.super_user << logend;
|
||||
log << log2 << "Db: user: id: " << u.id << ", name: " << u.name << ", super_user: " << u.super_user << logend;
|
||||
|
||||
iter = user_tab.PushBack( u );
|
||||
|
||||
|
@ -1537,8 +1537,8 @@ void Db::GetUsers(UGContainer<User> & user_tab)
|
|||
|
||||
if( !IsNull(r, i, cgroup_id) && group_id!=-1 && iter!=user_tab.End() )
|
||||
{
|
||||
iter->groups.push_back(group_id);
|
||||
log << log3 << "Db: user:" << iter->name << " is a member of group_id:" << group_id << logend;
|
||||
(*iter)->groups.push_back(group_id);
|
||||
log << log3 << "Db: user:" << (*iter)->name << " is a member of group_id: " << group_id << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1581,7 +1581,7 @@ void Db::GetGroups(UGContainer<Group> & group_tab)
|
|||
if( g.id != last_id )
|
||||
{
|
||||
g.name = AssertValueWide(r, i, cname);
|
||||
log << log3 << "Db: get group, id:" << g.id << ", group:" << g.name << logend;
|
||||
log << log3 << "Db: get group, id: " << g.id << ", group: " << g.name << logend;
|
||||
|
||||
iter = group_tab.PushBack( g );
|
||||
last_id = g.id;
|
||||
|
@ -1591,8 +1591,8 @@ void Db::GetGroups(UGContainer<Group> & group_tab)
|
|||
|
||||
if( !IsNull(r, i, cuser_id) && user_id!=-1 && !group_tab.Empty() )
|
||||
{
|
||||
iter->members.push_back(user_id);
|
||||
log << log3 << "Db: get group member: user_id:" << user_id << logend;
|
||||
(*iter)->members.push_back(user_id);
|
||||
log << log3 << "Db: get group member: user_id: " << user_id << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ adduser.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
adduser.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
adduser.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
adduser.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
adduser.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
adduser.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
adduser.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
adduser.o: ../core/slog.h
|
||||
cat.o: cat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
|
@ -56,7 +56,7 @@ cat.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
cat.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
cat.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
cat.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
cat.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cat.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
cat.o: ../core/threadmanager.h ../core/synchro.h
|
||||
chmod.o: chmod.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
chmod.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -84,7 +84,7 @@ chmod.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
chmod.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
chmod.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
chmod.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
chmod.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
chmod.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
chmod.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
chown.o: chown.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
chown.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -112,7 +112,7 @@ chown.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
chown.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
chown.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
chown.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
chown.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
chown.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
chown.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
ckeditor.o: ckeditor.h functionbase.h ../core/item.h ../db/db.h
|
||||
ckeditor.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
|
@ -144,7 +144,7 @@ ckeditor.o: ../core/lastcontainer.h ../templates/misc.h
|
|||
ckeditor.o: ../templates/htmltextstream.h ../core/mounts.h
|
||||
ckeditor.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
ckeditor.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
ckeditor.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
ckeditor.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
ckeditor.o: ../core/synchro.h
|
||||
cp.o: cp.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
cp.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
|
@ -172,8 +172,14 @@ cp.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
cp.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
cp.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
cp.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
cp.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
cp.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
cp.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
|
||||
cp.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h
|
||||
cp.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
cp.o: ../functions/functions.h ../templates/templates.h
|
||||
cp.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
cp.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
cp.o: ../core/sessionmanager.h
|
||||
default.o: default.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
default.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
default.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
|
||||
|
@ -201,7 +207,7 @@ default.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
default.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
default.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
default.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
default.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
default.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
default.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
download.o: download.h functionbase.h ../core/item.h ../db/db.h
|
||||
download.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
|
@ -233,7 +239,7 @@ download.o: ../core/lastcontainer.h ../templates/misc.h
|
|||
download.o: ../templates/htmltextstream.h ../core/mounts.h
|
||||
download.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
download.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
download.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
download.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
download.o: ../core/synchro.h
|
||||
emacs.o: emacs.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
emacs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -261,12 +267,11 @@ emacs.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
emacs.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
emacs.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
emacs.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
emacs.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
emacs.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
emacs.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
emacs.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
emacs.o: ../templates/indexpatterns.h ../templates/patterns.h
|
||||
emacs.o: ../templates/changepatterns.h ../core/sessionmanager.h
|
||||
emacs.o: ../core/sessioncontainer.h ../core/system.h
|
||||
functionbase.o: functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
functionbase.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
functionbase.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
|
||||
|
@ -298,7 +303,7 @@ functionbase.o: ../core/ugcontainer.h ../core/lastcontainer.h
|
|||
functionbase.o: ../templates/misc.h ../templates/htmltextstream.h
|
||||
functionbase.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
functionbase.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
functionbase.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functionbase.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
functionbase.o: ../core/threadmanager.h ../core/synchro.h
|
||||
functionparser.o: functionparser.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
|
||||
functionparser.o: ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
|
@ -331,7 +336,7 @@ functionparser.o: ../core/ugcontainer.h ../core/lastcontainer.h
|
|||
functionparser.o: ../templates/misc.h ../templates/htmltextstream.h
|
||||
functionparser.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
functionparser.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
functionparser.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functionparser.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
functionparser.o: ../core/threadmanager.h ../core/synchro.h ../core/cur.h
|
||||
functionparser.o: ../core/log.h
|
||||
functions.o: functions.h functionbase.h ../core/item.h ../db/db.h
|
||||
|
@ -358,7 +363,7 @@ functions.o: ../core/ugcontainer.h ../core/lastcontainer.h
|
|||
functions.o: ../templates/misc.h ../templates/htmltextstream.h
|
||||
functions.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h run.h
|
||||
functions.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
functions.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
functions.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
functions.o: ../core/threadmanager.h ../core/synchro.h functionparser.h
|
||||
functions.o: ../core/cur.h adduser.h cat.h chmod.h privchanger.h chown.h
|
||||
functions.o: ckeditor.h cp.h default.h download.h emacs.h last.h login.h
|
||||
|
@ -398,7 +403,7 @@ last.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
last.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
last.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
last.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
last.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
last.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
last.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
ln.o: ln.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
ln.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
|
@ -426,7 +431,7 @@ ln.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
ln.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
ln.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
ln.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
ln.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ln.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
ln.o: ../core/threadmanager.h ../core/synchro.h ../core/misc.h
|
||||
ln.o: ../functions/functions.h
|
||||
login.o: login.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
|
@ -455,7 +460,7 @@ login.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
login.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
login.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
login.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
login.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
login.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
login.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
logout.o: logout.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
logout.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -484,7 +489,7 @@ logout.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
logout.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
logout.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
logout.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
logout.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
logout.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
logout.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
ls.o: ls.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
ls.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
|
@ -512,7 +517,7 @@ ls.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
ls.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
ls.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
ls.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
ls.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
ls.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
ls.o: ../core/threadmanager.h ../core/synchro.h
|
||||
mkdir.o: mkdir.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
mkdir.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -540,7 +545,7 @@ mkdir.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
mkdir.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
mkdir.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
mkdir.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
mkdir.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
mkdir.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
mkdir.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
mount.o: mount.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
mount.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -568,7 +573,7 @@ mount.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
mount.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
mount.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
mount.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
mount.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
mount.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
mount.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
mv.o: mv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
mv.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
|
@ -596,8 +601,13 @@ mv.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
mv.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
mv.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
mv.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
mv.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
mv.o: ../core/threadmanager.h ../core/synchro.h
|
||||
mv.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
mv.o: ../core/threadmanager.h ../core/synchro.h ../core/plugin.h
|
||||
mv.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h
|
||||
mv.o: ../core/sessioncontainer.h ../functions/functions.h
|
||||
mv.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
mv.o: ../templates/indexpatterns.h ../templates/patterns.h
|
||||
mv.o: ../templates/changepatterns.h ../core/sessionmanager.h
|
||||
nicedit.o: nicedit.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
nicedit.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
nicedit.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
|
||||
|
@ -625,7 +635,7 @@ nicedit.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
nicedit.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
nicedit.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
nicedit.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
nicedit.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
nicedit.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
nicedit.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
node.o: node.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
node.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -653,7 +663,7 @@ node.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
node.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
node.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
node.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
node.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
node.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
node.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
passwd.o: passwd.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
passwd.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -682,7 +692,7 @@ passwd.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
passwd.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
passwd.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
passwd.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
passwd.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
passwd.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
passwd.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
passwd.o: ../core/slog.h ../functions/functions.h
|
||||
priv.o: priv.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
|
@ -711,7 +721,7 @@ priv.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
priv.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
priv.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
priv.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
priv.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
priv.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
priv.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
privchanger.o: privchanger.h ../core/request.h ../core/system.h
|
||||
privchanger.o: ../core/dirs.h ../core/item.h ../core/dircontainer.h
|
||||
|
@ -743,7 +753,7 @@ privchanger.o: ../core/ugcontainer.h ../core/lastcontainer.h
|
|||
privchanger.o: ../templates/misc.h ../templates/htmltextstream.h
|
||||
privchanger.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
privchanger.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
privchanger.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
privchanger.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
privchanger.o: ../core/threadmanager.h
|
||||
reload.o: reload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
reload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -772,12 +782,11 @@ reload.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
reload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
reload.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
reload.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
reload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
reload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
reload.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
reload.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
reload.o: ../templates/indexpatterns.h ../templates/patterns.h
|
||||
reload.o: ../templates/changepatterns.h ../core/sessionmanager.h
|
||||
reload.o: ../core/sessioncontainer.h ../core/system.h
|
||||
rm.o: rm.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
rm.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h ../core/misc.h
|
||||
rm.o: ../core/item.h ../core/requesttypes.h ../core/error.h
|
||||
|
@ -804,7 +813,7 @@ rm.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
rm.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
rm.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
rm.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
rm.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
rm.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
rm.o: ../core/threadmanager.h ../core/synchro.h ../core/plugin.h
|
||||
rm.o: ../core/pluginmsg.h ../core/system.h ../core/sessionmanager.h
|
||||
rm.o: ../core/sessioncontainer.h ../functions/functions.h
|
||||
|
@ -837,7 +846,7 @@ run.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
run.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
run.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
run.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
run.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
run.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
run.o: ../core/threadmanager.h ../core/synchro.h
|
||||
sort.o: sort.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
sort.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -865,8 +874,14 @@ sort.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
sort.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
sort.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
sort.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
sort.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
sort.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
sort.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
sort.o: ../core/plugin.h ../core/pluginmsg.h ../core/system.h
|
||||
sort.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
sort.o: ../functions/functions.h ../templates/templates.h
|
||||
sort.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
sort.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
sort.o: ../core/sessionmanager.h
|
||||
specialdefault.o: specialdefault.h functionbase.h ../core/item.h ../db/db.h
|
||||
specialdefault.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
specialdefault.o: ../core/textstream.h ../core/misc.h ../core/item.h
|
||||
|
@ -899,7 +914,7 @@ specialdefault.o: ../core/lastcontainer.h ../templates/misc.h
|
|||
specialdefault.o: ../templates/htmltextstream.h ../core/mounts.h
|
||||
specialdefault.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
specialdefault.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
specialdefault.o: ../core/thumb.h ../core/basethread.h
|
||||
specialdefault.o: ../core/image.h ../core/basethread.h
|
||||
specialdefault.o: ../core/threadmanager.h ../core/synchro.h
|
||||
stat.o: stat.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
stat.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -927,7 +942,7 @@ stat.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
stat.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
stat.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
stat.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
stat.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
stat.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
stat.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
subject.o: subject.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
subject.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -956,7 +971,7 @@ subject.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
subject.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
subject.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
subject.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
subject.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
subject.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
subject.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
template.o: template.h functionbase.h ../core/item.h ../db/db.h
|
||||
template.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
|
||||
|
@ -988,7 +1003,7 @@ template.o: ../core/lastcontainer.h ../templates/misc.h
|
|||
template.o: ../templates/htmltextstream.h ../core/mounts.h
|
||||
template.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
template.o: ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
template.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
template.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
template.o: ../core/synchro.h ../core/misc.h
|
||||
tinymce.o: tinymce.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
tinymce.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -1017,7 +1032,7 @@ tinymce.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
tinymce.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
tinymce.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
tinymce.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
tinymce.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
tinymce.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
tinymce.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
uname.o: uname.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
uname.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -1045,7 +1060,7 @@ uname.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
uname.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
uname.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
uname.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
uname.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
uname.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
uname.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
upload.o: upload.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
upload.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -1074,13 +1089,14 @@ upload.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
upload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
upload.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
upload.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
upload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
upload.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
upload.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
upload.o: ../core/misc.h ../functions/functions.h ../templates/templates.h
|
||||
upload.o: ../templates/patterncacher.h ../templates/indexpatterns.h
|
||||
upload.o: ../templates/patterns.h ../templates/changepatterns.h
|
||||
upload.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
upload.o: ../core/system.h
|
||||
upload.o: ../core/misc.h ../core/plugin.h ../core/pluginmsg.h
|
||||
upload.o: ../core/system.h ../core/sessionmanager.h
|
||||
upload.o: ../core/sessioncontainer.h ../functions/functions.h
|
||||
upload.o: ../templates/templates.h ../templates/patterncacher.h
|
||||
upload.o: ../templates/indexpatterns.h ../templates/patterns.h
|
||||
upload.o: ../templates/changepatterns.h ../core/sessionmanager.h
|
||||
uptime.o: uptime.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
uptime.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
uptime.o: ../core/misc.h ../core/item.h ../core/requesttypes.h
|
||||
|
@ -1108,7 +1124,7 @@ uptime.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
uptime.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
uptime.o: ../templates/misc.h ../templates/htmltextstream.h ../core/mounts.h
|
||||
uptime.o: ../core/mountparser.h ../core/crypt.h ../core/users.h
|
||||
uptime.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
uptime.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
uptime.o: ../core/basethread.h ../core/threadmanager.h ../core/synchro.h
|
||||
vim.o: vim.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
vim.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -1136,7 +1152,7 @@ vim.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
vim.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
vim.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
vim.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
vim.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
vim.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
vim.o: ../core/threadmanager.h ../core/synchro.h
|
||||
who.o: who.h functionbase.h ../core/item.h ../db/db.h ../db/dbbase.h
|
||||
who.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h
|
||||
|
@ -1164,5 +1180,5 @@ who.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
who.o: ../core/lastcontainer.h ../templates/misc.h
|
||||
who.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
who.o: ../core/crypt.h ../core/users.h ../core/groups.h ../core/group.h
|
||||
who.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
who.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
who.o: ../core/threadmanager.h ../core/synchro.h
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
@ -10,6 +10,8 @@
|
|||
#include "cp.h"
|
||||
#include "core/misc.h"
|
||||
#include "functions.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
|
@ -141,13 +143,15 @@ void Cp::CopyFile(Item & item, long dst_dir_id)
|
|||
if( !preserve_attr )
|
||||
SetNewAttributes(item);
|
||||
|
||||
item.parent_id = dst_dir_id;
|
||||
item.parent_id = dst_dir_id;
|
||||
cur->request->status = db->AddItem(item);
|
||||
|
||||
if( cur->request->status == WINIX_ERR_OK )
|
||||
{
|
||||
if( item.file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
CopyStaticFile(item);
|
||||
|
||||
plugin.Call(WINIX_FILE_COPIED, &item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
@ -10,6 +10,8 @@
|
|||
#include <errno.h>
|
||||
#include "mv.h"
|
||||
#include "functions.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
namespace Fun
|
||||
|
@ -179,6 +181,8 @@ bool res1, res2, res3, res4, res5;
|
|||
|
||||
void Mv::MoveFileOrSymlink(Item & item)
|
||||
{
|
||||
plugin.Call(WINIX_FILE_PREPARE_TO_MOVE, &item);
|
||||
|
||||
old_url = item.url;
|
||||
|
||||
if( !file.empty() )
|
||||
|
@ -204,6 +208,8 @@ void Mv::MoveFileOrSymlink(Item & item)
|
|||
|
||||
if( item.file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
MoveStaticFile(item);
|
||||
|
||||
plugin.Call(WINIX_FILE_MOVED, &item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,39 +241,63 @@ void Mv::Prepare()
|
|||
content_dir_iq.sel_url = true;
|
||||
content_dir_iq.sel_file = true;
|
||||
|
||||
static_iq.SetAll(false, false);
|
||||
static_iq.sel_parent_id = true;
|
||||
static_iq.sel_type = true;
|
||||
static_iq.sel_url = true;
|
||||
static_iq.sel_file = true;
|
||||
|
||||
static_iq.WhereType(Item::file);
|
||||
static_iq.WhereFileType(WINIX_ITEM_FILETYPE_NONE, false);
|
||||
files_iq.SetAll(false, false);
|
||||
files_iq.sel_parent_id = true;
|
||||
files_iq.sel_type = true;
|
||||
files_iq.sel_url = true;
|
||||
files_iq.sel_file = true;
|
||||
files_iq.WhereType(Item::dir, false);
|
||||
}
|
||||
|
||||
|
||||
void Mv::Clear()
|
||||
{
|
||||
dir_tab.clear();
|
||||
static_item_tab.clear();
|
||||
files_item_tab.clear();
|
||||
item_tab.clear();
|
||||
}
|
||||
|
||||
|
||||
void Mv::MoveFilesPrepareTree(const Item & dir)
|
||||
{
|
||||
// we only calling plugins here
|
||||
// so if there is no WINIX_FILE_PREPARE_TO_MOVE message
|
||||
// we can immediately return and the database will not be bothered
|
||||
if( !plugin.HasMessage(WINIX_FILE_PREPARE_TO_MOVE) )
|
||||
return;
|
||||
|
||||
void Mv::MoveStaticFilesTree(const Item & dir)
|
||||
DirContainer::ParentIterator i = system->dirs.FindFirstChild(dir.id);
|
||||
|
||||
// go through all directories
|
||||
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )
|
||||
MoveFilesPrepareTree(*(i->second));
|
||||
|
||||
files_iq.WhereParentId(dir.id);
|
||||
db->GetItems(files_item_tab, files_iq);
|
||||
|
||||
for(size_t i=0 ; i<files_item_tab.size() ; ++i)
|
||||
plugin.Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
|
||||
}
|
||||
|
||||
|
||||
void Mv::MoveFilesTree(const Item & dir)
|
||||
{
|
||||
DirContainer::ParentIterator i = system->dirs.FindFirstChild(dir.id);
|
||||
|
||||
// go through all directories
|
||||
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )
|
||||
MoveStaticFilesTree(*(i->second));
|
||||
MoveFilesTree(*(i->second));
|
||||
|
||||
static_iq.WhereParentId(dir.id);
|
||||
db->GetItems(static_item_tab, static_iq);
|
||||
files_iq.WhereParentId(dir.id);
|
||||
db->GetItems(files_item_tab, files_iq);
|
||||
|
||||
for(size_t i=0 ; i<static_item_tab.size() ; ++i)
|
||||
MoveStaticFile(static_item_tab[i]);
|
||||
for(size_t i=0 ; i<files_item_tab.size() ; ++i)
|
||||
{
|
||||
if( files_item_tab[i].file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
MoveStaticFile(files_item_tab[i]);
|
||||
|
||||
plugin.Call(WINIX_FILE_MOVED, &files_item_tab[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -284,6 +314,8 @@ void Mv::MoveDir(Item & dir)
|
|||
return;
|
||||
}
|
||||
|
||||
MoveFilesPrepareTree(dir);
|
||||
|
||||
if( !system->dirs.ChangeParent(dir.id, dst_dir_id) )
|
||||
{
|
||||
cur->request->status = WINIX_ERR_INCORRECT_DIR;
|
||||
|
@ -307,7 +339,7 @@ void Mv::MoveDir(Item & dir)
|
|||
system->dirs.LogDir(dir_tab);
|
||||
log << dir.url << logend;
|
||||
|
||||
MoveStaticFilesTree(dir);
|
||||
MoveFilesTree(dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ private:
|
|||
std::wstring new_path, new_path_thumb;
|
||||
std::wstring old_path, old_path_thumb;
|
||||
|
||||
// for static files
|
||||
std::vector<Item> static_item_tab;
|
||||
DbItemQuery static_iq;
|
||||
// for files in a directory
|
||||
std::vector<Item> files_item_tab;
|
||||
DbItemQuery files_iq;
|
||||
|
||||
// for moving content of a directory
|
||||
DbItemQuery content_dir_iq;
|
||||
|
@ -61,7 +61,8 @@ private:
|
|||
void MoveDirContent(const Item & dir);
|
||||
void Prepare();
|
||||
void Clear();
|
||||
void MoveStaticFilesTree(const Item & dir);
|
||||
void MoveFilesPrepareTree(const Item & dir);
|
||||
void MoveFilesTree(const Item & dir);
|
||||
void MoveDir(Item & dir);
|
||||
bool IsTheSameFile(const Item & item);
|
||||
void PostMoveFile();
|
||||
|
|
|
@ -141,6 +141,8 @@ void Rm::RemoveStaticFile(Item & item)
|
|||
|
||||
void Rm::RemoveFileOrSymlink(Item & item)
|
||||
{
|
||||
plugin.Call(5000, &item); // !! dodac do pluginmsg.h
|
||||
|
||||
if( db->DelItem(item) == WINIX_ERR_OK )
|
||||
{
|
||||
if( item.type == Item::file )
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
#include "sort.h"
|
||||
#include "core/plugin.h"
|
||||
|
||||
|
||||
|
||||
|
@ -157,6 +158,8 @@ void Sort::MakePost()
|
|||
UpdateSortIndexes();
|
||||
}
|
||||
|
||||
plugin.Call(WINIX_DIR_CONTENT_SORTED, cur->request->dir_tab.back());
|
||||
|
||||
system->RedirectToLastItem();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <errno.h>
|
||||
#include "upload.h"
|
||||
#include "core/misc.h"
|
||||
#include "core/plugin.h"
|
||||
#include "functions/functions.h"
|
||||
#include "templates/templates.h"
|
||||
#include "utf8.h"
|
||||
|
@ -89,16 +90,17 @@ bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_fi
|
|||
}
|
||||
|
||||
|
||||
void Upload::CreateThumb(Item & item)
|
||||
|
||||
void Upload::ResizeImage(Item & item)
|
||||
{
|
||||
::Mount & m = *system->mounts.pmount;
|
||||
size_t cx = config->thumb_cx;
|
||||
size_t cy = config->thumb_cy;
|
||||
int mode = config->thumb_mode;
|
||||
int index;
|
||||
::Mount & m = *cur->mount;
|
||||
size_t cx = config->image_cx;
|
||||
size_t cy = config->image_cy;
|
||||
int mode = config->image_mode;
|
||||
int quality = config->image_quality;
|
||||
|
||||
// reading width and height from the mount point (if exists)
|
||||
index = system->mounts.MountParThumbSize();
|
||||
int index = system->mounts.MountParImageSize();
|
||||
|
||||
if( m.param[index].defined && m.param[index].arg.size() == 2 )
|
||||
{
|
||||
|
@ -106,11 +108,39 @@ void Upload::CreateThumb(Item & item)
|
|||
cy = Tol(m.param[index].arg[1]);
|
||||
}
|
||||
|
||||
if( cx > 2000 )
|
||||
cx = 2000;
|
||||
// reading image mode from the mount point (if exists)
|
||||
index = system->mounts.MountParImageMode();
|
||||
|
||||
if( cy > 2000 )
|
||||
cy = 2000;
|
||||
if( 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]);
|
||||
|
||||
system->image.Resize(item, cx, cy, mode, quality);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Upload::CreateThumb(Item & item)
|
||||
{
|
||||
::Mount & m = *cur->mount;
|
||||
size_t cx = config->thumb_cx;
|
||||
size_t cy = config->thumb_cy;
|
||||
int mode = config->thumb_mode;
|
||||
int quality = config->thumb_quality;
|
||||
|
||||
// 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 )
|
||||
{
|
||||
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();
|
||||
|
@ -118,7 +148,13 @@ void Upload::CreateThumb(Item & item)
|
|||
if( m.param[index].defined && m.param[index].arg.size() == 1 )
|
||||
mode = Toi(m.param[index].arg[0]);
|
||||
|
||||
system->thumb.CreateThumb(item, cx, cy, mode);
|
||||
// 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]);
|
||||
|
||||
system->image.CreateThumb(item, cx, cy, mode, quality);
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,7 +162,7 @@ void Upload::CreateThumb(Item & item)
|
|||
void Upload::UploadFile(Item & item, const std::wstring & tmp_filename)
|
||||
{
|
||||
// we should add the file beforehand to get the proper item.id
|
||||
cur->request->status = system->AddFile(item);
|
||||
cur->request->status = system->AddFile(item, 0, false);
|
||||
|
||||
if( cur->request->status == WINIX_ERR_OK )
|
||||
{
|
||||
|
@ -136,8 +172,16 @@ void Upload::UploadFile(Item & item, const std::wstring & tmp_filename)
|
|||
{
|
||||
cur->request->status = db->EditFileById(item, item.id);
|
||||
|
||||
if( item.file_type == WINIX_ITEM_FILETYPE_IMAGE && config->create_thumb )
|
||||
CreateThumb(item);
|
||||
plugin.Call(WINIX_FILE_ADDED, &item);
|
||||
|
||||
if( item.file_type == WINIX_ITEM_FILETYPE_IMAGE )
|
||||
{
|
||||
if( config->image_resize )
|
||||
ResizeImage(item);
|
||||
|
||||
if( config->create_thumb )
|
||||
CreateThumb(item);
|
||||
}
|
||||
|
||||
if( is_jquery_upload )
|
||||
cur->request->item_tab.push_back(item);
|
||||
|
|
|
@ -40,6 +40,7 @@ private:
|
|||
bool FunUploadCheckAbuse();
|
||||
void UploadMulti();
|
||||
void UploadSingle();
|
||||
void ResizeImage(Item & item);
|
||||
void CreateThumb(Item & item);
|
||||
void CreateJSON();
|
||||
};
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
<li><a href="[doc_base_url][dir]reload/groupitem">{reload_groupitem}</a></li>
|
||||
[end]
|
||||
|
||||
[if winix_has_plugin "export"]
|
||||
<li><a href="[doc_base_url][dir]reload/export">{reload_export}</a></li>
|
||||
[end]
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<h1>{sort_header}</h1>
|
||||
|
||||
<p>{sort_info1}</p>
|
||||
|
||||
[if item_is]
|
||||
|
||||
<form id="additem" action="[doc_base_url][dir][item_url]/sort" method="post">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[if winix_function_is "tinymce"]
|
||||
<!--<script type="text/javascript">document.domain = "www.slimaczek.pl";</script>-->
|
||||
<script type="text/javascript" src="[doc_base_url]/var/staticcommon/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url]/common/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url]/var/tinymce.js"></script>
|
||||
[end]
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ reload_select = Choose an item to reload
|
|||
reload_templates = html templates
|
||||
reload_tickets = tickets config files
|
||||
reload_groupitem = groups config files
|
||||
reload_export = export directories (FTP)
|
||||
|
||||
|
||||
rm_header = Remove
|
||||
|
@ -311,6 +312,7 @@ slog_turn_over = Session's log turned over due to size greater than
|
|||
|
||||
sort_header = Sort
|
||||
sort_current_sortindex = Current sort index
|
||||
sort_info1 = Set an order of items by using the mouse.
|
||||
|
||||
|
||||
stat_header = Stat
|
||||
|
|
|
@ -171,6 +171,7 @@ reload_select = Wybierz pozycję
|
|||
reload_templates = szablony html
|
||||
reload_tickets = pliki konfiguracyjne ticketów
|
||||
reload_groupitem = pliki konfiguracyjne grup
|
||||
reload_export = katalogi exportu (FTP)
|
||||
|
||||
|
||||
rm_header = Usuń
|
||||
|
@ -327,6 +328,7 @@ slog_turn_over = Log sesji wyczyszczony w związku z przekroczeniem wielkości
|
|||
|
||||
sort_header = Sortuj
|
||||
sort_current_sortindex = Bieżący indeks sortowania
|
||||
sort_info1 = Ustaw kolejność elementów przeciągając je przy pomocy myszki.
|
||||
|
||||
stat_header = Stat
|
||||
stat_item_type = typ
|
||||
|
|
|
@ -22,7 +22,7 @@ main.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
|
|||
main.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
main.o: ../templates/htmltextstream.h ../core/mounts.h ../core/mountparser.h
|
||||
main.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
main.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
main.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
main.o: ../core/basethread.h ../core/threadmanager.h ../core/sessionmanager.h
|
||||
main.o: ../core/sessioncontainer.h ../functions/functions.h
|
||||
main.o: ../functions/functionbase.h ../core/request.h ../core/system.h
|
||||
|
|
|
@ -25,7 +25,7 @@ notify.o: ../templates/patterns.h ../templates/changepatterns.h ../core/cur.h
|
|||
notify.o: ../core/system.h ../core/dirs.h ../core/dircontainer.h
|
||||
notify.o: ../notify/notify.h ../core/mounts.h ../core/mountparser.h
|
||||
notify.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
notify.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
notify.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
notify.o: ../core/basethread.h ../core/threadmanager.h
|
||||
notify.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
notify.o: ../core/system.h ../core/htmlfilter.h ../core/request.h
|
||||
|
@ -92,7 +92,7 @@ templatesnotify.o: ../core/dirs.h ../core/dircontainer.h ../notify/notify.h
|
|||
templatesnotify.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h
|
||||
templatesnotify.o: ../core/run.h ../core/users.h ../core/groups.h
|
||||
templatesnotify.o: ../core/group.h ../core/ugcontainer.h ../core/loadavg.h
|
||||
templatesnotify.o: ../core/thumb.h ../core/basethread.h
|
||||
templatesnotify.o: ../core/image.h ../core/basethread.h
|
||||
templatesnotify.o: ../core/threadmanager.h ../core/synchro.h
|
||||
templatesnotify.o: ../functions/functionparser.h ../core/cur.h
|
||||
templatesnotify.o: ../functions/adduser.h ../functions/cat.h
|
||||
|
|
|
@ -96,10 +96,10 @@ bool res = false;
|
|||
|
||||
for(i=users->Begin() ; i != users->End() ; ++i)
|
||||
{
|
||||
if( (i->notify & TemplatesNotifyFunctions::notify_msg.code) != 0 )
|
||||
if( ((*i)->notify & TemplatesNotifyFunctions::notify_msg.code) != 0 )
|
||||
{
|
||||
msg.name = i->name;
|
||||
msg.email = i->email;
|
||||
msg.name = (*i)->name;
|
||||
msg.email = (*i)->email;
|
||||
msg.lang = config->locale_default_index; // !! bedzie osobno dla kazdego uzytkownika
|
||||
|
||||
notify_user.insert(notify_user.end(), msg);
|
||||
|
|
|
@ -1,49 +1,96 @@
|
|||
# DO NOT DELETE
|
||||
|
||||
db.o: db.h ../../db/dbbase.h ../../db/dbconn.h ../../db/dbtextstream.h
|
||||
db.o: ../../core/textstream.h ../../core/misc.h ../../core/item.h
|
||||
db.o: ../../core/requesttypes.h ../../core/error.h export.h ../../core/dirs.h
|
||||
db.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
db.o: ../../db/dbitemquery.h ../../core/item.h ../../db/dbitemcolumns.h
|
||||
db.o: ../../core/user.h ../../core/group.h ../../core/dircontainer.h
|
||||
db.o: ../../core/ugcontainer.h ../../core/log.h ../../core/textstream.h
|
||||
db.o: ../../core/logmanipulators.h ../../core/slog.h ../../core/cur.h
|
||||
db.o: ../../core/request.h ../../core/error.h ../../core/config.h
|
||||
db.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
db.o: ../../templates/htmltextstream.h ../../core/session.h ../../core/user.h
|
||||
db.o: ../../core/plugindata.h ../../core/rebus.h ../../core/mount.h
|
||||
db.o: ../../templates/locale.h ../../core/confparser.h ../../notify/notify.h
|
||||
db.o: ../../notify/notifypool.h ../../templates/patterns.h
|
||||
db.o: ../../templates/locale.h ../../templates/localefilter.h
|
||||
db.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
db.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
db.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
db.o: ../../../ezc/src/stringconv.h ../../notify/notifythread.h
|
||||
db.o: ../../core/basethread.h ../../core/synchro.h
|
||||
db.o: ../../notify/templatesnotify.h ../../core/config.h ../../core/users.h
|
||||
db.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
db.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
db.o: ../../core/log.h
|
||||
exportinfo.o: ../../core/log.h exportinfo.h ../../core/system.h
|
||||
exportinfo.o: ../../core/dirs.h ../../core/item.h ../../core/dircontainer.h
|
||||
exportinfo.o: ../../db/db.h ../../db/dbbase.h ../../db/dbitemquery.h
|
||||
exportinfo.o: ../../core/item.h ../../db/dbitemcolumns.h ../../core/user.h
|
||||
exportinfo.o: ../../core/group.h ../../core/dircontainer.h
|
||||
exportinfo.o: ../../core/ugcontainer.h ../../core/log.h
|
||||
exportinfo.o: ../../core/textstream.h ../../core/logmanipulators.h
|
||||
exportinfo.o: ../../core/slog.h ../../core/cur.h ../../core/request.h
|
||||
exportinfo.o: ../../core/requesttypes.h ../../core/error.h
|
||||
exportinfo.o: ../../core/config.h ../../core/confparser.h
|
||||
exportinfo.o: ../../core/htmlfilter.h ../../templates/htmltextstream.h
|
||||
exportinfo.o: ../../core/textstream.h ../../core/misc.h ../../core/session.h
|
||||
exportinfo.o: ../../core/user.h ../../core/plugindata.h ../../core/rebus.h
|
||||
exportinfo.o: ../../core/mount.h ../../templates/locale.h
|
||||
exportinfo.o: ../../core/confparser.h ../../notify/notify.h
|
||||
exportinfo.o: ../../notify/notifypool.h ../../templates/patterns.h
|
||||
exportinfo.o: ../../templates/locale.h ../../templates/localefilter.h
|
||||
exportinfo.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
exportinfo.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
exportinfo.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
exportinfo.o: ../../../ezc/src/stringconv.h ../../notify/notifythread.h
|
||||
exportinfo.o: ../../core/basethread.h ../../core/synchro.h
|
||||
exportinfo.o: ../../notify/templatesnotify.h ../../core/config.h
|
||||
exportinfo.o: ../../core/users.h ../../core/ugcontainer.h
|
||||
exportinfo.o: ../../core/lastcontainer.h ../../templates/misc.h
|
||||
exportinfo.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
exportinfo.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
exportinfo.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
exportinfo.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
exportinfo.o: ../../core/threadmanager.h export.h db.h ../../db/dbbase.h
|
||||
exportinfo.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
exportinfo.o: ../../core/dirs.h message.h exportthread.h
|
||||
exportthread.o: exportthread.h ../../core/basethread.h ../../core/synchro.h
|
||||
exportthread.o: message.h ../../core/log.h ../../core/textstream.h
|
||||
exportthread.o: ../../core/misc.h ../../core/item.h ../../core/requesttypes.h
|
||||
exportthread.o: ../../core/logmanipulators.h ../../core/slog.h
|
||||
exportthread.o: ../../core/cur.h ../../core/request.h ../../core/error.h
|
||||
exportthread.o: ../../core/config.h ../../core/confparser.h
|
||||
exportthread.o: ../../core/htmlfilter.h ../../templates/htmltextstream.h
|
||||
exportthread.o: ../../core/textstream.h ../../core/session.h
|
||||
exportthread.o: ../../core/user.h ../../core/plugindata.h ../../core/rebus.h
|
||||
exportthread.o: ../../core/mount.h ../../templates/locale.h
|
||||
exportthread.o: ../../core/confparser.h ../../core/misc.h
|
||||
exportthread.o: message.h ../../core/log.h ../../core/misc.h
|
||||
exportthread.o: ../../core/item.h ../../core/requesttypes.h
|
||||
exportthread.o: ../../../ezc/src/utf8.h
|
||||
init.o: ../../core/log.h ../../core/textstream.h ../../core/misc.h
|
||||
init.o: ../../core/item.h ../../core/requesttypes.h
|
||||
init.o: ../../core/logmanipulators.h ../../core/slog.h ../../core/cur.h
|
||||
init.o: ../../core/request.h ../../core/error.h ../../core/config.h
|
||||
init.o: ../../core/confparser.h ../../core/htmlfilter.h
|
||||
init.o: ../../core/log.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/log.h ../../core/textstream.h ../../core/logmanipulators.h
|
||||
init.o: ../../core/slog.h ../../core/cur.h ../../core/request.h
|
||||
init.o: ../../core/requesttypes.h ../../core/item.h ../../core/error.h
|
||||
init.o: ../../core/config.h ../../core/confparser.h ../../core/htmlfilter.h
|
||||
init.o: ../../templates/htmltextstream.h ../../core/textstream.h
|
||||
init.o: ../../core/session.h ../../core/user.h ../../core/plugindata.h
|
||||
init.o: ../../core/rebus.h ../../core/mount.h ../../templates/locale.h
|
||||
init.o: ../../core/confparser.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/log.h ../../core/system.h ../../core/dirs.h
|
||||
init.o: ../../core/dircontainer.h ../../db/db.h ../../db/dbbase.h
|
||||
init.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
init.o: ../../db/dbitemquery.h ../../core/item.h ../../db/dbitemcolumns.h
|
||||
init.o: ../../core/user.h ../../core/group.h ../../core/dircontainer.h
|
||||
init.o: ../../core/ugcontainer.h ../../notify/notify.h
|
||||
init.o: ../../notify/notifypool.h ../../templates/patterns.h
|
||||
init.o: ../../templates/locale.h ../../templates/localefilter.h
|
||||
init.o: ../../../ezc/src/ezc.h ../../../ezc/src/utf8.h
|
||||
init.o: ../../../ezc/src/generator.h ../../../ezc/src/pattern.h
|
||||
init.o: ../../../ezc/src/functions.h ../../../ezc/src/funinfo.h
|
||||
init.o: ../../../ezc/src/stringconv.h ../../notify/notifythread.h
|
||||
init.o: ../../core/basethread.h ../../core/synchro.h
|
||||
init.o: ../../notify/templatesnotify.h ../../core/config.h ../../core/users.h
|
||||
init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
||||
init.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
init.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
init.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
init.o: ../../core/request.h ../../core/system.h ../../core/synchro.h
|
||||
init.o: ../../core/misc.h ../../core/session.h ../../core/user.h
|
||||
init.o: ../../core/plugindata.h ../../core/rebus.h ../../core/mount.h
|
||||
init.o: ../../templates/locale.h ../../core/confparser.h ../../core/system.h
|
||||
init.o: ../../core/dirs.h ../../core/dircontainer.h ../../db/db.h
|
||||
init.o: ../../db/dbbase.h ../../db/dbitemquery.h ../../core/item.h
|
||||
init.o: ../../db/dbitemcolumns.h ../../core/user.h ../../core/group.h
|
||||
init.o: ../../core/dircontainer.h ../../core/ugcontainer.h
|
||||
init.o: ../../notify/notify.h ../../notify/notifypool.h
|
||||
init.o: ../../templates/patterns.h ../../templates/locale.h
|
||||
init.o: ../../templates/localefilter.h ../../../ezc/src/ezc.h
|
||||
init.o: ../../../ezc/src/utf8.h ../../../ezc/src/generator.h
|
||||
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/functions.h
|
||||
init.o: ../../../ezc/src/funinfo.h ../../../ezc/src/stringconv.h
|
||||
init.o: ../../notify/notifythread.h ../../core/basethread.h
|
||||
init.o: ../../core/synchro.h ../../notify/templatesnotify.h
|
||||
init.o: ../../core/config.h ../../core/users.h ../../core/ugcontainer.h
|
||||
init.o: ../../core/lastcontainer.h ../../templates/misc.h
|
||||
init.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
init.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
init.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
init.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
init.o: ../../core/threadmanager.h ../../core/sessionmanager.h
|
||||
init.o: ../../core/sessioncontainer.h ../../functions/functions.h
|
||||
init.o: ../../functions/functionbase.h ../../core/request.h
|
||||
init.o: ../../core/system.h ../../core/synchro.h
|
||||
init.o: ../../functions/functionparser.h ../../core/cur.h
|
||||
init.o: ../../functions/adduser.h ../../functions/cat.h
|
||||
init.o: ../../functions/chmod.h ../../functions/privchanger.h
|
||||
|
@ -64,4 +111,6 @@ init.o: ../../functions/who.h ../../functions/vim.h ../../core/htmlfilter.h
|
|||
init.o: ../../templates/templates.h ../../templates/patterncacher.h
|
||||
init.o: ../../templates/indexpatterns.h ../../templates/patterns.h
|
||||
init.o: ../../templates/changepatterns.h ../../core/sessionmanager.h
|
||||
init.o: exportthread.h message.h
|
||||
init.o: exportthread.h message.h exportinfo.h export.h db.h ../../db/dbbase.h
|
||||
init.o: ../../db/dbconn.h ../../db/dbtextstream.h ../../core/error.h
|
||||
init.o: ../../core/dirs.h
|
||||
|
|
|
@ -1 +1 @@
|
|||
o = exportthread.o init.o
|
||||
o = db.o exportinfo.o exportthread.o init.o
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "db.h"
|
||||
#include "core/log.h"
|
||||
|
||||
|
||||
namespace Export
|
||||
{
|
||||
|
||||
void Db::SetDirs(Dirs * pdirs)
|
||||
{
|
||||
dirs = pdirs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Db::SetExportCols(PGresult * r)
|
||||
{
|
||||
cid = AssertColumn(r, "id");
|
||||
cuser_id = AssertColumn(r, "user_id");
|
||||
cdir = AssertColumn(r, "dir");
|
||||
cftp_id = AssertColumn(r, "ftp_id");
|
||||
cftp_dir = AssertColumn(r, "ftp_dir");
|
||||
cname = AssertColumn(r, "name");
|
||||
cserver = AssertColumn(r, "server");
|
||||
clogin = AssertColumn(r, "login");
|
||||
cpass = AssertColumn(r, "pass");
|
||||
cpass_type = AssertColumn(r, "pass_type");
|
||||
|
||||
ccan_change_ftp_params = AssertColumn(r, "can_change_ftp_params");
|
||||
ccan_change_dir = AssertColumn(r, "can_change_dir");
|
||||
chttp_server = AssertColumn(r, "http_server");
|
||||
}
|
||||
|
||||
|
||||
void Db::SetExportValues(PGresult * r, int row, Export & exp)
|
||||
{
|
||||
exp.Clear();
|
||||
|
||||
exp.id = AssertValueLong(r, row, cid);
|
||||
exp.user_id = AssertValueLong(r, row, cuser_id);
|
||||
exp.ftp_id = AssertValueLong(r, row, cftp_id);
|
||||
exp.ftp_pass_type = AssertValueInt(r, row, cpass_type);
|
||||
|
||||
AssertValueWide(r, row, cdir, exp.dir);
|
||||
AssertValueWide(r, row, cftp_dir, exp.ftp_dir);
|
||||
AssertValueWide(r, row, cname, exp.ftp_name);
|
||||
AssertValueWide(r, row, cserver, exp.ftp_server);
|
||||
AssertValueWide(r, row, clogin, exp.ftp_login);
|
||||
AssertValueWide(r, row, chttp_server, exp.http_server);
|
||||
AssertValueBin(r, row, cpass, exp.ftp_pass_bin);
|
||||
|
||||
exp.can_change_ftp_params = AssertValueBool(r, row, ccan_change_ftp_params);
|
||||
exp.can_change_dir = AssertValueBool(r, row, ccan_change_dir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool Db::GetExport(long user_id, std::vector<Export> & export_tab, bool clear_tab)
|
||||
{
|
||||
if( clear_tab )
|
||||
export_tab.clear();
|
||||
|
||||
PGresult * r = 0;
|
||||
bool result = true;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R( "select export.id, user_id, dir, ftp_id, ftp_dir, can_change_ftp_params, can_change_dir, "
|
||||
"http_server, name, server, login, pass, pass_type from plugins.export "
|
||||
"left join plugins.export_ftp on ftp_id = export_ftp.id where user_id = ")
|
||||
<< user_id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
SetExportCols(r);
|
||||
int rows = Rows(r);
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
{
|
||||
SetExportValues(r, i, exp);
|
||||
export_tab.push_back(exp);
|
||||
}
|
||||
}
|
||||
catch(const Error &)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Db::GetExport(long id, Export & exp)
|
||||
{
|
||||
exp.Clear();
|
||||
PGresult * r = 0;
|
||||
bool result = false;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R( "select export.id, user_id, dir, ftp_id, ftp_dir, can_change_ftp_params, can_change_dir, "
|
||||
"http_server, name, server, login, pass, pass_type from plugins.export "
|
||||
"left join plugins.export_ftp on ftp_id = export_ftp.id where export.id = ")
|
||||
<< id
|
||||
<< R(";");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
SetExportCols(r);
|
||||
|
||||
if( Rows(r) == 1 )
|
||||
{
|
||||
SetExportValues(r, 0, exp);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
catch(const Error &)
|
||||
{
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Db::GetExportDirs(std::vector<ExportDir> & export_tab, bool clear_tab)
|
||||
{
|
||||
if( clear_tab )
|
||||
export_tab.clear();
|
||||
|
||||
PGresult * r = 0;
|
||||
bool result = true;
|
||||
|
||||
try
|
||||
{
|
||||
query.Clear();
|
||||
query << R( "select export.id, dir from plugins.export;");
|
||||
|
||||
r = AssertQuery(query);
|
||||
AssertResult(r, PGRES_TUPLES_OK);
|
||||
|
||||
int rows = Rows(r);
|
||||
cid = AssertColumn(r, "id");
|
||||
cdir = AssertColumn(r, "dir");
|
||||
|
||||
for(int i=0 ; i<rows ; ++i)
|
||||
{
|
||||
exp_dir.id = AssertValueLong(r, i, cid);
|
||||
AssertValueWide(r, i, cdir, dir_temp);
|
||||
|
||||
Item * pdir = dirs->GetDir(dir_temp);
|
||||
|
||||
if( pdir )
|
||||
{
|
||||
exp_dir.dir_id = pdir->id;
|
||||
export_tab.push_back(exp_dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
slog << "There is not such a directory: " << dir_temp << " (skipping)" << logend;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(const Error &)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
ClearResult(r);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_export_db
|
||||
#define headerfile_winix_plugins_export_db
|
||||
|
||||
#include <vector>
|
||||
#include "db/dbbase.h"
|
||||
#include "export.h"
|
||||
#include "core/dirs.h"
|
||||
|
||||
|
||||
|
||||
namespace Export
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Db : public DbBase
|
||||
{
|
||||
public:
|
||||
|
||||
void SetDirs(Dirs * pdirs);
|
||||
|
||||
bool GetExport(long user_id, std::vector<Export> & export_tab, bool clear_tab = true);
|
||||
bool GetExport(long id, Export & exp);
|
||||
bool GetExportDirs(std::vector<ExportDir> & export_tab, bool clear_tab = true);
|
||||
|
||||
private:
|
||||
|
||||
Dirs * dirs;
|
||||
|
||||
Export exp;
|
||||
ExportDir exp_dir;
|
||||
DbTextStream query;
|
||||
std::wstring dir_temp;
|
||||
|
||||
int cid;
|
||||
int cuser_id;
|
||||
int cdir;
|
||||
int cftp_id;
|
||||
int cftp_dir;
|
||||
int cname;
|
||||
int cserver;
|
||||
int clogin;
|
||||
int cpass;
|
||||
int cpass_type;
|
||||
int ccan_change_ftp_params;
|
||||
int ccan_change_dir;
|
||||
int chttp_server;
|
||||
|
||||
void SetExportCols(PGresult * r);
|
||||
void SetExportValues(PGresult * r, int row, Export & exp);
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_export_export
|
||||
#define headerfile_winix_plugins_export_export
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
namespace Export
|
||||
{
|
||||
|
||||
struct ExportDir
|
||||
{
|
||||
long id;
|
||||
long dir_id;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct Export
|
||||
{
|
||||
long id;
|
||||
long user_id;
|
||||
std::wstring dir;
|
||||
|
||||
long ftp_id;
|
||||
std::wstring ftp_dir;
|
||||
|
||||
std::wstring ftp_name;
|
||||
std::wstring ftp_server;
|
||||
std::wstring ftp_login;
|
||||
std::wstring ftp_pass;
|
||||
std::string ftp_pass_bin;
|
||||
int ftp_pass_type;
|
||||
|
||||
bool can_change_ftp_params;
|
||||
bool can_change_dir;
|
||||
|
||||
std::wstring http_server;
|
||||
|
||||
|
||||
|
||||
Export()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
id = user_id = ftp_id = -1;
|
||||
ftp_pass_type = 0;
|
||||
|
||||
dir.clear();
|
||||
ftp_dir.clear();
|
||||
ftp_name.clear();
|
||||
ftp_server.clear();
|
||||
ftp_login.clear();
|
||||
ftp_pass.clear();
|
||||
ftp_pass_bin.clear();
|
||||
|
||||
can_change_ftp_params = false;
|
||||
can_change_dir = false;
|
||||
|
||||
http_server.clear();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,234 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "core/log.h"
|
||||
#include "exportinfo.h"
|
||||
|
||||
|
||||
|
||||
namespace Export
|
||||
{
|
||||
|
||||
|
||||
ExportInfo::ExportInfo()
|
||||
{
|
||||
use_rsa = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExportInfo::SetSystem(System * psystem)
|
||||
{
|
||||
system = psystem;
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SetConfig(Config * pconfig)
|
||||
{
|
||||
config = pconfig;
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SetDb(Db * pdb)
|
||||
{
|
||||
db = pdb;
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SetExportThread(ExportThread * pexport_thread)
|
||||
{
|
||||
export_thread = pexport_thread;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExportInfo::ReadExportDirs()
|
||||
{
|
||||
db->GetExportDirs(export_dirs);
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::ReadConfigVars()
|
||||
{
|
||||
use_rsa = config->Bool(L"export_rsa", false);
|
||||
rsa_key = config->Text(L"export_rsa_key");
|
||||
}
|
||||
|
||||
|
||||
ExportDir * ExportInfo::FindDir(long dir_id)
|
||||
{
|
||||
for(size_t i=0 ; i<export_dirs.size() ; ++i)
|
||||
{
|
||||
if( dir_id == export_dirs[i].dir_id || system->dirs.HasParent(dir_id, export_dirs[i].dir_id) )
|
||||
return &export_dirs[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool ExportInfo::DecodePass(Export & exp)
|
||||
{
|
||||
if( exp.ftp_pass_type == 0 )
|
||||
{
|
||||
Ezc::UTF8ToWide(exp.ftp_pass_bin, exp.ftp_pass);
|
||||
}
|
||||
else
|
||||
{
|
||||
if( system->crypt.RSA(false, rsa_key, exp.ftp_pass_bin, pass_decrypted) )
|
||||
{
|
||||
Ezc::UTF8ToWide(pass_decrypted, exp.ftp_pass);
|
||||
system->crypt.ClearString(pass_decrypted);
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log1 << "Export: I cannot decrypt a password (RSA failed)" << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ExportInfo::SkipDir(long dir_id, std::wstring & dir)
|
||||
{
|
||||
if( system->dirs.MakePath(dir_id, tmp_dir) )
|
||||
{
|
||||
if( !tmp_dir.empty() && IsSubString(tmp_dir, dir) )
|
||||
{
|
||||
// tmp_dir has a slash at the end
|
||||
// we want the slash at the beginning
|
||||
dir.erase(0, tmp_dir.size()-1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExportInfo::SendFile(const Item & item, bool thumb)
|
||||
{
|
||||
ExportDir * exp_dir = FindDir(item.parent_id);
|
||||
|
||||
if( !exp_dir )
|
||||
return;
|
||||
|
||||
msg.Clear();
|
||||
system->dirs.MakePath(item.parent_id, msg.path);
|
||||
msg.path += item.url;
|
||||
|
||||
if( item.file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
{
|
||||
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC;
|
||||
|
||||
if( !system->MakeFilePath(item, msg.url, thumb) )
|
||||
{
|
||||
log << log1 << "Export: I cannot create a path to a static file, item id: " << item.id << logend;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE;
|
||||
msg.url = config->url_proto;
|
||||
msg.url += config->base_url;
|
||||
system->dirs.MakePath(item.parent_id, msg.url, false);
|
||||
msg.url += item.url;
|
||||
msg.path += L".php"; // !! do konfiga
|
||||
}
|
||||
|
||||
msg.errors = 0;
|
||||
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && db->GetExport(exp_dir->id, exp) )
|
||||
{
|
||||
if( DecodePass(exp) )
|
||||
{
|
||||
msg.ftp_login = exp.ftp_login;
|
||||
msg.ftp_pass = exp.ftp_pass;
|
||||
msg.ftp_server = exp.ftp_server;
|
||||
msg.http_server = exp.http_server;
|
||||
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
|
||||
|
||||
if( !item.file_path.empty() && thumb ) // !! uzyc file_type
|
||||
msg.path.insert(0, L"/download"); // !! do konfiga
|
||||
|
||||
if( !exp.ftp_dir.empty() )
|
||||
msg.path.insert(0, exp.ftp_dir);
|
||||
|
||||
if( !msg.path.empty() && msg.path[0] != '/' )
|
||||
msg.path.insert(0, L"/");
|
||||
|
||||
export_thread->AddMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExportInfo::SendDir(const Item & item)
|
||||
{
|
||||
ExportDir * exp_dir = FindDir(item.id);
|
||||
|
||||
if( !exp_dir )
|
||||
return;
|
||||
|
||||
msg.Clear();
|
||||
system->dirs.MakePath(item.id, msg.path);
|
||||
|
||||
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE;
|
||||
msg.url = config->url_proto;
|
||||
msg.url += config->base_url;
|
||||
system->dirs.MakePath(item.id, msg.url, false);
|
||||
msg.path += L"index.html"; // !! do konfiga
|
||||
|
||||
msg.errors = 0;
|
||||
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && db->GetExport(exp_dir->id, exp) )
|
||||
{
|
||||
if( DecodePass(exp) )
|
||||
{
|
||||
msg.ftp_login = exp.ftp_login;
|
||||
msg.ftp_pass = exp.ftp_pass;
|
||||
msg.ftp_server = exp.ftp_server;
|
||||
msg.http_server = exp.http_server;
|
||||
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
|
||||
|
||||
if( !exp.ftp_dir.empty() )
|
||||
msg.path.insert(0, exp.ftp_dir);
|
||||
|
||||
if( !msg.path.empty() && msg.path[0] != '/' )
|
||||
msg.path.insert(0, L"/");
|
||||
|
||||
export_thread->AddMessage(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SendDir(long dir_id)
|
||||
{
|
||||
Item * dir = system->dirs.GetDir(dir_id);
|
||||
|
||||
if( !dir )
|
||||
return;
|
||||
|
||||
SendDir(*dir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfile_winix_plugins_export_exportinfo
|
||||
#define headerfile_winix_plugins_export_exportinfo
|
||||
|
||||
#include "core/system.h"
|
||||
#include "export.h"
|
||||
#include "db.h"
|
||||
#include "message.h"
|
||||
#include "exportthread.h"
|
||||
|
||||
|
||||
|
||||
namespace Export
|
||||
{
|
||||
|
||||
|
||||
class ExportInfo
|
||||
{
|
||||
public:
|
||||
|
||||
ExportInfo();
|
||||
|
||||
void SetSystem(System * psystem);
|
||||
void SetConfig(Config * pconfig);
|
||||
void SetDb(Db * pdb);
|
||||
void SetExportThread(ExportThread * pexport_thread);
|
||||
|
||||
void ReadExportDirs();
|
||||
void ReadConfigVars();
|
||||
|
||||
ExportDir * FindDir(long dir_id);
|
||||
|
||||
bool DecodePass(Export & exp);
|
||||
|
||||
void SendFile(const Item & item, bool thumb = false);
|
||||
void SendDir(const Item & item);
|
||||
void SendDir(long dir_id);
|
||||
|
||||
private:
|
||||
|
||||
System * system;
|
||||
Config * config;
|
||||
Db * db;
|
||||
ExportThread * export_thread;
|
||||
|
||||
bool use_rsa;
|
||||
std::wstring rsa_key;
|
||||
std::string pass_decrypted;
|
||||
Message msg;
|
||||
Export exp;
|
||||
std::wstring tmp_dir;
|
||||
std::vector<ExportDir> export_dirs;
|
||||
|
||||
bool SkipDir(long dir_id, std::wstring & dir);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
#include <curl/curl.h>
|
||||
#include <string.h>
|
||||
#include "exportthread.h"
|
||||
#include "core/log.h"
|
||||
|
@ -28,6 +27,9 @@ ExportThread::ExportThread()
|
|||
{
|
||||
exp_thread = 0;
|
||||
utf8 = false;
|
||||
browser_name = "Winix Export";
|
||||
conn_timeout = 5;
|
||||
conn_max_errors = 3;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,12 +40,15 @@ void ExportThread::SetUTF8(bool use_utf8)
|
|||
}
|
||||
|
||||
|
||||
void ExportThread::SetBaseUrl(const std::wstring & url)
|
||||
{
|
||||
base_url = url;
|
||||
}
|
||||
|
||||
void ExportThread::AddMessage(const Message & message)
|
||||
{
|
||||
message_tab.insert(message_tab.end(), message);
|
||||
WakeUpThread();
|
||||
|
||||
log << log1 << "yes ser" << logend;
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,8 +69,6 @@ void ExportThread::AddMessage(int type, const std::wstring & url, const std::wst
|
|||
// objects are locked
|
||||
bool ExportThread::SignalReceived()
|
||||
{
|
||||
log << log1 << "------------- a ---------------" << logend;
|
||||
|
||||
return !message_tab.empty();
|
||||
}
|
||||
|
||||
|
@ -79,7 +82,6 @@ MessageTab::iterator i;
|
|||
bool end;
|
||||
|
||||
Lock();
|
||||
log << log1 << "------------- swinka ---------------" << logend;
|
||||
i = message_tab.begin();
|
||||
Unlock();
|
||||
|
||||
|
@ -90,7 +92,19 @@ bool end;
|
|||
if( i != message_tab.end() )
|
||||
{
|
||||
message_work = *i;
|
||||
message_tab.erase(i++);
|
||||
|
||||
Unlock();
|
||||
DoMessage();
|
||||
Lock();
|
||||
|
||||
// although there was Unlock() used we can use the same iterator 'i' here
|
||||
// it will *not* be invalidated (MessageTab is a std::list)
|
||||
// and we are deleting only here
|
||||
i->errors = message_work.errors;
|
||||
|
||||
if( message_work.can_remove )
|
||||
message_tab.erase(i++);
|
||||
|
||||
end = false;
|
||||
}
|
||||
else
|
||||
|
@ -98,11 +112,8 @@ bool end;
|
|||
end = true;
|
||||
}
|
||||
|
||||
WaitForSignalSleep(5);
|
||||
Unlock();
|
||||
|
||||
if( !end )
|
||||
DoMessage();
|
||||
|
||||
}
|
||||
while( !end && !IsExitSignal() );
|
||||
}
|
||||
|
@ -113,24 +124,45 @@ bool end;
|
|||
// current message we have in 'message_work'
|
||||
void ExportThread::DoMessage()
|
||||
{
|
||||
Lock();
|
||||
bool sent_ok = false;
|
||||
|
||||
if( utf8 )
|
||||
Ezc::WideToUTF8(message_work.url, url_a);
|
||||
Convert(message_work.url, url_a);
|
||||
|
||||
if( message_work.type == WINIX_PL_EXPORT_TYPE_CREATE_FILE )
|
||||
{
|
||||
if( Fetch(url_a.c_str()) )
|
||||
{
|
||||
ChangeAdresses(buffer);
|
||||
|
||||
if( Put() )
|
||||
sent_ok = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
AssignString(message_work.url, url_a);
|
||||
{
|
||||
if( Put() )
|
||||
sent_ok = true;
|
||||
}
|
||||
|
||||
Unlock();
|
||||
|
||||
Fetch(url_a.c_str());
|
||||
if( sent_ok )
|
||||
{
|
||||
message_work.can_remove = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
message_work.errors += 1;
|
||||
message_work.can_remove = false;
|
||||
|
||||
Lock();
|
||||
log << log1 << "sciagnalem takie cos ---------------------------------------------------" << logend;
|
||||
if( message_work.errors > conn_max_errors )
|
||||
{
|
||||
message_work.can_remove = true;
|
||||
|
||||
log << "rozmiar: " << buffer.size() << logend;
|
||||
|
||||
log << log1 << "koniec takiego cosia ---------------------------------------------------" << logend << logsave;
|
||||
Unlock();
|
||||
Lock();
|
||||
log << log1 << "Export: too many errors for uploading " << message_work.path << " (skipping)" << logend << logsave;
|
||||
Unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,11 +174,7 @@ void ExportThread::DoMessage()
|
|||
// objects are not locked
|
||||
bool ExportThread::Fetch(const char * url)
|
||||
{
|
||||
CURL * curl;
|
||||
CURLcode res;
|
||||
long code;
|
||||
|
||||
curl = curl_easy_init();
|
||||
CURL * curl = curl_easy_init();
|
||||
|
||||
if( !curl )
|
||||
{
|
||||
|
@ -156,26 +184,29 @@ long code;
|
|||
return false;
|
||||
}
|
||||
|
||||
exp_thread = this;
|
||||
error_buf[0] = 0;
|
||||
exp_thread = this;
|
||||
buffer.clear();
|
||||
|
||||
/*
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); // the http code will be from the last request
|
||||
*/
|
||||
//curl_easy_setopt(curl, CURLOPT_WRITEDATA, file);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, StaticSaveFunction);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Winix");
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, StaticSaveFunction);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, browser_name.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, conn_timeout);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buf);
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 20);
|
||||
|
||||
CURLcode res = curl_easy_perform(curl);
|
||||
|
||||
//long code; // http code
|
||||
//curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
if( res!=0 || code!=200 )
|
||||
if( res != 0 )
|
||||
{
|
||||
Lock();
|
||||
log << log1 << "Ezport: error: operation result: " << (int)res << ", http code: " << code << logend;
|
||||
log << log1 << "Export: download failed: " << error_buf << logend << logsave;
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
|
@ -201,14 +232,274 @@ size_t ExportThread::SaveFunction(char * ptr, size_t size, size_t nmemb, void *u
|
|||
if( len > 0 )
|
||||
buffer.append(ptr, len);
|
||||
|
||||
Lock();
|
||||
log << log1 << "odebralem cosik: size: " << size << ", nmemb: " << nmemb << logend;
|
||||
Unlock();
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread
|
||||
// objects are not locked
|
||||
void ExportThread::Convert(const std::wstring & in, std::string & out, bool clear)
|
||||
{
|
||||
Lock();
|
||||
|
||||
if( utf8 )
|
||||
Ezc::WideToUTF8(in, out, clear);
|
||||
else
|
||||
AssignString(in, out, clear);
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// second thread
|
||||
// objects are not locked
|
||||
bool ExportThread::Put()
|
||||
{
|
||||
FILE * file = 0;
|
||||
|
||||
if( message_work.type == WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC )
|
||||
{
|
||||
Convert(message_work.url, local_path);
|
||||
file = fopen(local_path.c_str(), "r");
|
||||
|
||||
if( !file )
|
||||
{
|
||||
Lock();
|
||||
log << log1 << "Export: I cannot open the file: " << local_path << logend;
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
log << log3 << "Export: sending a static file: " << local_path << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CURL * curl = curl_easy_init();
|
||||
|
||||
|
||||
if( !curl )
|
||||
{
|
||||
Lock();
|
||||
log << log1 << "Export: I can't use curl (sending)" << logend;
|
||||
Unlock();
|
||||
|
||||
if( file )
|
||||
fclose(file);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
exp_thread = this;
|
||||
error_buf[0] = 0;
|
||||
buffer_read_index = 0;
|
||||
|
||||
ftp_server = "ftp://";
|
||||
Convert(message_work.ftp_server, ftp_server, false);
|
||||
Convert(message_work.path, ftp_server, false);
|
||||
Convert(message_work.ftp_login, ftp_login);
|
||||
Convert(message_work.ftp_pass, ftp_pass);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, ftp_server.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_USERNAME, ftp_login.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_PASSWORD, ftp_pass.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 2);
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, browser_name.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, conn_timeout);
|
||||
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buf);
|
||||
|
||||
if( file )
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, file);
|
||||
}
|
||||
else
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, StaticReadFunction);
|
||||
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer.size());
|
||||
}
|
||||
|
||||
|
||||
CURLcode res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
if( file )
|
||||
fclose(file);
|
||||
|
||||
if( res != 0 )
|
||||
{
|
||||
Lock();
|
||||
log << log1 << "Export: upload failed: " << error_buf << " (" << ftp_server << ")" << logend << logsave;
|
||||
Unlock();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Lock();
|
||||
log << log2 << "Export: uploaded: " << ftp_server << logend << logsave;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
size_t ExportThread::StaticReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
|
||||
{
|
||||
if( exp_thread )
|
||||
return exp_thread->ReadFunction(ptr, size, nmemb, userdata);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
size_t ExportThread::ReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
|
||||
{
|
||||
size_t max_len = size * nmemb;
|
||||
size_t i;
|
||||
|
||||
for(i=0 ; i<max_len && buffer_read_index < buffer.size() ; ++i, ++buffer_read_index )
|
||||
{
|
||||
ptr[i] = buffer[buffer_read_index];
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
void ExportThread::CreateBaseUrl(std::string & buf)
|
||||
{
|
||||
buf = "http://";
|
||||
Convert(base_url, buf, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ExportThread::ChangeAdresses(std::string & buf)
|
||||
{
|
||||
// !! mozna lock skasowac jesli loger nie bedzie uzywany
|
||||
Lock();
|
||||
|
||||
ChangeAdressesThumb(buf);
|
||||
|
||||
CreateBaseUrl(look_for_url);
|
||||
look_for_url += "/static";
|
||||
Convert(message_work.src_dir, look_for_url, false);
|
||||
Convert(message_work.http_server, repl_url);
|
||||
repl_url += "/static/";
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
|
||||
/*
|
||||
CreateBaseUrl(look_for_url);
|
||||
look_for_url += "/common/";
|
||||
Convert(message_work.http_server, repl_url);
|
||||
repl_url += "/common/";
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
*/
|
||||
|
||||
CreateBaseUrl(look_for_url);
|
||||
Convert(message_work.src_dir, look_for_url, false);
|
||||
Convert(message_work.http_server, repl_url);
|
||||
repl_url += "/";
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
|
||||
NoLastSlash(look_for_url);
|
||||
Convert(message_work.http_server, repl_url);
|
||||
look_for_url += '\"';
|
||||
repl_url += '\"';
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
|
||||
|
||||
Convert(message_work.src_dir, look_for_url);
|
||||
repl_url = '/';
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
|
||||
NoLastSlash(look_for_url);
|
||||
look_for_url += '\"';
|
||||
repl_url = "/\"";
|
||||
log << log1 << "zamiana: |" << look_for_url << "|, na: |" << repl_url << "|" << logend << logsave;
|
||||
ReplaceString(buf, look_for_url, repl_url);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ExportThread::ChangeAdressesThumb(std::string & buf)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
CreateBaseUrl(look_for_url);
|
||||
Convert(message_work.src_dir, look_for_url, false);
|
||||
|
||||
for(i=0 ; i<buf.size() ; ++i)
|
||||
{
|
||||
if( IsSubStringp(look_for_url.c_str(), &buf[i]) )
|
||||
{
|
||||
i += look_for_url.size() - 1; // without skipping the last slash
|
||||
|
||||
if( HasThumbInAdress(buf, i) )
|
||||
{
|
||||
if( i <= buf.size() )
|
||||
buf.insert(i, "/download"); //!! do konfiga
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool ExportThread::HasThumbInAdress(std::string & buf, size_t i)
|
||||
{
|
||||
const char * thumb1 = "/-/thumb";
|
||||
const char * thumb2 = "/download/thumb";
|
||||
|
||||
size_t len1 = strlen(thumb1);
|
||||
size_t len2 = strlen(thumb2);
|
||||
|
||||
for( ; i<buf.size() ; ++i)
|
||||
{
|
||||
if( IsSubStringp(thumb1, &buf[i]) )
|
||||
{
|
||||
buf.erase(i, len1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if( IsSubStringp(thumb2, &buf[i]) )
|
||||
{
|
||||
buf.erase(i, len2);
|
||||
return true;
|
||||
}
|
||||
|
||||
if( buf[i] == 10 || buf[i] == '"' || buf[i] == ' ' || buf[i] == '\t' ||
|
||||
buf[i] == '>' ||buf[i] == '<' )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
#ifndef headerfile_winix_plugins_export_exportthread
|
||||
#define headerfile_winix_plugins_export_exportthread
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <curl/curl.h>
|
||||
#include "core/basethread.h"
|
||||
#include "message.h"
|
||||
|
||||
|
@ -27,6 +29,7 @@ public:
|
|||
ExportThread();
|
||||
|
||||
void SetUTF8(bool use_utf8);
|
||||
void SetBaseUrl(const std::wstring & url);
|
||||
|
||||
void AddMessage(const Message & message);
|
||||
void AddMessage(int type, const std::wstring & url, const std::wstring & path);
|
||||
|
@ -41,14 +44,37 @@ private:
|
|||
static ExportThread * exp_thread;
|
||||
std::string url_a;
|
||||
std::string buffer;
|
||||
size_t buffer_read_index;
|
||||
bool utf8;
|
||||
std::wstring base_url;
|
||||
|
||||
std::string browser_name;
|
||||
std::string ftp_server;
|
||||
std::string ftp_login;
|
||||
std::string ftp_pass;
|
||||
char error_buf[CURL_ERROR_SIZE];
|
||||
|
||||
int conn_timeout; // timeout in seconds
|
||||
int conn_max_errors; // maximum errors (if there are more then a message is treated as undeliverable)
|
||||
|
||||
std::string look_for_url;
|
||||
std::string repl_url;
|
||||
std::string local_path;
|
||||
|
||||
virtual bool SignalReceived();
|
||||
virtual void Do();
|
||||
void DoMessage();
|
||||
bool Fetch(const char * url);
|
||||
bool Put();
|
||||
static size_t StaticSaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
size_t SaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
static size_t StaticReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
size_t ReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
|
||||
void Convert(const std::wstring & in, std::string & out, bool clear = true);
|
||||
void ChangeAdresses(std::string & buf);
|
||||
void ChangeAdressesThumb(std::string & buf);
|
||||
bool HasThumbInAdress(std::string & buf, size_t i);
|
||||
void CreateBaseUrl(std::string & buf);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
#include "core/log.h"
|
||||
#include "core/plugin.h"
|
||||
#include "exportthread.h"
|
||||
#include "exportinfo.h"
|
||||
#include "db.h"
|
||||
|
||||
|
||||
|
||||
extern "C" void Init(PluginInfo &);
|
||||
|
@ -25,10 +28,8 @@ namespace Export
|
|||
const wchar_t plugin_name[] = L"export";
|
||||
int mount_par_export_conf = -1;
|
||||
ExportThread export_thread;
|
||||
Message msg;
|
||||
|
||||
|
||||
|
||||
Db db;
|
||||
ExportInfo export_info;
|
||||
|
||||
|
||||
|
||||
|
@ -50,7 +51,20 @@ void FstabChanged(PluginInfo & info)
|
|||
void InitPlugin(PluginInfo & info)
|
||||
{
|
||||
export_thread.SetUTF8(info.config->utf8);
|
||||
export_thread.SetBaseUrl(info.config->base_url);
|
||||
|
||||
info.system->thread_manager.Add(&export_thread);
|
||||
|
||||
export_info.ReadExportDirs();
|
||||
}
|
||||
|
||||
|
||||
void SendDir(PluginInfo & info)
|
||||
{
|
||||
const Item * dir = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( dir )
|
||||
export_info.SendDir(*dir);
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,23 +73,84 @@ void SendFile(PluginInfo & info)
|
|||
{
|
||||
const Item * item = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( !item )
|
||||
return;
|
||||
|
||||
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE;
|
||||
msg.url = info.config->url_proto;
|
||||
msg.url += info.config->base_url;
|
||||
info.system->dirs.MakePath(item->parent_id, msg.url, false);
|
||||
msg.url += item->url;
|
||||
|
||||
msg.path.clear();
|
||||
|
||||
log << log1 << "Export: bede sciagal takiego swiniaka: " << msg.url << logend;
|
||||
|
||||
export_thread.AddMessage(msg);
|
||||
if( item )
|
||||
{
|
||||
if( item->file_type == WINIX_ITEM_FILETYPE_IMAGE && info.config->image_resize )
|
||||
{
|
||||
// there'll be a next message WINIX_IMAGE_RESIZED
|
||||
log << log4 << "Export: image will be resized, waiting..." << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
export_info.SendFile(*item);
|
||||
export_info.SendDir(item->parent_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SendFileCopied(PluginInfo & info)
|
||||
{
|
||||
const Item * item = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( item )
|
||||
{
|
||||
export_info.SendFile(*item);
|
||||
|
||||
if( item->file_type != WINIX_ITEM_FILETYPE_NONE )
|
||||
export_info.SendFile(*item, true);
|
||||
|
||||
export_info.SendDir(item->parent_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SendFileResized(PluginInfo & info)
|
||||
{
|
||||
const Item * item = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( item )
|
||||
{
|
||||
export_info.SendFile(*item);
|
||||
export_info.SendDir(item->parent_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SendFileThumb(PluginInfo & info)
|
||||
{
|
||||
const Item * item = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( item )
|
||||
{
|
||||
export_info.SendFile(*item, true);
|
||||
export_info.SendDir(item->parent_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FileRemoved(PluginInfo & info)
|
||||
{
|
||||
const Item * item = reinterpret_cast<Item*>(info.p1);
|
||||
|
||||
if( item )
|
||||
{
|
||||
export_info.SendDir(item->parent_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void ProcessRequest(PluginInfo & info)
|
||||
{
|
||||
if( info.cur->request->function == &info.functions->fun_reload )
|
||||
{
|
||||
if( info.cur->request->IsParam(L"export") )
|
||||
export_info.ReadExportDirs();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AddEzcFunctions(PluginInfo & info);
|
||||
|
||||
|
@ -89,16 +164,37 @@ void Init(PluginInfo & info)
|
|||
{
|
||||
using namespace Export;
|
||||
|
||||
db.SetConn(info.db->GetConn());
|
||||
db.LogQueries(info.config->log_db_query);
|
||||
db.SetDirs(&info.system->dirs);
|
||||
export_info.SetSystem(info.system);
|
||||
export_info.SetConfig(info.config);
|
||||
export_info.SetDb(&db);
|
||||
export_info.SetExportThread(&export_thread);
|
||||
|
||||
|
||||
// plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
|
||||
plugin.Assign(WINIX_ADD_MOUNTS, AddMountParams);
|
||||
// plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged);
|
||||
|
||||
|
||||
plugin.Assign(WINIX_FILE_ADDED, SendFile);
|
||||
plugin.Assign(WINIX_FILE_CHANGED, SendFile);
|
||||
plugin.Assign(WINIX_FILE_CHANGED, SendFileResized);
|
||||
plugin.Assign(WINIX_CREATED_THUMB, SendFileThumb);
|
||||
plugin.Assign(WINIX_IMAGE_RESIZED, SendFileResized);
|
||||
plugin.Assign(WINIX_FILE_MOVED, SendFileCopied);
|
||||
plugin.Assign(WINIX_FILE_COPIED, SendFileCopied);
|
||||
|
||||
plugin.Assign(WINIX_DIR_CONTENT_SORTED, SendDir);
|
||||
plugin.Assign(5000, FileRemoved);
|
||||
|
||||
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
|
||||
|
||||
plugin.Assign(WINIX_PLUGIN_INIT, InitPlugin);
|
||||
|
||||
|
||||
|
||||
|
||||
info.p1 = (void*)(plugin_name);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
|
||||
|
||||
// message types
|
||||
#define WINIX_PL_EXPORT_TYPE_CREATE_FILE 1
|
||||
#define WINIX_PL_EXPORT_TYPE_CREATE_DIR 2
|
||||
#define WINIX_PL_EXPORT_TYPE_CREATE_FILE 1
|
||||
#define WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -25,13 +26,47 @@ struct Message
|
|||
// message type
|
||||
int type;
|
||||
|
||||
// original (source) url
|
||||
// original (source) url (if message is WINIX_PL_EXPORT_TYPE_CREATE_FILE)
|
||||
// or a file path (WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC)
|
||||
std::wstring url;
|
||||
|
||||
// source directory
|
||||
std::wstring src_dir;
|
||||
|
||||
// output file (directory) name
|
||||
// relative path
|
||||
// with a slash at the beginning (and at the end if it is a directory)
|
||||
std::wstring path;
|
||||
|
||||
std::wstring ftp_server;
|
||||
std::wstring ftp_login;
|
||||
std::wstring ftp_pass;
|
||||
|
||||
// server on which the site will be visible
|
||||
std::wstring http_server;
|
||||
|
||||
// how many errors were with this message
|
||||
int errors;
|
||||
|
||||
// shoud be removed
|
||||
bool can_remove;
|
||||
|
||||
|
||||
void Clear()
|
||||
{
|
||||
type = 0;
|
||||
errors = 0;
|
||||
can_remove = true;
|
||||
|
||||
url.clear();
|
||||
src_dir.clear();
|
||||
path.clear();
|
||||
ftp_server.clear();
|
||||
ftp_login.clear();
|
||||
ftp_pass.clear();
|
||||
http_server.clear();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@ gallery.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
gallery.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
gallery.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
gallery.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
gallery.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
gallery.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
gallery.o: ../../core/threadmanager.h ../../core/synchro.h galleryinfo.h
|
||||
galleryinfo.o: galleryinfo.h ../../core/item.h
|
||||
init.o: gallery.h ../../functions/functionbase.h ../../core/item.h
|
||||
|
@ -58,7 +58,7 @@ init.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
init.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
init.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
init.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
init.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
init.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
init.o: ../../core/threadmanager.h ../../core/synchro.h galleryinfo.h
|
||||
init.o: ../../core/log.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
init.o: ../../core/system.h ../../core/sessionmanager.h
|
||||
|
@ -112,7 +112,7 @@ templates.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
templates.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
templates.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
templates.o: ../../core/threadmanager.h ../../core/synchro.h galleryinfo.h
|
||||
templates.o: ../../core/misc.h ../../core/plugin.h ../../core/pluginmsg.h
|
||||
templates.o: ../../core/system.h ../../core/sessionmanager.h
|
||||
|
|
|
@ -27,7 +27,7 @@ groupinfo.o: ../../core/config.h ../../core/users.h ../../core/ugcontainer.h
|
|||
groupinfo.o: ../../core/lastcontainer.h ../../templates/misc.h
|
||||
groupinfo.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
groupinfo.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
groupinfo.o: ../../core/users.h ../../core/loadavg.h ../../core/thumb.h
|
||||
groupinfo.o: ../../core/users.h ../../core/loadavg.h ../../core/image.h
|
||||
groupinfo.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
groupinfo.o: ../../core/log.h
|
||||
groups.o: groups.h ../../core/log.h
|
||||
|
@ -57,7 +57,7 @@ init.o: ../../core/config.h ../../core/users.h ../../core/ugcontainer.h
|
|||
init.o: ../../core/lastcontainer.h ../../templates/misc.h
|
||||
init.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
init.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
init.o: ../../core/users.h groups.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/users.h groups.h ../../core/loadavg.h ../../core/image.h
|
||||
init.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
@ -114,7 +114,7 @@ templates.o: ../../core/users.h ../../core/ugcontainer.h
|
|||
templates.o: ../../core/lastcontainer.h ../../templates/misc.h
|
||||
templates.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
templates.o: ../../core/run.h ../../core/users.h groups.h
|
||||
templates.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
templates.o: ../../core/threadmanager.h ../../core/sessionmanager.h
|
||||
templates.o: ../../core/htmlfilter.h ../../core/plugin.h
|
||||
templates.o: ../../core/pluginmsg.h ../../core/system.h
|
||||
|
|
|
@ -27,7 +27,7 @@ init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
|||
init.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
init.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
init.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/image.h
|
||||
init.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
@ -85,7 +85,7 @@ templates.o: ../../core/lastcontainer.h ../../core/cur.h ../../core/session.h
|
|||
templates.o: ../../core/rebus.h ../../core/mount.h ../../templates/misc.h
|
||||
templates.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
templates.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
templates.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
templates.o: ../../core/group.h ../../core/loadavg.h ../../core/image.h
|
||||
templates.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
templates.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
templates.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
|
|
@ -29,7 +29,7 @@ init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
|||
init.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
init.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
init.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/image.h
|
||||
init.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
init.o: ../../core/sessionmanager.h ../../core/sessioncontainer.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
@ -92,7 +92,7 @@ templates.o: ../../core/mount.h ../../templates/misc.h
|
|||
templates.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
templates.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
templates.o: ../../core/threadmanager.h ../../core/sessionmanager.h
|
||||
templates.o: ../../core/sessioncontainer.h ../../functions/functions.h
|
||||
templates.o: ../../functions/functionbase.h ../../core/request.h
|
||||
|
|
|
@ -31,7 +31,7 @@ createthread.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
createthread.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
createthread.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
createthread.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
createthread.o: ../../core/loadavg.h ../../core/thumb.h
|
||||
createthread.o: ../../core/loadavg.h ../../core/image.h
|
||||
createthread.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
createthread.o: ../../core/synchro.h tdb.h thread.h ../../db/dbbase.h
|
||||
createthread.o: threadinfo.h ../../functions/functions.h
|
||||
|
@ -84,7 +84,7 @@ funthread.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
funthread.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
funthread.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
funthread.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
funthread.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
funthread.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
funthread.o: ../../core/threadmanager.h ../../core/synchro.h tdb.h thread.h
|
||||
funthread.o: ../../db/dbbase.h threadinfo.h
|
||||
init.o: tdb.h thread.h ../../db/dbbase.h ../../core/error.h reply.h
|
||||
|
@ -115,7 +115,7 @@ init.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
init.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
init.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
init.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
init.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
init.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
init.o: ../../core/threadmanager.h ../../core/synchro.h threadinfo.h
|
||||
init.o: funthread.h createthread.h showthreads.h ../../core/log.h
|
||||
init.o: ../../core/plugin.h pluginmsg.h ../../core/system.h
|
||||
|
@ -169,7 +169,7 @@ reply.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
|||
reply.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
reply.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
reply.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
reply.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
reply.o: ../../core/group.h ../../core/loadavg.h ../../core/image.h
|
||||
reply.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
reply.o: ../../core/synchro.h tdb.h thread.h ../../db/dbbase.h threadinfo.h
|
||||
reply.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
@ -226,7 +226,7 @@ showthreads.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
|||
showthreads.o: ../../core/mounts.h ../../core/mountparser.h
|
||||
showthreads.o: ../../core/crypt.h ../../core/run.h ../../core/users.h
|
||||
showthreads.o: ../../core/groups.h ../../core/group.h ../../core/loadavg.h
|
||||
showthreads.o: ../../core/thumb.h ../../core/basethread.h
|
||||
showthreads.o: ../../core/image.h ../../core/basethread.h
|
||||
showthreads.o: ../../core/threadmanager.h ../../core/synchro.h tdb.h thread.h
|
||||
showthreads.o: ../../db/dbbase.h threadinfo.h
|
||||
tdb.o: tdb.h thread.h ../../db/dbbase.h ../../core/error.h ../../core/log.h
|
||||
|
@ -258,7 +258,7 @@ templates.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
templates.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
templates.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
templates.o: ../../core/threadmanager.h thread.h tdb.h ../../db/dbbase.h
|
||||
templates.o: reply.h ../../functions/functionbase.h ../../core/request.h
|
||||
templates.o: ../../core/synchro.h funthread.h createthread.h showthreads.h
|
||||
|
@ -315,5 +315,5 @@ threadinfo.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
threadinfo.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
threadinfo.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
threadinfo.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
threadinfo.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
threadinfo.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
threadinfo.o: ../../core/threadmanager.h thread.h tdb.h ../../db/dbbase.h
|
||||
|
|
|
@ -31,7 +31,7 @@ createticket.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
createticket.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
createticket.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
createticket.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
createticket.o: ../../core/loadavg.h ../../core/thumb.h
|
||||
createticket.o: ../../core/loadavg.h ../../core/image.h
|
||||
createticket.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
createticket.o: ../../core/synchro.h ticketinfo.h ticketparser.h ticketconf.h
|
||||
createticket.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
|
@ -84,7 +84,7 @@ editticket.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
editticket.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
editticket.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
editticket.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
editticket.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
editticket.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
editticket.o: ../../core/threadmanager.h ../../functions/functions.h
|
||||
editticket.o: ../../functions/functionbase.h ../../functions/functionparser.h
|
||||
editticket.o: ../../core/cur.h ../../functions/adduser.h
|
||||
|
@ -137,7 +137,7 @@ funticket.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
funticket.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
funticket.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
funticket.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
funticket.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
funticket.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
funticket.o: ../../core/threadmanager.h ../../functions/functions.h
|
||||
funticket.o: ../../functions/functionbase.h ../../functions/functionparser.h
|
||||
funticket.o: ../../core/cur.h ../../functions/adduser.h ../../functions/cat.h
|
||||
|
@ -192,7 +192,7 @@ init.o: ../../core/ugcontainer.h ../../core/lastcontainer.h
|
|||
init.o: ../../templates/misc.h ../../templates/htmltextstream.h
|
||||
init.o: ../../core/mounts.h ../../core/mountparser.h ../../core/crypt.h
|
||||
init.o: ../../core/run.h ../../core/users.h ../../core/groups.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/thumb.h
|
||||
init.o: ../../core/group.h ../../core/loadavg.h ../../core/image.h
|
||||
init.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
init.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
init.o: ../../functions/functionparser.h ../../core/cur.h
|
||||
|
@ -254,7 +254,7 @@ showtickets.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
showtickets.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
showtickets.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
showtickets.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
showtickets.o: ../../core/loadavg.h ../../core/thumb.h
|
||||
showtickets.o: ../../core/loadavg.h ../../core/image.h
|
||||
showtickets.o: ../../core/basethread.h ../../core/threadmanager.h
|
||||
showtickets.o: ../../functions/functions.h ../../functions/functionbase.h
|
||||
showtickets.o: ../../functions/functionparser.h ../../core/cur.h
|
||||
|
@ -315,7 +315,7 @@ templates.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
templates.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
templates.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
templates.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
templates.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
templates.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
templates.o: ../../core/threadmanager.h ../../functions/functions.h
|
||||
templates.o: ../../functions/functionbase.h ../../functions/functionparser.h
|
||||
templates.o: ../../core/cur.h ../../functions/adduser.h ../../functions/cat.h
|
||||
|
@ -375,7 +375,7 @@ ticketinfo.o: ../../core/lastcontainer.h ../../templates/misc.h
|
|||
ticketinfo.o: ../../templates/htmltextstream.h ../../core/mounts.h
|
||||
ticketinfo.o: ../../core/mountparser.h ../../core/crypt.h ../../core/run.h
|
||||
ticketinfo.o: ../../core/users.h ../../core/groups.h ../../core/group.h
|
||||
ticketinfo.o: ../../core/loadavg.h ../../core/thumb.h ../../core/basethread.h
|
||||
ticketinfo.o: ../../core/loadavg.h ../../core/image.h ../../core/basethread.h
|
||||
ticketinfo.o: ../../core/threadmanager.h ../../functions/functions.h
|
||||
ticketinfo.o: ../../functions/functionbase.h ../../functions/functionparser.h
|
||||
ticketinfo.o: ../../core/cur.h ../../functions/adduser.h
|
||||
|
|
|
@ -44,7 +44,30 @@ blockquote:before, blockquote:after {
|
|||
content: "";
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
sub, sup {
|
||||
font-size: .83em;
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
sub {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
p.withnext {
|
||||
margin: 1em 0 0 0;
|
||||
|
|
|
@ -44,7 +44,36 @@ blockquote:before, blockquote:after {
|
|||
content: "";
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-left: 40px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
sub, sup {
|
||||
font-size: .83em;
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
sub {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style-type: bullet;
|
||||
}
|
||||
|
||||
ol li {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
/* ---------------------- index template -------------------------- */
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ adduser.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
adduser.o: ../core/lastcontainer.h ../templates/misc.h ../core/mounts.h
|
||||
adduser.o: ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
adduser.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
adduser.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
adduser.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
adduser.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
adduser.o: ../core/system.h ../core/htmlfilter.h ../core/request.h
|
||||
changepatterns.o: changepatterns.h patterns.h locale.h ../core/confparser.h
|
||||
|
@ -56,7 +56,7 @@ config.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
config.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
config.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
config.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
config.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
config.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
config.o: ../core/basethread.h ../core/threadmanager.h
|
||||
config.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
config.o: ../core/system.h ../core/htmlfilter.h
|
||||
|
@ -82,7 +82,7 @@ dir.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
dir.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
dir.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
dir.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
dir.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
dir.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
dir.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
dir.o: ../core/htmlfilter.h ../core/misc.h ../functions/functions.h
|
||||
dir.o: ../functions/functionbase.h ../core/request.h ../core/synchro.h
|
||||
|
@ -120,7 +120,7 @@ doc.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
doc.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
doc.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
doc.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
doc.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
doc.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
doc.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
doc.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
filters.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -147,7 +147,7 @@ filters.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
filters.o: ../core/lastcontainer.h ../templates/misc.h ../core/mounts.h
|
||||
filters.o: ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
filters.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
filters.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
filters.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
filters.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
filters.o: ../core/system.h ../core/htmlfilter.h ../core/misc.h
|
||||
htmltextstream.o: htmltextstream.h ../core/textstream.h misc.h localefilter.h
|
||||
|
@ -187,7 +187,7 @@ insert.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
insert.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
insert.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
insert.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
insert.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
insert.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
insert.o: ../core/basethread.h ../core/threadmanager.h
|
||||
insert.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
insert.o: ../core/system.h ../core/htmlfilter.h ../core/request.h
|
||||
|
@ -214,7 +214,7 @@ item.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
item.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
item.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
item.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
item.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
item.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
item.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
item.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
item.o: ../core/bbcodeparser.h
|
||||
|
@ -240,7 +240,7 @@ last.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
last.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
last.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
last.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
last.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
last.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
last.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
last.o: ../core/htmlfilter.h ../core/lastcontainer.h ../core/request.h
|
||||
last.o: ../core/misc.h
|
||||
|
@ -275,7 +275,7 @@ login.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
login.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
login.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
login.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
login.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
login.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
login.o: ../core/basethread.h ../core/threadmanager.h
|
||||
login.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
login.o: ../core/htmlfilter.h
|
||||
|
@ -301,7 +301,7 @@ ls.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
ls.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
ls.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
ls.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
ls.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
ls.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
ls.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
ls.o: ../core/htmlfilter.h ../core/request.h
|
||||
misc.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -326,7 +326,7 @@ misc.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
misc.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
misc.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
misc.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
misc.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
misc.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
misc.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
misc.o: ../core/htmlfilter.h ../core/misc.h ../core/request.h
|
||||
mount.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -351,7 +351,7 @@ mount.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
mount.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
mount.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
mount.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
mount.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
mount.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
mount.o: ../core/basethread.h ../core/threadmanager.h
|
||||
mount.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
mount.o: ../core/htmlfilter.h ../core/misc.h ../core/mounts.h
|
||||
|
@ -394,7 +394,7 @@ priv.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
priv.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
priv.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
priv.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
priv.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
priv.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
priv.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
priv.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
priv.o: ../functions/functions.h ../functions/functionbase.h
|
||||
|
@ -433,7 +433,7 @@ rebus.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
rebus.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
rebus.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
rebus.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
rebus.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
rebus.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
rebus.o: ../core/basethread.h ../core/threadmanager.h
|
||||
rebus.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
rebus.o: ../core/htmlfilter.h
|
||||
|
@ -459,7 +459,7 @@ slog.o: ../notify/notifythread.h ../core/basethread.h ../core/synchro.h
|
|||
slog.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
||||
slog.o: ../core/lastcontainer.h ../templates/misc.h ../core/mounts.h
|
||||
slog.o: ../core/mountparser.h ../core/crypt.h ../core/run.h ../core/users.h
|
||||
slog.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
slog.o: ../core/groups.h ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
slog.o: ../core/basethread.h ../core/threadmanager.h ../core/sessionmanager.h
|
||||
slog.o: ../core/sessioncontainer.h ../core/system.h ../core/htmlfilter.h
|
||||
stat.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -484,7 +484,7 @@ stat.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
stat.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
stat.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
stat.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
stat.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
stat.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
stat.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
stat.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
sys.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -509,7 +509,7 @@ sys.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
sys.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
sys.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
sys.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
sys.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
sys.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
sys.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
sys.o: ../core/htmlfilter.h ../core/request.h ../core/version.h
|
||||
sys.o: ../core/plugin.h ../core/pluginmsg.h ../core/sessionmanager.h
|
||||
|
@ -551,7 +551,7 @@ template.o: ../notify/templatesnotify.h ../core/users.h ../core/ugcontainer.h
|
|||
template.o: ../core/lastcontainer.h ../templates/misc.h ../core/mounts.h
|
||||
template.o: ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
template.o: ../core/users.h ../core/groups.h ../core/group.h
|
||||
template.o: ../core/loadavg.h ../core/thumb.h ../core/basethread.h
|
||||
template.o: ../core/loadavg.h ../core/image.h ../core/basethread.h
|
||||
template.o: ../core/threadmanager.h ../core/sessionmanager.h
|
||||
template.o: ../core/sessioncontainer.h ../core/system.h ../core/htmlfilter.h
|
||||
template.o: ../core/misc.h
|
||||
|
@ -580,7 +580,7 @@ templates.o: ../notify/templatesnotify.h ../core/users.h
|
|||
templates.o: ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
templates.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
templates.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
templates.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
templates.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
templates.o: ../core/basethread.h ../core/threadmanager.h
|
||||
templates.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
templates.o: ../core/system.h ../core/htmlfilter.h ../core/misc.h
|
||||
|
@ -625,7 +625,7 @@ upload.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
upload.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
upload.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
upload.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
upload.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
upload.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
upload.o: ../core/basethread.h ../core/threadmanager.h
|
||||
upload.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
upload.o: ../core/system.h ../core/htmlfilter.h
|
||||
|
@ -652,7 +652,7 @@ uptime.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
uptime.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
uptime.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
uptime.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
uptime.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
uptime.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
uptime.o: ../core/basethread.h ../core/threadmanager.h
|
||||
uptime.o: ../core/sessionmanager.h ../core/sessioncontainer.h
|
||||
uptime.o: ../core/system.h ../core/htmlfilter.h
|
||||
|
@ -678,7 +678,7 @@ user.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
user.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
user.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
user.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
user.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
user.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
user.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
user.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
who.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -703,7 +703,7 @@ who.o: ../core/synchro.h ../notify/templatesnotify.h ../core/users.h
|
|||
who.o: ../core/ugcontainer.h ../core/lastcontainer.h ../templates/misc.h
|
||||
who.o: ../core/mounts.h ../core/mountparser.h ../core/crypt.h ../core/run.h
|
||||
who.o: ../core/users.h ../core/groups.h ../core/group.h ../core/loadavg.h
|
||||
who.o: ../core/thumb.h ../core/basethread.h ../core/threadmanager.h
|
||||
who.o: ../core/image.h ../core/basethread.h ../core/threadmanager.h
|
||||
who.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
who.o: ../core/htmlfilter.h ../core/request.h ../core/misc.h
|
||||
winix.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/utf8.h
|
||||
|
@ -728,7 +728,7 @@ winix.o: ../core/basethread.h ../core/synchro.h ../notify/templatesnotify.h
|
|||
winix.o: ../core/users.h ../core/ugcontainer.h ../core/lastcontainer.h
|
||||
winix.o: ../templates/misc.h ../core/mounts.h ../core/mountparser.h
|
||||
winix.o: ../core/crypt.h ../core/run.h ../core/users.h ../core/groups.h
|
||||
winix.o: ../core/group.h ../core/loadavg.h ../core/thumb.h
|
||||
winix.o: ../core/group.h ../core/loadavg.h ../core/image.h
|
||||
winix.o: ../core/basethread.h ../core/threadmanager.h
|
||||
winix.o: ../core/sessionmanager.h ../core/sessioncontainer.h ../core/system.h
|
||||
winix.o: ../core/htmlfilter.h ../core/request.h ../core/plugin.h
|
||||
|
|
|
@ -124,6 +124,8 @@ void doc_css_tab_file(Info & i)
|
|||
|
||||
void doc_css_tab_file_is_global(Info & i)
|
||||
{
|
||||
// !! z konfiga wziasc przedrostki
|
||||
|
||||
if( doc_css_index < cur->session->last_css.size() )
|
||||
i.res = IsSubString(L"http://", cur->session->last_css[doc_css_index].c_str()) ||
|
||||
IsSubString(L"https://", cur->session->last_css[doc_css_index].c_str());
|
||||
|
|
Loading…
Reference in New Issue