In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

View Revisions: Issue #43 All Revisions ] Back to Issue ]
Summary 0000043: SWFUploader and "Save" button.
Revision 2009-06-03 14:31:02 by alex
Additional Information This is what happens in what order:
1. OnSave event is called.
2. withing OnSave event method "kDBItem::SetFieldsFromHash" is called
3. method "kDBItem::SetFieldsFromHash" calls "kUploadFormatter::Parse" method
Last of mentioned methods actually performs file moving from temp directory to target directory.

And only after that form validation happens when "OnPreSave" event is called.

So Parse method actually doesn't know anything about validation result, because no validation happened at that moment.

Instead of actually moving files I propose to put moving operations to "<prefix_special>_pending_actions_<m_wid>" variable (it is kind of queue).

Queue processing should be made in OnSave event (when temporary tables are used) and in OnAfterItemUpdate/OnAfterItemCreate (when temporary tables are not used).

----

By no "pending_actions" variable is used only to schedule uploaded file deletion operation. This processing should be joined with file moving and centrally processed in one place.
Revision 2009-06-03 14:30:25 by alex
Additional Information This is what happens in what order:
1. OnSave event is called.
2. withing OnSave event method "kDBItem::SetFieldsFromHash" is called
3. method "kDBItem::SetFieldsFromHash" calls "kUploadFormatter::Parse" method
Last of mentioned methods actually performs file moving from temp directory to target directory.

And only after that form validation happens when "OnPreSave" event is called.

So Parse method actually doesn't know anything about validation result, because no validation happened at that moment.

Instead of actually moving files I propose to put moving operations to "<prefix_special>_pending_actions_<m_wid>" variable (it is kind of queue).

Queue processing should be made in OnSave event (when temporary tables are used) and in OnAfterItemUpdate/OnAfterItemCreate (when temporary tables are not used).

----

By no "pending_actions" variable is used only to schedule uploaded file deletion operation. This processing should be joined with file moving and centrally processed in one place.

----

Besides files, scheduled for deletion for subitems will not be deleted, because of "pending_actions" variable uses <window_id> inside it and most probably subitem edit window <window_id> will differ from main item edit <window_id>.



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker