I was just looking at the print_page() function and just saw something I thought was wrong. Haven't bothered loading it up to check it yet, but the "and" should be an "or" shouldn't it?
It probably won't make a difference, because most of the time if one fails the other will to - but why use "and" when either problem would cause the script to stop working?
if (!file_exists("$admin_root_path/templates/${template_set}") and !is_dir("$admin_root_path/templates/${template_set}")) {
die("No such template set: $template_set");
}
should be
if (!file_exists("$admin_root_path/templates/${template_set}") or !is_dir("$admin_root_path/templates/${template_set}")) {
die("No such template set: $template_set");
}Cheers,
Michael Bray
It probably won't make a difference, because most of the time if one fails the other will to - but why use "and" when either problem would cause the script to stop working?
Code:
# Check to see if the template set exists. if (!file_exists("$admin_root_path/templates/${template_set}") and !is_dir("$admin_root_path/templates/${template_set}")) {
die("No such template set: $template_set");
}
should be
Code:
# Check to see if the template set exists. if (!file_exists("$admin_root_path/templates/${template_set}") or !is_dir("$admin_root_path/templates/${template_set}")) {
die("No such template set: $template_set");
}
Michael Bray