diff --git a/html/fun_export.html b/html/fun_export.html index 2e9391e..71d9779 100644 --- a/html/fun_export.html +++ b/html/fun_export.html @@ -1,16 +1,19 @@
-

Export

+

{export_header}

-

Press Export to transfer the [if item_is]file[else]directory[end] to an external ftp server

+[if item_is] +

{export_transer_file_info}

+[else] +

{export_transer_dir_info}

+[end] +
-
- - +

@@ -19,8 +22,6 @@ [end] - -
diff --git a/locale/en b/locale/en index 0b4a5fa..b7abcdd 100755 --- a/locale/en +++ b/locale/en @@ -24,6 +24,12 @@ account_already_activated = This account is already activated account_cannot_be_activated = This account cannot be activated, please contact with the system administrator account_email_sent = An email with an activation link has been sent to you +export_header = Export +export_transer_file_info = Press Export to transfer the file to an external ftp server +export_transer_dir_info = Press Export to transfer the directory to an external ftp server +export_checkbox_static_file_too = "Export static files too (images etc.)" + + code_expired = The code has expired password_cannot_be_changed = The password cannot be changed, please contact with the system administrator incorrect_change_password_code = Incorrect code for changing your password diff --git a/locale/pl b/locale/pl index b120f49..68f587c 100755 --- a/locale/pl +++ b/locale/pl @@ -26,6 +26,13 @@ account_already_activated = To konto jest już aktywowane account_cannot_be_activated = To konto nie może być aktywowane, proszę skontaktować się z administratorem account_email_sent = Wysłaliśmy Tobie email z linkiem aktywacyjnym + +export_header = Export +export_transer_file_info = Wciśnij przycisk Export aby wysłać ten plik na zewnętrzny serwer ftp +export_transer_dir_info = Wciśnij przycisk Export aby wysłać podany katalog na zewnętrzny serwer ftp +export_checkbox_static_file_too = "Wyślij także pliki statyczne (zdjęcia itp.)" + + code_expired = Ten kod stracił już swoją ważność password_cannot_be_changed = Niestety nie możemy zmienić hasła dla tego konta, proszę skontaktować się z administratorem incorrect_change_password_code = Nieprawidłowy kod do zmiany hasła diff --git a/plugins/export/funexport.cpp b/plugins/export/funexport.cpp index a95ea1d..167e5ae 100755 --- a/plugins/export/funexport.cpp +++ b/plugins/export/funexport.cpp @@ -2,7 +2,7 @@ * This file is a part of Winix * and is not publicly distributed * - * Copyright (c) 2012, Tomasz Sowa + * Copyright (c) 2012-2013, Tomasz Sowa * All rights reserved. * */ @@ -31,8 +31,9 @@ void FunExport::SetExportInfo(ExportInfo * pexport_info) bool FunExport::HasAccess() { - // temporarily only the root can use this function - return cur->session->puser && cur->session->puser->super_user; + // temporarily only a logged user can use this function + // !! IMPROVEME we have to change to only some users can use this function in a specified directory + return cur->session->puser; } @@ -52,7 +53,7 @@ void FunExport::ExportFile(const Item & item) } -void FunExport::ExportDir(const Item & dir, bool only_non_static_files) +void FunExport::ExportDir(const Item & dir, bool static_files_too) { export_info->SendDir(dir); @@ -65,7 +66,7 @@ void FunExport::ExportDir(const Item & dir, bool only_non_static_files) iq_dir.WhereParentId(dir.id); iq_dir.WhereType(Item::file); - if( only_non_static_files ) + if( !static_files_too ) iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE); db->GetItems(dir_items, iq_dir); @@ -81,7 +82,7 @@ void FunExport::ExportDir(const Item & dir, bool only_non_static_files) for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) ) { - ExportDir(*i->second, only_non_static_files); + ExportDir(*i->second, static_files_too); } } @@ -89,12 +90,12 @@ void FunExport::ExportDir(const Item & dir, bool only_non_static_files) void FunExport::Export() { export_info->ResetRecurrenceCheck(); - bool onlynonstatic = cur->request->IsPostVar(L"onlynonstatic"); + bool static_files_too = cur->request->IsPostVar(L"staticfilestoo"); if( cur->request->is_item ) ExportFile(cur->request->item); else - ExportDir(*cur->request->dir_tab.back(), onlynonstatic); + ExportDir(*cur->request->dir_tab.back(), static_files_too); } diff --git a/plugins/export/funexport.h b/plugins/export/funexport.h index 9d2e809..a5d2011 100755 --- a/plugins/export/funexport.h +++ b/plugins/export/funexport.h @@ -2,7 +2,7 @@ * This file is a part of Winix * and is not publicly distributed * - * Copyright (c) 2012, Tomasz Sowa + * Copyright (c) 2012-2013, Tomasz Sowa * All rights reserved. * */ @@ -33,7 +33,7 @@ public: void ExportFile(const Item & item); - void ExportDir(const Item & dir, bool only_non_static_files = false); + void ExportDir(const Item & dir, bool static_files_too = false); private: