[geeklog-cvs] geeklog-1.3/system lib-story.php,1.1,1.2

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun Aug 22 13:53:24 EDT 2004


Update of /var/cvs/geeklog-1.3/system
In directory www:/tmp/cvs-serv22007/system

Modified Files:
	lib-story.php 
Log Message:
Changes so that the links for the What's Related block are stored in the database again, instead of having to parse the story every time it is rendered.


Index: lib-story.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/system/lib-story.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** lib-story.php	16 Aug 2004 10:44:46 -0000	1.1
--- lib-story.php	22 Aug 2004 17:53:22 -0000	1.2
***************
*** 341,345 ****
          }
  
!         $rel[] = '<a href="' . $matches[1][$i] . '">' . $matches[2][$i] . '</a>';
      }
  
--- 341,347 ----
          }
  
!         $rel[] = '<a href="' . $matches[1][$i] . '">'
!                . str_replace ("/(\015\012)|(\015)|(\012)/", '', $matches[2][$i])
!                . '</a>';
      }
  
***************
*** 359,368 ****
  */
  
! function STORY_whatsRelated( $fulltext, $uid, $tid )
  {
      global $_CONF, $_TABLES, $_USER, $LANG24;
  
!     // collect any links from the story text
!     $rel = STORY_extractLinks( $fulltext );
  
      if( !empty( $_USER['username'] ) || (( $_CONF['loginrequired'] == 0 ) &&
--- 361,373 ----
  */
  
! function STORY_whatsRelated( $related, $uid, $tid )
  {
      global $_CONF, $_TABLES, $_USER, $LANG24;
  
!     // get the links from the story text
!     $rel = explode ("\n", $related);
!     if ((sizeof ($rel) == 1) && empty ($rel[0])) {
!         $rel = array ();
!     }
  
      if( !empty( $_USER['username'] ) || (( $_CONF['loginrequired'] == 0 ) &&




More information about the geeklog-cvs mailing list