--- smarty.engine	2004-12-02 10:38:37.000000000 -0600
+++ /www/htdocs/lemonsqueeze/themes/engines/smarty/smarty.engine	2005-04-28 11:37:29.000000000 -0500
@@ -42,8 +42,8 @@
 }
 
 
-function smarty_templates($directory) {
-  $templates = file_scan_directory($directory, 'page.tpl$');
+function smarty_templates() {
+  $templates = system_listing('^page\.tpl$', 'themes', 'filename');
 
   $extra = variable_get('smarty_extra_templates', array());
   $engine_code = variable_get('smarty_extra_logic', array());
@@ -60,7 +60,7 @@
 
   variable_set('smarty_extra_templates', $extra);
   variable_set('smarty_extra_logic', $engine_code);
-  return $templates;
+  return $templates; 
 }
 
 function smarty_features() {
@@ -130,10 +130,12 @@
         }
       }
     } else {
-      $primary_links = link_page();
+      $primary_links = theme_get_setting('primary links');
     }
   }
 
+  $primary_links = theme_get_setting('primary links');
+
   if (theme_get_setting('toggle_secondary_links')) {
     $links =  explode(";", variable_get('smarty_secondary_links', '')); 
     if (is_array($links) && !empty($links[0]))  {
@@ -209,7 +211,7 @@
  */
 function smarty_node($node, $main = 0, $page = 0) {
   $taxonomy = taxonomy_link('taxonomy terms', $node);
-  $links = link_node($node, $main);
+
   $vars = array(
       'title'          => $node->title,
       'node_url'       => url('node/' . $node->nid),
@@ -219,7 +221,7 @@
       'sticky'         => $node->sticky,
       'picture'        => theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : '',
       'content'        => ($main && $node->teaser) ? $node->teaser : $node->body,
-      'links'          => ($links != '') ? theme('links', $links) : '',
+      'links'          => ($node->links != '') ? theme('links', $node->links) : '',
       'mission'        => $mission,
       'page'           => $page,
       'taxonomy'       => $taxonomy,
@@ -254,6 +256,8 @@
     'picture'   => theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : '',
     'links'     => $links,
     'content'   => $comment->comment,
+    'rating_html' => $comment->rating_html,
+    'helpful'   => $comment->helpful,
     'author'    => format_name($comment),
     'date'      => format_date($comment->timestamp)
   ));
