Index: trunk/phpwiki/fpw/wikiPage.php |
— | — | @@ -200,22 +200,23 @@ |
201 | 201 | $connection = getDBconnection () ; |
202 | 202 | $sql = "INSERT INTO cur (cur_title, cur_ind_title) |
203 | 203 | VALUES (\"$this->secureTitle\", REPLACE(\"$this->secureTitle\",'_',' '))" ; |
204 | | - mysql_query ( $sql , $connection ) ; |
| 204 | + if ( mysql_query ( $sql , $connection ) == 0 ) echo mysql_error () ; |
205 | 205 | # since the page now exists we move all links in the table unlinked to the table linked |
206 | 206 | $sql = "INSERT INTO linked ( linked_from, linked_to ) |
207 | 207 | SELECT unlinked_from, unlinked_to |
208 | 208 | FROM unlinked |
209 | 209 | WHERE unlinked_to = \"$this->secureTitle\"" ; |
210 | | - mysql_query ( $sql , $connection ) ; |
| 210 | + if ( mysql_query ( $sql , $connection ) == 0 ) echo mysql_error () ; |
211 | 211 | $sql = "DELETE FROM unlinked WHERE unlinked_to = \"$this->secureTitle\"" ; |
212 | | - mysql_query ( $sql , $connection ) ; |
| 212 | + if ( mysql_query ( $sql , $connection ) == 0 ) echo mysql_error () ; |
213 | 213 | # Flushing cache for all pages that linked to the empty topic |
214 | 214 | if ( $useCachedPages ) { |
215 | 215 | $sql1 = "SELECT DISTINCT linked_from FROM linked WHERE linked_to = \"$this->secureTitle\" " ; |
216 | | - $result1 = mysql_query ( $sql , $connection ) ; |
| 216 | + $result1 = mysql_query ( $sql1 , $connection ) ; |
| 217 | + if ( $result1 == 0 ) echo mysql_error () ; |
217 | 218 | while ( $s1 = mysql_fetch_object ( $result1 ) ) { |
218 | | - $sql2 = "UPDATE cur SET cur_cache=\"\", cur_timestamp=cur_timestamp WHERE cur_title = \"%$s1->linked_from\" " ; |
219 | | - mysql_query ( $sql2 , $connection ) ; |
| 219 | + $sql2 = "UPDATE cur SET cur_cache=\"\", cur_timestamp=cur_timestamp WHERE cur_title = \"$s1->linked_from\" " ; |
| 220 | + if ( mysql_query ( $sql2 , $connection ) == 0 ) echo mysql_error () ; |
220 | 221 | } |
221 | 222 | mysql_free_result ( $result1 ); |
222 | 223 | } |