SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Steve W. <wai...@us...> - 2001年11月16日 02:42:30
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv15451
Modified Files:
 Tag: release-1_2-branch
	msql.php 
Log Message:
Fixed bug where page titles with apostrophes caused a sql error.
Index: msql.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/Attic/msql.php,v
retrieving revision 1.6.2.5
retrieving revision 1.6.2.6
diff -C2 -r1.6.2.5 -r1.6.2.6
*** msql.php	2001年11月16日 01:22:27	1.6.2.5
--- msql.php	2001年11月16日 02:42:27	1.6.2.6
***************
*** 231,238 ****
 for ($x = 0; $x < count($pagehash["content"]); $x++) {
 $line = addslashes($pagehash["content"][$x]);
 $query = "INSERT INTO $dbi[page_table] " .
 "(pagename, lineno, line) " .
! "VALUES('$pagename', $x, '$line')";
! // echo "Page line insert query: $query<br>\n";
 $retval = msql_query($query, $dbi['dbc']);
 if ($retval == false) { 
--- 231,239 ----
 for ($x = 0; $x < count($pagehash["content"]); $x++) {
 $line = addslashes($pagehash["content"][$x]);
+ $esc_pagename = addslashes($pagename);
 $query = "INSERT INTO $dbi[page_table] " .
 "(pagename, lineno, line) " .
! "VALUES('$esc_pagename', $x, '$line')";
! echo "Page line insert query: $query<br>\n";
 $retval = msql_query($query, $dbi['dbc']);
 if ($retval == false) { 
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 によって変換されたページ (->オリジナル) /