MediaWiki
REL1_37
HistoryBlobCurStub.php
Go to the documentation of this file.
1
<?php
31
class
HistoryBlobCurStub
{
33
public
$mCurId
;
34
38
public
function
__construct
( $curid = 0 ) {
39
$this->mCurId = $curid;
40
}
41
48
public
function
setLocation
( $id ) {
49
$this->mCurId = $id;
50
}
51
55
public
function
getText
() {
56
$dbr
=
wfGetDB
(
DB_REPLICA
);
57
$row =
$dbr
->selectRow(
'cur'
, [
'cur_text'
], [
'cur_id'
=> $this->mCurId ], __METHOD__ );
58
if
( !$row ) {
59
return
false
;
60
}
61
return
$row->cur_text;
62
}
63
}
64
65
// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
66
// class name coerced to lowercase. We can improve efficiency by adding
67
// autoload entries for the lowercase variants of these classes (T166759).
68
// The code below is never executed, but it is picked up by the AutoloadGenerator
69
// parser, which scans for class_alias() calls.
70
/*
71
class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
72
*/
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition
GlobalFunctions.php:2225
HistoryBlobCurStub
To speed up conversion from 1.4 to 1.5 schema, text rows can refer to the leftover cur table as the b...
Definition
HistoryBlobCurStub.php:31
HistoryBlobCurStub\$mCurId
int $mCurId
Definition
HistoryBlobCurStub.php:33
HistoryBlobCurStub\setLocation
setLocation( $id)
Sets the location (cur_id) of the main object to which this object points.
Definition
HistoryBlobCurStub.php:48
HistoryBlobCurStub\__construct
__construct( $curid=0)
Definition
HistoryBlobCurStub.php:38
HistoryBlobCurStub\getText
getText()
Definition
HistoryBlobCurStub.php:55
DB_REPLICA
const DB_REPLICA
Definition
defines.php:25
$dbr
$dbr
Definition
testCompression.php:54
includes
historyblob
HistoryBlobCurStub.php
Generated on Fri Apr 5 2024 23:40:16 for MediaWiki by
1.9.8