Re: pickup subdir from table and put into upload_subdir [message #1562 is a reply to message #1561] |
Fri, 22 August 2008 04:57 |
AJM
Messages: 2369 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
You are incorrect when you say that _cm_initialiseFileUpload() will be called a second time when you submit an uploaded file. It is only called when the component is first activated. When you submit a file name it is the _cm_fileUpload() method which is called.
Calling the argument "$fieldarray" should not be misleading as that is the generic name that is used for an associative array. If you automatically assume that this is the contents of $fieldarray in the calling task then your assumption is incorrect - it is only the $where string which is passed from the parent to the child task, and this string is then converted into an associative array.
Although by default the $where string which is extracted from a parent object and passed to a child object is the primary key of the parent object, it is possible to modify it at the point of extraction. For example, if the filepicker is activated from a POPUP button then $where can be set to whatever you like in the _cm_popupCall() method.
I have changed std.filepicker1.inc so that it is passed the $where string from the parent task, and this string is therefore available to be passed from the filepicker to the fileupload task. This will then be available in both the _cm_initialiseFileUpload() and _cm_fileUpload() methods.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|