Commit in phpslash-dev/include/modules/story on MAIN
Story.class+10-51.13 -> 1.14
Fixes bug: implements article_updatehits

phpslash-dev/include/modules/story
Story.class 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- Story.class	24 Apr 2005 14:12:46 -0000	1.13
+++ Story.class	28 Apr 2005 03:46:52 -0000	1.14
@@ -1,6 +1,6 @@
 <?php
 
-/* $Id: Story.class,v 1.13 2005/04/24 14:12:46 lems1 Exp $ */
+/* $Id: Story.class,v 1.14 2005/04/28 03:46:52 lems1 Exp $ */
 
 /* 
  * Class:   Story 
@@ -243,8 +243,8 @@
    }
   
    /* Returns the HTML for the Story */
-   function getStory($story_id, $mode, $argv_ary="", $tpl="") {
-
+   function getStory($story_id, $mode, $argv_ary="", $tpl="")
+   {
       global $relatedlinks;
 
       $default_tpl = "story.tpl";
@@ -436,9 +436,14 @@
             'TITLE'   => $ary["title"],
             'RELATED' => $related
          ));
-      }   
+      }
+      if ( $_PSL['article_updatehits'] == "true" )
+      {
+        $sql_article_update_hits = "UPDATE psl_story set hits=hits+1 where story_id=$story_id";
+        $this->db->query($sql_article_update_hits);
+      }
       return $thestory;
-   }
+   } /* end getStory() */
 
    /* flexible getStories function              
    *  pass variables inside the array
CVSspam 0.2.10