summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2010-07-16 20:23:37 (GMT)
committer Joao Ventura2010-07-16 20:23:37 (GMT)
commitf1d1524ff3b3f279afdf9386248721fbc3e62d15 (patch)
tree0500a0f233773e595da3ace83b0deb2f7cc39a6a
parentdf30ddfec1f502e4d9541bb052d312c416ce2ef4 (diff)
Fix #771300: warn the site admin if dompdf's lib/fonts is not writable
-rw-r--r--INSTALL.txt3
-rw-r--r--README.txt2
-rw-r--r--print_pdf/print_pdf.module13
3 files changed, 15 insertions, 3 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 6d5e512..afe9ea4 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -5,8 +5,7 @@ Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
directory (usually sites/all/modules, see http://drupal.org/node/176044 for
more information).
-Enable the print module: Administer > Site building > Modules
- (admin/build/modules)
+Enable the print module: Administer > Modules (admin/modules)
PDF TOOL
--------
diff --git a/README.txt b/README.txt
index cbc1a85..1ed90c3 100644
--- a/README.txt
+++ b/README.txt
@@ -24,7 +24,7 @@ CONFIGURATION
- There are several settings that can be configured in the following places:
- Administer > Site building > Modules (admin/build/modules)
+ Administer > Modules (admin/modules)
Enable or disable the module. (default: disabled)
Administer > People > Permissions (admin/people/permissions)
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index be38975..6903af0 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -173,6 +173,19 @@ function print_pdf_requirements($phase) {
'severity' => REQUIREMENT_ERROR,
);
}
+ else {
+ if (basename($print_pdf_pdf_tool) == 'dompdf_config.inc.php') {
+ $directory = dirname($print_pdf_pdf_tool) .'/lib/fonts';
+ if (!is_dir($directory) || !is_writable($directory)) {
+ $requirements['print_pdf_tool'] = array(
+ 'title' => $t('DOMPDF font cache directory'),
+ 'value' => $t('Non-writable permissions'),
+ 'description' => $t('You must change the %fontdir permissions to be writable, as dompdf requires write-access to that directory.', array('%fontdir' => $directory)),
+ 'severity' => REQUIREMENT_ERROR,
+ );
+ }
+ }
+ }
break;
}
return $requirements;