From: jenkins-bot Date: Mon, 19 Sep 2016 19:31:44 +0000 (+0000) Subject: Merge "Avoid using cascadingDeletes()/cleanupTriggers()" X-Git-Tag: 1.31.0-rc.0~5476 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=93845ed2ad47e13bf88d33893ceb547bc724b3b6;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Avoid using cascadingDeletes()/cleanupTriggers()" --- 93845ed2ad47e13bf88d33893ceb547bc724b3b6 diff --combined includes/changes/RecentChange.php index ac5824bbc8,306ea06e9f..794865e439 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@@ -297,8 -297,7 +297,8 @@@ class RecentChange } # If our database is strict about IP addresses, use NULL instead of an empty string - if ( $dbw->strictIPs() && $this->mAttribs['rc_ip'] == '' ) { + $strictIPs = in_array( $dbw->getType(), [ 'oracle', 'postgres' ] ); // legacy + if ( $strictIPs && $this->mAttribs['rc_ip'] == '' ) { unset( $this->mAttribs['rc_ip'] ); } @@@ -313,7 -312,7 +313,7 @@@ $this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' ); # # If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL - if ( $dbw->cascadingDeletes() && $this->mAttribs['rc_cur_id'] == 0 ) { + if ( $this->mAttribs['rc_cur_id'] == 0 ) { unset( $this->mAttribs['rc_cur_id'] ); }