This file is indexed.

/usr/share/mediawiki-extensions/openid/DatabaseConnection.php is in mediawiki-extensions-openid 3.6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php

require_once( 'Auth/OpenID/DatabaseConnection.php' );

class MediaWikiOpenIDDatabaseConnection extends Auth_OpenID_DatabaseConnection {

	function __construct( $db ) {
		$this->db = $db;
	}

	function autoCommit( $mode ) {
		$old = $this->db->getFlag( DBO_TRX );
		if ( $mode ) {
			$this->db->setFlag( DBO_TRX );
		} else {
			$this->db->clearFlag( DBO_TRX );
		}
		return $old;
	}

	function query( $sql, $params = array() ) {
		return $this->db->safeQuery( $sql, $params );
	}

	function begin() {
		$this->db->begin();
	}

	function commit() {
		$this->db->commit();
	}

	function rollback() {
		$this->db->rollback();
	}

	function getOne( $sql, $params = array() ) {
		$res = $this->query( $sql, $params );

		if ( !$res instanceof ResultWrapper )
			return $res;
		if ( !$res->numRows() )
			return false;

		$row = $res->fetchRow();
		if ( $row !== false ) {
			$res->free();
			return reset( $row );
		} else {
			return false;
		}
	}

	function getRow( $sql, $params = array() ) {
		$res = $this->query( $sql, $params );

		if ( !$res instanceof ResultWrapper )
			return $res;
		if ( !$res->numRows() )
			return false;

		$row = $res->fetchRow();
		$res->free();
		return $row;
	}

	function getAll( $sql, $params = array() ) {
		$res = $this->query( $sql, $params );

		if ( !$res instanceof ResultWrapper )
			return $res;
		if ( !$res->numRows() )
			return false;

		$ret = array();
		foreach ( $res as $row ) {
			$ret[] = (array)$row;
		}
		return $ret;
	}
}