summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprogpapa2015-03-09 13:58:02 (GMT)
committerJohnAlbin2015-03-09 13:58:02 (GMT)
commitd3527785af62c3d3ba63899e60aeb673b9675273 (patch)
treec9eb980faf44e83bfa0d7337abc8cb347ba4bd55
parentff0238837b770c298f868144a8a5d5fdbce59d2a (diff)
Issue #2333899 by progpapa: Undefined variable $preview for watermark
-rw-r--r--template.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/template.php b/template.php
index c20549b..edcb36b 100644
--- a/template.php
+++ b/template.php
@@ -306,6 +306,9 @@ function zen_preprocess_node(&$variables, $hook) {
// Add $unpublished variable.
$variables['unpublished'] = (!$variables['status']) ? TRUE : FALSE;
+ // Set preview variable to FALSE if it doesn't exist.
+ $variables['preview'] = isset($variables['preview']) ? $variables['preview'] : FALSE;
+
// Add pubdate to submitted variable.
$variables['pubdate'] = '<time pubdate datetime="' . format_date($variables['node']->created, 'custom', 'c') . '">' . $variables['date'] . '</time>';
if ($variables['display_submitted']) {