SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Steve W. <wai...@us...> - 2001年07月07日 17:34:55
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv15027
Modified Files:
	search.php 
Log Message:
Reformatted the code by hand to PEAR standards. Well, mostly by
hand. php-mode doesn't like variable assignments that span several
lines like:
 $html = "<P><B>"
 . sprintf(gettext ("Searching for \"%s\" ....."),
 htmlspecialchars($searchterm))
 . "</B></P>\n";
I have to indent this by hand.
Index: search.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/search.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** search.php	2001年02月12日 01:43:10	1.5
--- search.php	2001年07月07日 17:34:52	1.6
***************
*** 1,31 ****
 <?php
- // Title search: returns pages having a name matching the search term
- rcs_id('$Id$');
 
! if (empty($searchterm))
! $searchterm = '';		// FIXME: do something better here?
 
! fix_magic_quotes_gpc($searchterm);
 
! $html = "<P><B>"
! 	 . sprintf(gettext ("Searching for \"%s\" ....."),
! 		 htmlspecialchars($searchterm))
! 	 . "</B></P>\n";
! 
! // quote regexp chars
! $search = preg_quote($searchterm);
! 
! // search matching pages
! $query = InitTitleSearch($dbi, $searchterm);
! $found = 0;
! while ($page = TitleSearchNextMatch($dbi, $query)) {
! $found++;
! $html .= LinkExistingWikiWord($page) . "<br>\n";
! }
! 
! $html .= "<hr noshade>\n"
! 	 . sprintf(gettext ("%d pages match your query."), $found)
! 	 . "\n";
 
! echo GeneratePage('MESSAGE', $html, gettext ("Title Search Results"), 0);
 ?>
--- 1,34 ----
 <?php
 
! // Title search: returns pages having a name matching the search term
 
! rcs_id('$Id$');
 
! if (empty($searchterm))
! $searchterm = '';		// FIXME: do something better here?
 
! fix_magic_quotes_gpc($searchterm);
! 
! $html = "<P><B>"
! . sprintf(gettext ("Searching for \"%s\" ....."),
! htmlspecialchars($searchterm))
! . "</B></P>\n";
! 
! // quote regexp chars
! $search = preg_quote($searchterm);
! 
! // search matching pages
! $query = InitTitleSearch($dbi, $searchterm);
! $found = 0;
! while ($page = TitleSearchNextMatch($dbi, $query)) {
! $found++;
! $html .= LinkExistingWikiWord($page) . "<br>\n";
! }
! 
! $html .= "<hr noshade>\n"
! . sprintf(gettext ("%d pages match your query."), $found)
! . "\n";
! 
! echo GeneratePage('MESSAGE', $html, gettext ("Title Search Results"), 0);
! 
 ?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /