Ok, I have created a "traffic cop" perl script and added it to the TS GUI. It looks at the userid of the user logged in and determines which script to give them when they click on a link in the GUI. It works great.
Our Setup;
TS6.5 SP1
Solaris 9
ContentCenter Professional only
Here's an example:
1. the user clicks on the Interwoven link Actions->"Regenerate page"
2. though the text is the same (regenerate page) i've replaced the link with a link to my traffic cop script
3. my traffic cop script looks at their userid and determines if they get the standard interwoven "regernate page" GUI or a more powerful, custom GUI.
4. let's say they have don't have permission (determined by my script) for the custom regen GUI. So I redirect them to the interwoven regne GUI as if nothing ever happened.
5. ALAS, herein is my problem. If the user selected more than one file to regen, I can't pass it through my script and back to interwoven.
Code example of #5; (pretty straightforward)
#blah, blah, blah
use TeamSite::CGI_lite;
my $cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $vpath;
my
@varray;
# determine if the vpath is one path or an array of paths
if (!ref $cgi->{form}{'vpath'})
{
#if one path, no problem, just build string for the url as normal
$vpath = "vpath=";
$vpath .= $cgi->{form}{'vpath'};
}
else
{
# if vpath is an array, store it and build the url string according to the only syntax I know, TS5.5.2
@varray = @{$cgi->{form}{'vpath'}};
# build list of vpaths
my $i = 0;
foreach (
@varray) {
$vpath .= "path_$i=$_&";
$i++;
}
# remove the last character, '&', from the string, this is to make it fit nicely into the url below
chop($vpath);
}
1. This is what my perl scrip prints and it works great when $vpath is one path ie. "//servername/pathtofile/"
print "Location:
http://servername.com/iw-cc/command/iw.formspub.regenerate_page?$vpath&full_redirect=true&done_page=$done_page&dest.vpath-area=$destvpatharea&dest.vpath-arp=$destvpatharp\n\n";2. when the user selects more than one file, $vpath contains path_0=/path/&path_1=/path2/&,
3. I know using the path_# is the old webdeskpro snytax, but Can anyone (Interwoven??) tell me the new way to pass array contents like this????
And there you have my ultimate question:
How in the world do you pass an array of filepaths from TeamSite through a cgi script, and then back to TeamSite???