dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4ffac4
)
Clean up r35180: prettify some functions, break some long lines and odd constructions.
author
Brion Vibber
<brion@users.mediawiki.org>
Thu, 22 May 2008 16:47:12 +0000
(16:47 +0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Thu, 22 May 2008 16:47:12 +0000
(16:47 +0000)
includes/Revision.php
patch
|
blob
|
history
diff --git
a/includes/Revision.php
b/includes/Revision.php
index
0f8ba71
..
d043e15
100644
(file)
--- a/
includes/Revision.php
+++ b/
includes/Revision.php
@@
-406,7
+406,8
@@
class Revision {
'rev_id' => $this->mId ),
'Revision::getTitle' );
if( $row ) {
'rev_id' => $this->mId ),
'Revision::getTitle' );
if( $row ) {
- $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
+ $this->mTitle = Title::makeTitle( $row->page_namespace,
+ $row->page_title );
}
return $this->mTitle;
}
}
return $this->mTitle;
}
@@
-557,24
+558,26
@@
class Revision {
* @return Revision
*/
public function getPrevious() {
* @return Revision
*/
public function getPrevious() {
- $prev = $this->getTitle() ? $this->getTitle()->getPreviousRevisionID( $this->mId ) : null;
- if( $prev ) {
- return Revision::newFromTitle( $this->mTitle, $prev );
- } else {
- return null;
+ if( $this->getTitle() ) {
+ $prev = $this->getTitle()->getPreviousRevisionID( $this->getId() );
+ if( $prev ) {
+ return Revision::newFromTitle( $this->getTitle(), $prev );
+ }
}
}
+ return null;
}
/**
* @return Revision
*/
public function getNext() {
}
/**
* @return Revision
*/
public function getNext() {
- $next = $this->getTitle() ? $this->getTitle()->getNextRevisionID( $this->mId ) : null;
- if ( $next ) {
- return Revision::newFromTitle( $this->mTitle, $next );
- } else {
- return null;
+ if( $this->getTitle() ) {
+ $next = $this->getTitle()->getNextRevisionID( $this->getId() );
+ if ( $next ) {
+ return Revision::newFromTitle( $this->getTitle(), $next );
+ }
}
}
+ return null;
}
/**
}
/**
@@
-904,7
+907,7
@@
class Revision {
* @param integer $id
* @param integer $pageid, optional
*/
* @param integer $id
* @param integer $pageid, optional
*/
- static function getTimestampFromI
D
( $id, $pageId = 0 ) {
+ static function getTimestampFromI
d
( $id, $pageId = 0 ) {
$dbr = wfGetDB( DB_SLAVE );
$conds = array( 'rev_id' => $id );
if( $pageId ) {
$dbr = wfGetDB( DB_SLAVE );
$conds = array( 'rev_id' => $id );
if( $pageId ) {