[geeklog-cvs] geeklog-1.3/public_html comment.php,1.73,1.74 lib-common.php,1.362,1.363 stats.php,1.29,1.30 submit.php,1.74,1.75 users.php,1.85,1.86

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Mon Aug 23 08:38:54 EDT 2004


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

Modified Files:
	comment.php lib-common.php stats.php submit.php users.php 
Log Message:
Found a few more places where we did not properly use the article URL when URL rewriting is on.


Index: submit.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** submit.php	22 Aug 2004 17:53:20 -0000	1.74
--- submit.php	23 Aug 2004 12:38:50 -0000	1.75
***************
*** 396,400 ****
                  $mailbody .= "$LANG01[10] <{$_CONF['site_admin_url']}/moderation.php>\n\n";
              } else {
!                 $mailbody .= "$LANG08[33] <{$_CONF['site_url']}/article.php?story={$A['sid']}>\n\n";
              }
              $mailsubject = $_CONF['site_name'] . ' ' . $LANG29[35];
--- 396,402 ----
                  $mailbody .= "$LANG01[10] <{$_CONF['site_admin_url']}/moderation.php>\n\n";
              } else {
!                 $articleUrl = COM_buildUrl ($_CONF['site_url']
!                                         . '/article.php?story=' . $A['sid']);
!                 $mailbody .= $LANG08[33] . ' <' . $articleUrl . ">\n\n";
              }
              $mailsubject = $_CONF['site_name'] . ' ' . $LANG29[35];
***************
*** 683,687 ****
                      sendNotification ($_TABLES['stories'], $A);
                  }
!                 $retval = COM_refresh ($_CONF['site_url'] . '/article.php?story=' . $A['sid']);
              }
          } else {
--- 685,690 ----
                      sendNotification ($_TABLES['stories'], $A);
                  }
!                 $retval = COM_refresh (COM_buildUrl ($_CONF['site_url']
!                                        . '/article.php?story=' . $A['sid']));
              }
          } else {

Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** comment.php	15 Aug 2004 12:06:05 -0000	1.73
--- comment.php	23 Aug 2004 12:38:50 -0000	1.74
***************
*** 352,357 ****
              $comments = DB_count ($_TABLES['comments'], 'sid', $sid);
              DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid);
!             $retval = COM_refresh ($_CONF['site_url']
!                     . "/article.php?story=$sid");
          } else { // assume it's a comment handled by a plugin
              $cid = DB_getItem ($_TABLES['comments'], 'cid', "(type = '$type') AND (pid = '$pid') AND (sid = '$sid') AND (uid = '$uid')");
--- 352,357 ----
              $comments = DB_count ($_TABLES['comments'], 'sid', $sid);
              DB_change($_TABLES['stories'],'comments',$comments,'sid',$sid);
!             $retval = COM_refresh (COM_buildUrl ($_CONF['site_url']
!                     . "/article.php?story=$sid"));
          } else { // assume it's a comment handled by a plugin
              $cid = DB_getItem ($_TABLES['comments'], 'cid', "(type = '$type') AND (pid = '$pid') AND (sid = '$sid') AND (uid = '$uid')");
***************
*** 484,489 ****
                      DB_change ($_TABLES['stories'], 'comments', $comments,
                                 'sid', $sid);
!                     $retval .= COM_refresh ($_CONF['site_url']
!                             . '/article.php?story=' . $sid . '#comments');
                  }
              } else {
--- 484,489 ----
                      DB_change ($_TABLES['stories'], 'comments', $comments,
                                 'sid', $sid);
!                     $retval .= COM_refresh (COM_buildUrl ($_CONF['site_url']
!                             . '/article.php?story=' . $sid) . '#comments');
                  }
              } else {

Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** users.php	15 Aug 2004 12:06:07 -0000	1.85
--- users.php	23 Aug 2004 12:38:50 -0000	1.86
***************
*** 173,179 ****
              $C = DB_fetchArray($result);
              $user_templates->set_var('row_number', $i . '.');
!             $user_templates->set_var('story_begin_href', '<a href="' .
!                 $_CONF['site_url'] . '/article.php?story=' . $C['sid'] . '">');
!             $C['title'] = str_replace('$','$',$C['title']);
              $user_templates->set_var('story_title', stripslashes($C['title']));
              $user_templates->set_var('story_end_href', '</a>');
--- 173,182 ----
              $C = DB_fetchArray($result);
              $user_templates->set_var('row_number', $i . '.');
!             $articleUrl = COM_buildUrl ($_CONF['site_url']
!                                         . '/article.php?story=' . $C['sid']);
!             $user_templates->set_var ('article_url', $articleUrl);
!             $user_templates->set_var ('story_begin_href',
!                                       '<a href="' . $articleUrl . '">');
!             $C['title'] = str_replace ('$', '$', $C['title']);
              $user_templates->set_var('story_title', stripslashes($C['title']));
              $user_templates->set_var('story_end_href', '</a>');

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.362
retrieving revision 1.363
diff -C2 -d -r1.362 -r1.363
*** lib-common.php	16 Aug 2004 21:09:22 -0000	1.362
--- lib-common.php	23 Aug 2004 12:38:50 -0000	1.363
***************
*** 68,73 ****
  */
  
! //require_once( '/path/to/geeklog/config.php' );
! require_once( '/home/vmf/work/geeklog-1.3/config.php' );
  
  
--- 68,72 ----
  */
  
! require_once( '/path/to/geeklog/config.php' );
  
  
***************
*** 2491,2499 ****
      if ( $type == 'poll' )
      {
!         $commentbar->set_var( 'story_link', $_CONF['site_url'] . "/pollbooth.php?scale=400&qid=$sid&aid=-1" );
      }
      else
      {
!         $commentbar->set_var( 'story_link', $_CONF['site_url'] . "/article.php?story=$sid" );
      }
  
--- 2490,2502 ----
      if ( $type == 'poll' )
      {
!         $commentbar->set_var( 'story_link', $_CONF['site_url']
!                 . "/pollbooth.php?scale=400&qid=$sid&aid=-1" );
      }
      else
      {
!         $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
!                                     . $sid );
!         $commentbar->set_var( 'story_link', $articleUrl );
!         $commentbar->set_var( 'article_url', $articleUrl );
      }
  
