[ic] File Manager
Gert van der Spoel
ic at 3edge.com
Mon Oct 17 15:35:04 EDT 2005
maillists writes:
>> DebugFile /tmp/debug.log
>> Variable DEBUG 1
>>
>> in your catalog.cfg, and use this line in your usertag to report
>> a problem:
>>
>> unlink($file) or ::logDebug('cannot unlink file: ' . $!);
>> _______________________________________________
>
> Thanks That helps!
>
> Here is the debug error:
> Vend::Interpolate:debug: cannot unlink file: No such file or directory
>
> It seems to be the way that I am trying to get the "deletefile" variable
> in the tag. I'm not sure how to get the form values in the tag.
>
> Here is my form on a page called deletepage:
> ---------------------------------------------------------------------
> <A onClick="return confirm('Are you sure you want to delete the file
> [project_select-data project_upload filename] ?')"
> href="[area form=|mv_session_id=[data session id]
> mv_doit=return
> mv_action=refresh
> mv_form_profile=delete_project_file
> deletefile="__CAT_DIR__/pathtofiles/[project_select-data
> project_upload filename]"
> mv_nextpage=@@MV_PAGE@@|]
> ">delete</a>
> --------------------------------------------------------------
>
> Then my profile sends it to a special_page file:
> -----------------------------------------
> [tmp deletefile][value deletefile][/tmp]
> [delete-file]
> [bounce page=deletepage]
> ------------------------------------------
[delete-file name="[cgi deletefile]"]
[bounce page=deletepage]
> And here is my tag:
> -------------------------------------------------
> UserTag delete-file Routine <<EOR
> sub {
> my ($row) = @_;
> my $file = $row->{deletefile};
> unlink($file) or ::logDebug('cannot unlink file: ' . $!);
> }
> EOR
UserTag delete-file Order name
UserTag delete-file addAttr
UserTag delete-file Routine <<EOR
sub {
my ($name, $opt) = @_;
unlink($name) or ::logDebug('cannot unlink file: ' . $name);
}
EOR
You will probably have to filter the "" on the filename (or remove them
from your initial form line).
More information about the interchange-users
mailing list