Index: trunk/phase3/includes/SearchUpdate.php |
— | — | @@ -105,11 +105,12 @@ |
106 | 106 | # Strip wiki '' and ''' |
107 | 107 | $text = preg_replace( "/''[']*/", " ", $text ); |
108 | 108 | wfProfileOut( "$fname-regexps" ); |
109 | | - |
110 | | - $sql = "REPLACE INTO $searchindex (si_page,si_title,si_text) VALUES ({$this->mId},'" . |
111 | | - $db->strencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) . "','" . |
112 | | - $db->strencode( $text ) . "')"; |
113 | | - $db->query( $sql, 'SearchUpdate::doUpdate' ); |
| 109 | + $db->replace( $searchindex, array(array('si_page')), |
| 110 | + array( |
| 111 | + 'si_page' => $this->mId, |
| 112 | + 'si_title' => $db->strencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ), |
| 113 | + 'si_text' => $db->strencode( $text ) |
| 114 | + ), 'SearchUpdate::doUpdate' ); |
114 | 115 | wfProfileOut( $fname ); |
115 | 116 | } |
116 | 117 | } |