dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Update mediawiki/mediawiki-codesniffer to 0.10.1
[lhc/web/wiklou.git]
/
includes
/
Revision.php
diff --git
a/includes/Revision.php
b/includes/Revision.php
index
b20f843
..
537b7c1
100644
(file)
--- a/
includes/Revision.php
+++ b/
includes/Revision.php
@@
-559,8
+559,6
@@
class Revision implements IDBAccessObject {
}
/**
}
/**
- * Constructor
- *
* @param object|array $row Either a database row or an array
* @throws MWException
* @access private
* @param object|array $row Either a database row or an array
* @throws MWException
* @access private
@@
-1004,7
+1002,7
@@
class Revision implements IDBAccessObject {
return RecentChange::newFromConds(
[
return RecentChange::newFromConds(
[
- 'rc_user_text' => $this->getUserText(
Revision
::RAW ),
+ 'rc_user_text' => $this->getUserText(
self
::RAW ),
'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
'rc_this_oldid' => $this->getId()
],
'rc_timestamp' => $dbr->timestamp( $this->getTimestamp() ),
'rc_this_oldid' => $this->getId()
],
@@
-1468,7
+1466,7
@@
class Revision implements IDBAccessObject {
? $this->getPreviousRevisionId( $dbw )
: $this->mParentId,
'rev_sha1' => $this->mSha1 === null
? $this->getPreviousRevisionId( $dbw )
: $this->mParentId,
'rev_sha1' => $this->mSha1 === null
- ?
Revision
::base36Sha1( $this->mText )
+ ?
self
::base36Sha1( $this->mText )
: $this->mSha1,
];
: $this->mSha1,
];
@@
-1496,7
+1494,10
@@
class Revision implements IDBAccessObject {
$dbw->insert( 'revision', $row, __METHOD__ );
$dbw->insert( 'revision', $row, __METHOD__ );
- $this->mId = $rev_id !== null ? $rev_id : $dbw->insertId();
+ if ( $this->mId === null ) {
+ // Only if nextSequenceValue() was called
+ $this->mId = $dbw->insertId();
+ }
// Assertion to try to catch T92046
if ( (int)$this->mId === 0 ) {
// Assertion to try to catch T92046
if ( (int)$this->mId === 0 ) {
@@
-1554,7
+1555,7
@@
class Revision implements IDBAccessObject {
}
}
}
}
- $content = $this->getContent(
Revision
::RAW );
+ $content = $this->getContent(
self
::RAW );
$prefixedDBkey = $title->getPrefixedDBkey();
$revId = $this->mId;
$prefixedDBkey = $title->getPrefixedDBkey();
$revId = $this->mId;