[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.404,1.405
vinny at iowaoutdoors.org
vinny at iowaoutdoors.org
Sat Dec 18 01:12:45 EST 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv29075
Modified Files:
lib-common.php
Log Message:
Bug #346 Fix: Comments in threaded mode, on comments.php?mode=display page,
top level comments parent link was broken. Made several improvements to the
handling/creation of the parent link.
Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.404
retrieving revision 1.405
diff -C2 -d -r1.404 -r1.405
*** lib-common.php 16 Dec 2004 20:49:42 -0000 1.404
--- lib-common.php 18 Dec 2004 06:12:42 -0000 1.405
***************
*** 2697,2701 ****
$hidden .= '<input type="hidden" name="pid" value="' . $_REQUEST['pid'] . '">';
}
! else
{
$hidden .= '<input type="hidden" name="cid" value="' . $sid . '">';
--- 2697,2701 ----
$hidden .= '<input type="hidden" name="pid" value="' . $_REQUEST['pid'] . '">';
}
! else /* This is likely a plugin (or a mistake) */
{
$hidden .= '<input type="hidden" name="cid" value="' . $sid . '">';
***************
*** 2870,2881 ****
// for threaded mode, add a link to comment parent
! if( $mode == 'threaded' && $A['pid'] != 0 )
{
$result = DB_query( "SELECT title,pid from {$_TABLES['comments']} where cid = '{$A['pid']}'" );
$P = DB_fetchArray( $result );
! $plink = $_CONF['site_url'] . '/comment.php?mode=display&sid='
! . $A['sid'] . '&title=' . rawurlencode( $P['title'] )
! . '&type=' . $type . '&order=' . $order . '&pid='
! . $P['pid'];
$template->set_var( 'parent_link', "| <a href=\"$plink\">{$LANG01[44]}</a>");
}
--- 2870,2888 ----
// for threaded mode, add a link to comment parent
! if( $mode == 'threaded' && $A['pid'] != 0 && $indent == 0 )
{
$result = DB_query( "SELECT title,pid from {$_TABLES['comments']} where cid = '{$A['pid']}'" );
$P = DB_fetchArray( $result );
! if ($P['pid'] != 0) {
! $plink = $_CONF['site_url'] . '/comment.php?mode=display&sid='
! . $A['sid'] . '&title=' . rawurlencode( $P['title'] )
! . '&type=' . $type . '&order=' . $order . '&pid='
! . $P['pid'];
! } else {
! $plink = $_CONF['site_url'] . '/comment.php?mode=view&sid='
! . $A['sid'] . '&title=' . rawurlencode( $P['title'] )
! . '&type=' . $type . '&order=' . $order . '&cid='
! . $A['pid'] . '&format=threaded';
! }
$template->set_var( 'parent_link', "| <a href=\"$plink\">{$LANG01[44]}</a>");
}
More information about the geeklog-cvs
mailing list