[geeklog-cvs] geeklog-1.3/public_html comment.php,1.44.2.2,1.44.2.3
dhaun at geeklog.net
dhaun at geeklog.net
Sun Jan 18 14:59:11 EST 2004
Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv3601
Modified Files:
Tag: geeklog_1_3_8_1_1
comment.php
Log Message:
Don't let user browse comments when s/he doesn't have access to the story.
Index: comment.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.44.2.2
retrieving revision 1.44.2.3
diff -C2 -d -r1.44.2.2 -r1.44.2.3
*** comment.php 7 Dec 2003 10:02:53 -0000 1.44.2.2
--- comment.php 18 Jan 2004 19:59:09 -0000 1.44.2.3
***************
*** 375,381 ****
break;
case 'display':
! $display .= COM_siteHeader()
! . COM_userComments($sid,$title,$type,$order,'threaded',$pid)
! . COM_siteFooter();
break;
default:
--- 375,399 ----
break;
case 'display':
! if (!empty ($sid) && !empty ($type)) {
! $allowed = 1;
! if ($type == 'article') {
! $result = DB_query ("SELECT COUNT(*) AS count FROM {$_TABLES['stories']} WHERE (sid = '$sid') AND (draft_flag = 0) AND (date <= NOW())" . COM_getPermSQL ('AND'));
! $A = DB_fetchArray ($result);
! $allowed = $A['count'];
! } else if ($type == 'poll') {
! $result = DB_query ("SELECT COUNT(*) AS count FROM {$_TABLES['pollquestions']} WHERE (qid = '$sid')" . COM_getPermSQL ('AND'));
! $A = DB_fetchArray ($result);
! $allowed = $A['count'];
! }
! if ($allowed == 1) {
! $display .= COM_siteHeader()
! . COM_userComments($sid,$title,$type,$order,'threaded',$pid)
! . COM_siteFooter();
! } else {
! $display .= COM_refresh($_CONF['site_url'] . '/index.php');
! }
! } else {
! $display .= COM_refresh($_CONF['site_url'] . '/index.php');
! }
break;
default:
More information about the geeklog-cvs
mailing list