diff --git a/src/bootstrap.php b/src/bootstrap.php index b133619..8474106 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -54,6 +54,7 @@ case 'WikiPageNewView': case 'WikiPageEditView': case 'WikiPageHistoryView': + case 'WikiPageStatsView': case 'WikiPageMenuView': case 'WikiPageContentView': case 'PanaceaWikiView': diff --git a/src/lib/views/wiki/PanaceaWikiView.php b/src/lib/views/wiki/PanaceaWikiView.php index c8581dd..a5f7f8a 100644 --- a/src/lib/views/wiki/PanaceaWikiView.php +++ b/src/lib/views/wiki/PanaceaWikiView.php @@ -1,7 +1,7 @@ action = $action; } + public function makeWikiUserLink($user) { + if (!is_string($user)) { + throw new InvalidTypeException(1, 'string', $user); + } + + return '' . $user . ''; + } + /** * Gets meta data for this view * diff --git a/src/lib/views/wiki/WikiPageEditView.php b/src/lib/views/wiki/WikiPageEditView.php index 5c8f63a..df7da8f 100644 --- a/src/lib/views/wiki/WikiPageEditView.php +++ b/src/lib/views/wiki/WikiPageEditView.php @@ -22,6 +22,13 @@ */ class WikiPageEditView extends PanaceaWikiView { + /** + * Renders the view + * + * @author Tommy Montgomery + * @since 2008-10-18 + * @uses WikiPageObject::getRevision() + */ public function send() { ?>
Created | +stats->created; ?> by makeWikiUserLink($this->stats->creator); ?> | +
---|---|
Last change | +stats->lastUpdated; ?> by makeWikiUserLink($this->stats->lastAuthor); ?> | +
Age | +days | +
Unparsed size | +stats->size; ?> bytes | +
Revisions | +stats->numRevisions; ?> | +
Revisions/day | +stats->numRevisions / $ageInDays; ?> | +
Unique authors | +stats->numAuthors; ?> | +
Most active author(s) | ++ |
'; var_dump($diff); echo ''; exit; - $this->addView(new WikiRevisionDiffView($this->page, $diff, $this->action, 2)); } else { diff --git a/src/lib/views/wiki/WikiRevisionDiffView.php b/src/lib/views/wiki/WikiRevisionDiffView.php index 566caba..2109300 100644 --- a/src/lib/views/wiki/WikiRevisionDiffView.php +++ b/src/lib/views/wiki/WikiRevisionDiffView.php @@ -1,45 +1,45 @@ diff = $diff; }