***************
*** 4352,4356 ****
                      $titletouse = stripslashes( $A['title'] );
                      $urlstart = '<a href="' . COM_buildUrl( $_CONF['site_url']
!                         . '/article.php?story=' . $A['sid'] . '#comments' ) . '"';
                  }
                  else if( $A['type'] == 'poll' )
--- 4355,4359 ----
                      $titletouse = stripslashes( $A['title'] );
                      $urlstart = '<a href="' . COM_buildUrl( $_CONF['site_url']
!                         . '/article.php?story=' . $A['sid'] ) . '#comments' . '"';
                  }
                  else if( $A['type'] == 'poll' )
***************
*** 5419,5423 ****
  
  /**
! * Detect links in a plain-ascii texts and turn them into clickable links.
  * Will detect links starting with "http:", "https:", "ftp:", and "www.".
  *
--- 5422,5426 ----
  
  /**
! * Detect links in a plain-ascii text and turn them into clickable links.
  * Will detect links starting with "http:", "https:", "ftp:", and "www.".
  *
***************
*** 5465,5469 ****
  
  /**
! * Determines the difference between to dates.
  *
  * This will takes either unixtimestamps or English dates as input and will
--- 5468,5472 ----
  
  /**
! * Determines the difference between two dates.
  *
  * This will takes either unixtimestamps or English dates as input and will

Index: stats.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/stats.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** stats.php	9 Aug 2004 18:36:29 -0000	1.29
--- stats.php	23 Aug 2004 12:38:50 -0000	1.30
***************
*** 147,151 ****
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var('item_url', 'article.php?story=' . $A['sid']);
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['hits']);
--- 147,152 ----
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var ('item_url', COM_buildUrl ($_CONF['site_url']
!                                     . '/article.php?story=' . $A['sid']));
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['hits']);
***************
*** 171,175 ****
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);	
!         $stat_templates->set_var('item_url', 'article.php?story=' . $A['sid']);
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['comments']);
--- 172,177 ----
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);	
!         $stat_templates->set_var ('item_url', COM_buildUrl ($_CONF['site_url']
!                                     . '/article.php?story=' . $A['sid']));
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['comments']);
***************
*** 195,199 ****
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var('item_url', 'article.php?story=' . $A['sid']);
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['numemails']);
--- 197,202 ----
      for ($i = 0; $i < $nrows; $i++) {
          $A = DB_fetchArray($result);
!         $stat_templates->set_var ('item_url', COM_buildUrl ($_CONF['site_url']
!                                     . '/article.php?story=' . $A['sid']));
          $stat_templates->set_var('item_text', stripslashes(str_replace('$','$',$A['title'])));
          $stat_templates->set_var('item_stat', $A['numemails']);




More information about the geeklog-cvs mailing list