r72234 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72233‎ | r72234 | r72235 >
Date:21:54, 2 September 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fixup some method calls with missing parameters
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/maintenance/FiveUpgrade.inc (modified) (history)
  • /trunk/phase3/maintenance/orphans.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/orphans.php
@@ -106,7 +106,7 @@
107107 }
108108
109109 if ( $fix ) {
110 - $dbw->unlockTables();
 110+ $dbw->unlockTables( __METHOD__ );
111111 }
112112 }
113113
@@ -153,7 +153,7 @@
154154 }
155155
156156 if ( $fix ) {
157 - $dbw->unlockTables();
 157+ $dbw->unlockTables( __METHOD__ );
158158 }
159159 }
160160
@@ -226,7 +226,7 @@
227227 }
228228
229229 if ( $fix ) {
230 - $dbw->unlockTables();
 230+ $dbw->unlockTables( __METHOD__ );
231231 }
232232 }
233233 }
Index: trunk/phase3/maintenance/FiveUpgrade.inc
@@ -732,7 +732,7 @@
733733 $info['width'] = $image->getWidth();
734734 $info['height'] = $image->getHeight();
735735
736 - $gis = $image->getImageSize();
 736+ $gis = $image->getImageSize( $filename );
737737 if ( isset( $gis['bits'] ) ) {
738738 $info['bits'] = $gis['bits'];
739739 }
Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -137,7 +137,7 @@
138138
139139 function hasConstraint( $name ) {
140140 global $wgDBmwschema;
141 - $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" . pg_escape_string( $name ) . "' AND n.nspname = '" . pg_escape_string($wgDBmwschema) ."'";
 141+ $SQL = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n WHERE c.connamespace = n.oid AND conname = '" . pg_escape_string( null, $name ) . "' AND n.nspname = '" . pg_escape_string( null, $wgDBmwschema ) ."'";
142142 return $this->numRows($res = $this->doQuery($SQL));
143143 }
144144
@@ -1339,7 +1339,7 @@
13401340 }
13411341
13421342 function encodeBlob( $b ) {
1343 - return new Blob ( pg_escape_bytea( $b ) ) ;
 1343+ return new Blob ( pg_escape_bytea( null, $b ) ) ;
13441344 }
13451345
13461346 function decodeBlob( $b ) {
@@ -1350,7 +1350,7 @@
13511351 }
13521352
13531353 function strencode( $s ) { ## Should not be called by us
1354 - return pg_escape_string( $s );
 1354+ return pg_escape_string( null, $s );
13551355 }
13561356
13571357 function addQuotes( $s ) {
@@ -1361,7 +1361,7 @@
13621362 } else if ($s instanceof Blob) {
13631363 return "'".$s->fetch($s)."'";
13641364 }
1365 - return "'" . pg_escape_string($s) . "'";
 1365+ return "'" . pg_escape_string( null, $s ) . "'";
13661366 }
13671367
13681368 function quote_ident( $s ) {
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -892,7 +892,7 @@
893893 }
894894
895895 /** */
896 - function userNotPrivilegedMessage($errors) {
 896+ function userNotPrivilegedMessage( $errors ) {
897897 global $wgOut;
898898
899899 $wgOut->setPageTitle( wfMsg( 'permissionserrors' ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r72289Followup r72234, pass $this->mConn instead of nullreedy15:53, 3 September 2010

Comments

#Comment by Platonides (talk | contribs)   14:12, 3 September 2010

postgres calls should be using $this->mConn instead of null

Status & tagging log