X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDBConnRef.php;h=decd9bfa4b2dd26f24dd23df89cdf6f6be9bc757;hp=24bab7d55ab22432a8508769ee4455119de94a73;hb=14d08d1df93a9e2d98d505769be94c96b348f8c5;hpb=3365e83d960c43fc25082b2dbbdabb366beecbce diff --git a/includes/libs/rdbms/database/DBConnRef.php b/includes/libs/rdbms/database/DBConnRef.php index 24bab7d55a..decd9bfa4b 100644 --- a/includes/libs/rdbms/database/DBConnRef.php +++ b/includes/libs/rdbms/database/DBConnRef.php @@ -33,7 +33,7 @@ class DBConnRef implements IDatabase { $this->lb = $lb; if ( $conn instanceof Database ) { $this->conn = $conn; // live handle - } elseif ( count( $conn ) >= 4 && $conn[self::FLD_DOMAIN] !== false ) { + } elseif ( is_array( $conn ) && count( $conn ) >= 4 && $conn[self::FLD_DOMAIN] !== false ) { $this->params = $conn; } else { throw new InvalidArgumentException( "Missing lazy connection arguments." ); @@ -211,10 +211,6 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } - public function fieldInfo( $table, $field ) { - return $this->__call( __FUNCTION__, func_get_args() ); - } - public function affectedRows() { return $this->__call( __FUNCTION__, func_get_args() ); } @@ -231,18 +227,10 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } - public function reportConnectionError( $error = 'Unknown error' ) { - return $this->__call( __FUNCTION__, func_get_args() ); - } - public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) { return $this->__call( __FUNCTION__, func_get_args() ); } - public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) { - return $this->__call( __FUNCTION__, func_get_args() ); - } - public function freeResult( $res ) { return $this->__call( __FUNCTION__, func_get_args() ); } @@ -304,10 +292,6 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } - public function indexUnique( $table, $index ) { - return $this->__call( __FUNCTION__, func_get_args() ); - } - public function insert( $table, $a, $fname = __METHOD__, $options = [] ) { return $this->__call( __FUNCTION__, func_get_args() ); } @@ -521,11 +505,13 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } - public function cancelAtomic( $fname = __METHOD__ ) { + public function cancelAtomic( $fname = __METHOD__, AtomicSectionIdentifier $sectionId = null ) { return $this->__call( __FUNCTION__, func_get_args() ); } - public function doAtomicSection( $fname, callable $callback ) { + public function doAtomicSection( + $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE + ) { return $this->__call( __FUNCTION__, func_get_args() ); } @@ -545,10 +531,6 @@ class DBConnRef implements IDatabase { return $this->__call( __FUNCTION__, func_get_args() ); } - public function listTables( $prefix = null, $fname = __METHOD__ ) { - return $this->__call( __FUNCTION__, func_get_args() ); - } - public function timestamp( $ts = 0 ) { return $this->__call( __FUNCTION__, func_get_args() ); }