// getTextIdFromAddress() is free to insert something into the text table, so $textId
// may be a new value, not anything already contained in $blobAddress.
- $blobAddress = 'tt:' . $textId;
+ $blobAddress = SqlBlobStore::makeAddressFromTextId( $textId );
$comment = $this->failOnNull( $rev->getComment( RevisionRecord::RAW ), 'comment' );
$user = $this->failOnNull( $rev->getUser( RevisionRecord::RAW ), 'user' );
*/
public function getRcIdIfUnpatrolled( RevisionRecord $rev ) {
$rc = $this->getRecentChange( $rev );
- if ( $rc && $rc->getAttribute( 'rc_patrolled' ) == 0 ) {
+ if ( $rc && $rc->getAttribute( 'rc_patrolled' ) == RecentChange::PRC_UNPATROLLED ) {
return $rc->getAttribute( 'rc_id' );
} else {
return 0;
if ( isset( $row->rev_text_id ) && $row->rev_text_id > 0 ) {
$mainSlotRow->slot_content_id = $row->rev_text_id;
- $mainSlotRow->content_address = 'tt:' . $row->rev_text_id;
+ $mainSlotRow->content_address = SqlBlobStore::makeAddressFromTextId(
+ $row->rev_text_id
+ );
}
// This is used by null-revisions
? intval( $row['slot_origin'] )
: null;
$mainSlotRow->content_address = isset( $row['text_id'] )
- ? 'tt:' . intval( $row['text_id'] )
+ ? SqlBlobStore::makeAddressFromTextId( intval( $row['text_id'] ) )
: null;
$mainSlotRow->content_size = isset( $row['len'] ) ? intval( $row['len'] ) : null;
$mainSlotRow->content_sha1 = isset( $row['sha1'] ) ? strval( $row['sha1'] ) : null;