diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-10 15:57:10 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-10 15:57:10 +0000 |
commit | a541e5fbfb30a9b4e1e9c73028e10660e5495a5f (patch) | |
tree | a31d2d88570f576b61c0ecfe453a6b8167d71b84 | |
parent | c5aa55b38ef944eae0b36f4354fa2e8c33fb59c9 (diff) | |
download | brdo-a541e5fbfb30a9b4e1e9c73028e10660e5495a5f.tar.gz brdo-a541e5fbfb30a9b4e1e9c73028e10660e5495a5f.tar.bz2 |
#201667 follow up by gpk: minor code comment and whitespace cleanup
-rw-r--r-- | modules/node/node.module | 8 | ||||
-rw-r--r-- | modules/node/node.pages.inc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 9ff58b0bf..ef9788600 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -235,7 +235,7 @@ function node_teaser_js(&$form, &$form_state) { } /** - * Ensure value of "teaser_include" checkbox is consistent with other form data + * Ensure value of "teaser_include" checkbox is consistent with other form data. * * This handles two situations in which an unchecked checkbox is rejected: * @@ -251,19 +251,19 @@ function node_teaser_js(&$form, &$form_state) { */ function node_teaser_include_verify(&$form, &$form_state) { $message = ''; - + // $form['#post'] is set only when the form is built for preview/submit. if (isset($form['#post']['body']) && isset($form_state['values']['teaser_include']) && !$form_state['values']['teaser_include']) { // "teaser_include" checkbox is present and unchecked. if (strpos($form_state['values']['body'], '<!--break-->') === 0) { - // Teaser is empty string + // Teaser is empty string. $message = t('You specified that the summary should not be shown when this post is displayed in full view. This setting is ignored when the summary is empty.'); } elseif (strpos($form_state['values']['body'], '<!--break-->') === FALSE) { // Teaser delimiter is not present in the body. $message = t('You specified that the summary should not be shown when this post is displayed in full view. This setting has been ignored since you have not defined a summary for the post. (To define a summary, insert the delimiter "<!--break-->" (without the quotes) in the Body of the post to indicate the end of the summary and the start of the main content.)'); } - + if (!empty($message)) { drupal_set_message($message, 'warning'); // Pass new checkbox value on to preview/submit form processing. diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index 2295aa43e..ddbf243f3 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -414,7 +414,7 @@ function node_preview($node) { */ function theme_node_preview($node) { $output = '<div class="preview">'; - + $preview_trimmed_version = FALSE; // Do we need to preview trimmed version of post as well as full version? if (isset($node->teaser) && isset($node->body)) { @@ -428,7 +428,7 @@ function theme_node_preview($node) { $preview_trimmed_version = TRUE; } } - + if ($preview_trimmed_version) { drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication.<span class="no-js"> You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.</span>')); $output .= '<h3>'. t('Preview trimmed version') .'</h3>'; |