[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.203,1.204 search.php,1.49,1.50
dhaun at geeklog.net
dhaun at geeklog.net
Sat Mar 1 11:40:28 EST 2003
Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory internal.geeklog.net:/tmp/cvs-serv25007
Modified Files:
lib-common.php search.php
Log Message:
Fixed incorrect error message when following the "more by ..." links from article.php and search was blocked for anonymous users. Also changed COM_whatsRelated to not display those links in this case (bug #671000).
Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.203
retrieving revision 1.204
diff -C2 -d -r1.203 -r1.204
*** lib-common.php 24 Feb 2003 15:40:06 -0000 1.203
--- lib-common.php 1 Mar 2003 16:40:25 -0000 1.204
***************
*** 4650,4665 ****
$rel = COM_extractLinks( $fulltext );
! // add a link to "search by author"
! if( $_CONF["contributedbyline"] == 1 )
{
! $author = DB_getItem( $_TABLES['users'], 'username', "uid = $uid" );
! $rel[] = "<a href=\"{$_CONF['site_url']}/search.php?mode=search&type=stories&author=$uid\">{$LANG24[37]} $author</a>";
! }
! // add a link to "search by topic"
! $topic = DB_getItem( $_TABLES['topics'], 'topic', "tid = '$tid'" );
! $rel[] = "<a href=\"{$_CONF['site_url']}/search.php?mode=search&type=stories&topic=$tid\">{$LANG24[38]} $topic</a>";
! $related = COM_checkHTML( COM_checkWords( COM_makeList( $rel )));
return( $related );
--- 4650,4672 ----
$rel = COM_extractLinks( $fulltext );
! if( !empty( $_USER['username'] ) || (( $_CONF['loginrequired'] == 0 ) &&
! ( $_CONF['searchloginrequired'] == 0 ))) {
! // add a link to "search by author"
! if( $_CONF["contributedbyline"] == 1 )
{
! $author = DB_getItem( $_TABLES['users'], 'username', "uid = $uid" );
! $rel[] = "<a href=\"{$_CONF['site_url']}/search.php?mode=search&type=stories&author=$uid\">{$LANG24[37]} $author</a>";
! }
! // add a link to "search by topic"
! $topic = DB_getItem( $_TABLES['topics'], 'topic', "tid = '$tid'" );
! $rel[] = "<a href=\"{$_CONF['site_url']}/search.php?mode=search&type=stories&topic=$tid\">{$LANG24[38]} $topic</a>";
! }
! $related = '';
! if( sizeof( $rel ) > 0 )
! {
! $related = COM_checkHTML( COM_checkWords( COM_makeList( $rel )));
! }
return( $related );
Index: search.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/search.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** search.php 9 Feb 2003 21:27:01 -0000 1.49
--- search.php 1 Mar 2003 16:40:25 -0000 1.50
***************
*** 1100,1113 ****
$query = strip_tags ($query);
! if (!advsearchAllowed ($query)) {
! // if advanced search is not allowed for the current user
! // then just ignore the advanced options
! $type = 'all';
! unset ($datestart);
! unset ($dateend);
! unset ($author);
! unset ($topic);
}
!
// check for minimal length of the query
if ((strlen ($query) < 3) && (empty ($topic) || ($topic == '0')) &&
--- 1100,1112 ----
$query = strip_tags ($query);
! // check for an advanced search
! if (!advsearchAllowed ($query) && (($type != 'all') ||
! (isset ($datestart) && !empty ($datestart)) ||
! (isset ($dateend) && !empty ($dateend)) ||
! (isset ($author) && ($author > 0)) ||
! (isset ($topic) && !empty ($topic)))) {
! $display .= loginRequired ();
}
! else
// check for minimal length of the query
if ((strlen ($query) < 3) && (empty ($topic) || ($topic == '0')) &&
More information about the geeklog-cvs
mailing list