MediaWiki
REL1_39
HistoryBlobCurStub.php
Go to the documentation of this file.
1
<?php
28
class
HistoryBlobCurStub
{
30
public
$mCurId
;
31
35
public
function
__construct
( $curid = 0 ) {
36
$this->mCurId = $curid;
37
}
38
45
public
function
setLocation
( $id ) {
46
$this->mCurId = $id;
47
}
48
52
public
function
getText
() {
53
$dbr
=
wfGetDB
(
DB_REPLICA
);
54
$row =
$dbr
->selectRow(
'cur'
, [
'cur_text'
], [
'cur_id'
=> $this->mCurId ], __METHOD__ );
55
if
( !$row ) {
56
return
false
;
57
}
58
return
$row->cur_text;
59
}
60
}
61
62
// Blobs generated by MediaWiki < 1.5 on PHP 4 were serialized with the
63
// class name coerced to lowercase. We can improve efficiency by adding
64
// autoload entries for the lowercase variants of these classes (T166759).
65
// The code below is never executed, but it is picked up by the AutoloadGenerator
66
// parser, which scans for class_alias() calls.
67
/*
68
class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
69
*/
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition
GlobalFunctions.php:1942
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:28
HistoryBlobCurStub\$mCurId
int $mCurId
Definition
HistoryBlobCurStub.php:30
HistoryBlobCurStub\setLocation
setLocation( $id)
Sets the location (cur_id) of the main object to which this object points.
Definition
HistoryBlobCurStub.php:45
HistoryBlobCurStub\__construct
__construct( $curid=0)
Definition
HistoryBlobCurStub.php:35
HistoryBlobCurStub\getText
getText()
Definition
HistoryBlobCurStub.php:52
DB_REPLICA
const DB_REPLICA
Definition
defines.php:26
$dbr
$dbr
Definition
testCompression.php:54
includes
historyblob
HistoryBlobCurStub.php
Generated on Mon Nov 25 2024 06:55:35 for MediaWiki by
1.10.0