? .newinfo
? cleanup_marksmarty.patch
Index: marksmarty.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/marksmarty/marksmarty.module,v
retrieving revision 1.18
diff -u -p -r1.18 marksmarty.module
--- marksmarty.module	7 Oct 2006 19:28:17 -0000	1.18
+++ marksmarty.module	19 Jan 2008 19:21:57 -0000
@@ -26,8 +26,8 @@ function marksmarty_filter($op, $delta =
 
 function marksmarty_filter_tips($delta = 0, $format = -1, $long) {
   if ($long) {
-  	$the_output = t('Quick Tips:<ul>
-  	  <li>Two or more spaces at a line\'s end = Line break</li>
+    $the_output = t('Quick Tips:<ul>
+      <li>Two or more spaces at a line\'s end = Line break</li>
       <li>Double returns = Paragraph</li>
       <li>*Single asterisks* or _single underscores_ = <em>Emphasis</em></li>
       <li>**Double** or __double__ = <strong>Strong</strong></li>
@@ -41,8 +41,8 @@ function marksmarty_filter_tips($delta =
   return $the_output;
 }
 
-function marksmarty_help($in_section = 'admin/help#marksmarty') {
-  switch ($in_section) {
+function marksmarty_help($path = 'admin/help#marksmarty', $arg) {
+  switch ($path) {
     case 'admin/settings/modules#description':
       $the_output = t('Allows content to be submitted using Markdown, a simple plain-text syntax that is transformed into valid XHTML, and/or using SmartyPants, a filter for auto-translating plain ASCII characters to Unicode characters.');
       break;
@@ -51,8 +51,9 @@ function marksmarty_help($in_section = '
       $the_output = t('<p>The Markdown with SmartyPants module allows you to enter content using <a href="http://daringfireball.net/projects/markdown">Markdown</a>, a simple plain-text syntax that is transformed into valid XHTML, and will automatically convert plain ASCII characters to their proper Unicode entities in context ("curly quotes," et al.) using <a href="http://daringfireball.net/projects/smartypants">SmartyPants</a>.</p>');
       break;
   }
-
-  return $the_output;
+  if (isset($the_output)) {
+    return $the_output;
+  }
 }
 
 /********************************************************************
@@ -60,8 +61,8 @@ function marksmarty_help($in_section = '
  ********************************************************************/
 
 function _marksmarty_process($text, $format) {
-  require_once(dirname(__FILE__) . '/markdown.php');
-  require_once(dirname(__FILE__) . '/smartypants.php');
+  require_once(dirname(__FILE__) .'/markdown.php');
+  require_once(dirname(__FILE__) .'/smartypants.php');
   if (variable_get("marksmarty_is_markdown_on_$format", 1) == 1) {
     $text = Markdown($text);
   }
@@ -74,8 +75,8 @@ function _marksmarty_process($text, $for
 }
 
 function _marksmarty_settings($format) {
-  require_once(dirname(__FILE__) . '/markdown.php');
-  require_once(dirname(__FILE__) . '/smartypants.php');
+  require_once(dirname(__FILE__) .'/markdown.php');
+  require_once(dirname(__FILE__) .'/smartypants.php');
   $form['markdown_settings'] = array(
     '#type' => 'fieldset',
     '#title' => t('Markdown with SmartyPants'),
@@ -105,10 +106,10 @@ function _marksmarty_settings($format) {
     '#options' => array(0 => t('"--" for em-dashes; no en-dash support'), 1 => t('"---" for em-dashes; "--" for en-dashes'), 2 => t('"--" for em-dashes; "---" for en-dashes')),
   );
 
-  $the_output = '<p>Markdown PHP Version: <a href="http://www.michelf.com/projects/php-markdown/">'.$GLOBALS['MarkdownPHPVersion'].'</a><br />';
-  $the_output .= 'Markdown Syntax Version: '.$GLOBALS['MarkdownSyntaxVersion'].'<br />';
-  $the_output .= 'SmartyPants PHP Version: <a href="http://www.michelf.com/projects/php-smartypants/">'.$GLOBALS['SmartyPantsPHPVersion'].'</a><br />';
-  $the_output .= 'SmartyPants Syntax Version: '.$GLOBALS['SmartyPantsSyntaxVersion'] .'</p>';
+  $the_output = '<p>Markdown PHP Version: <a href="http://www.michelf.com/projects/php-markdown/">'. $GLOBALS['MarkdownPHPVersion'] .'</a><br />';
+  $the_output .= 'Markdown Syntax Version: '. $GLOBALS['MarkdownSyntaxVersion'] .'<br />';
+  $the_output .= 'SmartyPants PHP Version: <a href="http://www.michelf.com/projects/php-smartypants/">'. $GLOBALS['SmartyPantsPHPVersion'] .'</a><br />';
+  $the_output .= 'SmartyPants Syntax Version: '. $GLOBALS['SmartyPantsSyntaxVersion'] .'</p>';
 
   $form['markdown_settings']['markdown_status'] = array(
     '#type' => 'markup',
@@ -117,5 +118,3 @@ function _marksmarty_settings($format) {
 
   return $form;
 }
-
-?>
