Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7319
tmp.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 11:21 PM
2014-11-21 23:21:16 (UTC+0)
Size
703 B
Referenced Files
None
Subscribers
None
tmp.diff
View Options
Index: WikiPage.php
===================================================================
--- WikiPage.php (revision 114118)
+++ WikiPage.php (working copy)
@@ -2596,10 +2596,13 @@
$insertRows = array();
foreach ( $insertCats as $cat ) {
- $insertRows[] = array(
- 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_seq' ),
- 'cat_title' => $cat
- );
+ $r = $dbw->select( 'category', 'cat_title', array( 'cat_title' => $cat ), __METHOD__ );
+ if( $r->numRows() === 0 ) {
+ $insertRows[] = array(
+ 'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_seq' ),
+ 'cat_title' => $cat
+ );
+ }
}
$dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6852
Default Alt Text
tmp.diff (703 B)
Attached To
Mode
T29283: SqlBagOStuff breaks PostgreSQL transactions
Attached
Detach File
Event Timeline
Log In to Comment