bug 14907 - DatabasePostgres::fieldType() wasn't defined, fatal errors abound.
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 24 Jul 2008 12:37:07 +0000 (12:37 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 24 Jul 2008 12:37:07 +0000 (12:37 +0000)
RELEASE-NOTES
includes/db/DatabasePostgres.php

index 7850c0f..5f831d3 100644 (file)
@@ -29,7 +29,7 @@ engine indexing on a per-article basis.
 
 === Bug fixes in 1.14 ===
 
-None yet
+* (bug 14907) DatabasePostgres::fieldType now defined.
 
 === API changes in 1.14 ===
 
index 4d14b00..065ad56 100644 (file)
@@ -1167,6 +1167,16 @@ END;
        function fieldInfo( $table, $field ) {
                return PostgresField::fromText($this, $table, $field);
        }
+       
+       /**
+        * pg_field_type() wrapper
+        */
+       function fieldType( $res, $index ) {
+               if ( $res instanceof ResultWrapper ) {
+                       $res = $res->result;
+               }
+               return pg_field_type( $res, $index );
+       }
 
        function begin( $fname = 'DatabasePostgres::begin' ) {
                $this->query( 'BEGIN', $fname );