# Some generic checking functions are included in Bugzilla::Config
# Some generic checking functions are included in Bugzilla::Config
...
@@ -98,10 +100,10 @@ sub check_webdotbase {
...
@@ -98,10 +100,10 @@ sub check_webdotbase {
return"The file path \"$value\" is not a valid executable. Please specify the complete file path to 'dot' if you intend to generate graphs locally.";
return"The file path \"$value\" is not a valid executable. Please specify the complete file path to 'dot' if you intend to generate graphs locally.";
}
}
# Check .htaccess allows access to generated images
# Check .htaccess allows access to generated images
if(-e"data/webdot/.htaccess"){
if(-e"$webdotdir/.htaccess"){
openHTACCESS,"data/webdot/.htaccess";
openHTACCESS,"$webdotdir/.htaccess";
if(!grep(/ \\\.png\$/,<HTACCESS>)){
if(!grep(/ \\\.png\$/,<HTACCESS>)){
return"Dependency graph images are not accessible.\nAssuming that you have not modified the file, delete data/webdot/.htaccess and re-run checksetup.pl to rectify.\n";
return"Dependency graph images are not accessible.\nAssuming that you have not modified the file, delete $webdotdir/.htaccess and re-run checksetup.pl to rectify.\n";
}
}
closeHTACCESS;
closeHTACCESS;
}
}
...
@@ -155,8 +157,8 @@ sub check_languages {
...
@@ -155,8 +157,8 @@ sub check_languages {
return"You need to specify a language tag."
return"You need to specify a language tag."
}
}
foreachmy$language(@languages){
foreachmy$language(@languages){
if(!-d"template/$language/custom"
if(!-d"$templatedir/$language/custom"
&&!-d"template/$language/default"){
&&!-d"$templatedir/$language/default"){
return"The template directory for $language does not exist";
return"The template directory for $language does not exist";
}
}
}
}
...
@@ -165,7 +167,7 @@ sub check_languages {
...
@@ -165,7 +167,7 @@ sub check_languages {
sub find_languages{
sub find_languages{
my@languages=();
my@languages=();
opendir(DIR,"template")||return"Can't open 'template' directory: $!";
opendir(DIR,$templatedir)||return"Can't open 'template' directory: $!";
my@langdirs=grep{/^[a-z-]+$/i}readdir(DIR);
my@langdirs=grep{/^[a-z-]+$/i}readdir(DIR);
closedirDIR;
closedirDIR;
...
@@ -702,7 +704,7 @@ You will get this message once a day until you\'ve dealt with these bugs!
...
@@ -702,7 +704,7 @@ You will get this message once a day until you\'ve dealt with these bugs!
</ul>
</ul>
The default value is a publically-accessible webdot server. If you change
The default value is a publically-accessible webdot server. If you change
this value, make certain that the webdot server can read files from your
this value, make certain that the webdot server can read files from your
data/webdot directory. On Apache you do this by editing the .htaccess file,
webdot directory. On Apache you do this by editing the .htaccess file,
for other systems the needed measures may vary. You can run checksetup.pl
for other systems the needed measures may vary. You can run checksetup.pl
to recreate the .htaccess file if it has been lost.',
to recreate the .htaccess file if it has been lost.',