let findBrokenAssets.pl find and use custom assets instead of reporting them as broken. Fixes bug #11873

This commit is contained in:
Colin Kuskie 2010-09-20 09:15:07 -07:00
parent f1af76a12b
commit 2766b72d29
2 changed files with 27 additions and 0 deletions

View file

@ -9,6 +9,7 @@
- fixed #11861: addAttachment method removed from WebGUI 7 thus breaking the API
- fixed #11868: WebGUI::Session::Form::validToken throws unnecessary warnings
- fixed #11875: Error loading empty module
- fixed #11873: findBrokenAssets.pl doesn't support custom assets
7.10.0
- fixed #11812: Checking www_ajaxSave's response in the cart js, urlencoding post parameters

View file

@ -41,6 +41,14 @@ pod2usage( verbose => 1 ) if $help;
pod2usage( verbose => 2 ) if $man;
pod2usage( msg => "Must specify a config file!" ) unless $configFile;
foreach my $libDir ( readLines( "preload.custom" ) ) {
if ( !-d $libDir ) {
warn "WARNING: Not adding lib directory '$libDir' from preload.custom: Directory does not exist.\n";
next;
}
unshift @INC, $libDir;
}
my $session = start( $webguiRoot, $configFile );
sub progress {
@ -189,6 +197,24 @@ print "\n";
#----------------------------------------------------------------------------
# Your sub here
#-------------------------------------------------
sub readLines {
my $file = shift;
my @lines;
if (open(my $fh, '<', $file)) {
while (my $line = <$fh>) {
$line =~ s/#.*//;
$line =~ s/^\s+//;
$line =~ s/\s+$//;
next if !$line;
push @lines, $line;
}
close $fh;
}
return @lines;
}
#----------------------------------------------------------------------------
sub start {
my $webguiRoot = shift;