[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.348,1.349

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun Aug 1 15:16:26 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv21445/public_html

Modified Files:
	lib-common.php 
Log Message:
Don't emit the <br><br> in article.php when the story's body text is empty; set {article_url} in article.php


Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.348
retrieving revision 1.349
diff -C2 -d -r1.348 -r1.349
*** lib-common.php	1 Aug 2004 09:27:26 -0000	1.348
--- lib-common.php	1 Aug 2004 19:16:23 -0000	1.349
***************
*** 487,504 ****
  
      $recent_post_anchortag = '';
      if( $index == 'n' )
      {
          $article->set_var( 'story_title', stripslashes( $A['title'] ));
!         $article->set_var( 'story_introtext', stripslashes( $A['introtext'] )
!                 . '<br><br>' . stripslashes( $A['bodytext'] ));
      }
      else
      {
          $article->set_var( 'story_title', stripslashes( $A['title'] ));
!         $article->set_var( 'story_introtext', stripslashes( $A['introtext'] ));
  
-         $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
-                                     . $A['sid'] );
-         $article->set_var( 'article_url', $articleUrl );
          if( !empty( $A['bodytext'] ))
          {
--- 487,509 ----
  
      $recent_post_anchortag = '';
+     $introtext = stripslashes( $A['introtext'] );
      if( $index == 'n' )
      {
          $article->set_var( 'story_title', stripslashes( $A['title'] ));
!         if( empty( $A['bodytext'] ))
!         {
!             $article->set_var( 'story_introtext', $introtext );
!         }
!         else
!         {
!             $article->set_var( 'story_introtext', $introtext . '<br><br>'
!                                . stripslashes( $A['bodytext'] ));
!         }
      }
      else
      {
          $article->set_var( 'story_title', stripslashes( $A['title'] ));
!         $article->set_var( 'story_introtext', $introtext );
  
          if( !empty( $A['bodytext'] ))
          {
***************
*** 587,590 ****
--- 592,598 ----
          }
      }
+     $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
+                                 . $A['sid'] );
+     $article->set_var( 'article_url', $articleUrl );
      $article->set_var( 'recent_post_anchortag', $recent_post_anchortag );
  




More information about the geeklog-cvs mailing list