Index: branches/SCHEMA_WORK/phase3/includes/Article.php |
— | — | @@ -513,26 +513,26 @@ |
514 | 514 | * @private |
515 | 515 | */ |
516 | 516 | function loadLastEdit() { |
517 | | - $this->loadContent(); |
518 | | - return; |
519 | | - /*global $wgOut; |
520 | | - wfDebugDieBacktrace( "Shouldn't the content do this?" ); |
| 517 | + ## $this->loadContent(); |
| 518 | + ## return; |
| 519 | + global $wgOut; |
| 520 | + ## wfDebugDieBacktrace( "Shouldn't the content do this?" ); |
521 | 521 | if ( -1 != $this->mUser ) return; |
522 | 522 | |
523 | 523 | $fname = 'Article::loadLastEdit'; |
524 | 524 | |
525 | 525 | $dbr =& $this->getDB(); |
526 | | - $s = $dbr->getArray( 'cur', |
527 | | - array( 'cur_user','cur_user_text','cur_timestamp', 'cur_comment','cur_minor_edit' ), |
528 | | - array( 'cur_id' => $this->getID() ), $fname, $this->getSelectOptions() ); |
| 526 | + $s = $dbr->getArray( array( 'revision', 'page') , |
| 527 | + array( 'rev_user','rev_user_text','rev_timestamp', 'rev_comment','rev_minor_edit' ), |
| 528 | + array( 'page_id' => $this->getID(), 'page_latest=rev_id' ), $fname, $this->getSelectOptions() ); |
529 | 529 | |
530 | 530 | if ( $s !== false ) { |
531 | | - $this->mUser = $s->cur_user; |
532 | | - $this->mUserText = $s->cur_user_text; |
533 | | - $this->mTimestamp = wfTimestamp(TS_MW,$s->cur_timestamp); |
534 | | - $this->mComment = $s->cur_comment; |
535 | | - $this->mMinorEdit = $s->cur_minor_edit; |
536 | | - }*/ |
| 531 | + $this->mUser = $s->rev_user; |
| 532 | + $this->mUserText = $s->rev_user_text; |
| 533 | + $this->mTimestamp = wfTimestamp(TS_MW,$s->rev_timestamp); |
| 534 | + $this->mComment = $s->rev_comment; |
| 535 | + $this->mMinorEdit = $s->rev_minor_edit; |
| 536 | + } |
537 | 537 | } |
538 | 538 | |
539 | 539 | function getTimestamp() { |
Index: branches/SCHEMA_WORK/phase3/includes/Database.php |
— | — | @@ -536,7 +536,6 @@ |
537 | 537 | } else { |
538 | 538 | $sql = "SELECT $vars $from $useIndex $tailOpts"; |
539 | 539 | } |
540 | | - print "<pre><b>$fname</b>\n$sql</pre>"; |
541 | 540 | return $this->query( $sql, $fname ); |
542 | 541 | } |
543 | 542 | |