[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.393,1.394 comment.php,1.80,1.81

vinny at iowaoutdoors.org vinny at iowaoutdoors.org
Mon Oct 25 22:03:16 EDT 2004


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

Modified Files:
	lib-common.php comment.php 
Log Message:
Hopefully fixed problems with plugins using comments.  UNTESTED.


Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** comment.php	23 Oct 2004 10:25:51 -0000	1.80
--- comment.php	26 Oct 2004 02:03:13 -0000	1.81
***************
*** 880,889 ****
          // This could still be a plugin wanting comments
          if (isset ($HTTP_POST_VARS['cid'])) {
!             $cid = COM_applyFilter ($HTTP_POST_VARS['cid'], true);
          } else {
!             $cid = COM_applyFilter ($HTTP_GET_VARS['cid'], true);
          }
          if (!empty ($type) && !empty ($cid)) {
!             $display .= PLG_callCommentForm ($type, $cid);
          } else {
              // must be a mistake at this point
--- 880,895 ----
          // This could still be a plugin wanting comments
          if (isset ($HTTP_POST_VARS['cid'])) {
!             $cid = COM_applyFilter ($HTTP_POST_VARS['cid']);
!             $format = COM_applyFilter ($HTTP_POST_VARS['cid']);
!             $order = COM_applyFilter ($HTTP_POST_VARS['cid']);
!             $reply = COM_applyFilter ($HTTP_POST_VARS['reply']);
          } else {
!             $cid = COM_applyFilter ($HTTP_GET_VARS['cid']);
!             $format = COM_applyFilter ($HTTP_POST_VARS['format']);
!             $order = COM_applyFilter ($HTTP_POST_VARS['order']);
!             $reply = COM_applyFilter ($HTTP_POST_VARS['reply']);
          }
          if (!empty ($type) && !empty ($cid)) {
!             $display .= PLG_callCommentForm ($type, $cid, $format, $order, $reply);
          } else {
              // must be a mistake at this point

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.393
retrieving revision 1.394
diff -C2 -d -r1.393 -r1.394
*** lib-common.php	25 Oct 2004 08:04:19 -0000	1.393
--- lib-common.php	26 Oct 2004 02:03:13 -0000	1.394
***************
*** 67,71 ****
  * i.e. the path should end in .../config.php
  */
- 
  require_once( '/path/to/geeklog/config.php' );
  
--- 67,70 ----
***************
*** 2622,2626 ****
                  . "/pollbooth.php?scale=400&qid=$sid&aid=-1" );
      }
!     else
      {
          $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
--- 2621,2625 ----
                  . "/pollbooth.php?scale=400&qid=$sid&aid=-1" );
      }
!     else if ( $type == 'article' )
      {
          $articleUrl = COM_buildUrl( $_CONF['site_url'] . '/article.php?story='
***************
*** 2629,2632 ****
--- 2628,2636 ----
          $commentbar->set_var( 'article_url', $articleUrl );
      }
+     else
+     {
+         $commentbar->set_var( 'story_link', $_CONF['site_url']
+                 . "/comment.php?type=$type&cid=$sid" );
+     }
  
      if( $_USER['uid'] > 1)
***************
*** 2677,2680 ****
--- 2681,2688 ----
              $hidden .= '<input type="hidden" name="pid" value="' . $_REQUEST['pid'] . '">';
          }
+         else 
+         {
+             $hidden .= '<input type="hidden" name="cid" value="' . $sid . '">';
+         }
          $commentbar->set_var( 'hidden_field', $hidden . 
                  '<input type="hidden" name="mode" value="' . $_REQUEST['mode'] . '">' );




More information about the geeklog-cvs mailing list