Skip to content

Commit

Permalink
Add to check if function exists too
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Feb 3, 2024
1 parent c80c295 commit aa14c77
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions find.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ while(my $f = <$FIND>) {
my $currfilename = $currfile; # Extract filename from path
$currfilename =~ s/.*\///;
foreach my $p (&virtual_server::list_feature_plugins()) {
my ($err, $status) = &virtual_server::plugin_call($p,
"feature_add_protected_dir", $d,
{ 'protected_dir' => $dir,
'protected_user_file_path' => $currfile,
'protected_user_file' => $currfilename,
'protected_name' => $text{'find_authreq'} });
$f_extra = $text{"find_webservstatus$status"} if (defined($status));
if (&virtual_server::plugin_defined($p, "feature_add_protected_dir")) {
my ($err, $status) = &virtual_server::plugin_call($p,
"feature_add_protected_dir", $d,
{ 'protected_dir' => $dir,
'protected_user_file_path' => $currfile,
'protected_user_file' => $currfilename,
'protected_name' => $text{'find_authreq'} });
$f_extra = $text{"find_webservstatus$status"} if (defined($status));
}
}
}
print $f_indent.&text("find_found$f_label", "<tt>$f_name</tt>",
Expand Down

0 comments on commit aa14c77

Please sign in to comment.