1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8/**
9 * Class for wiki_page_changed events
10 */
11class Reports_Send_EmailBuilder_WikiPageChanged extends Reports_Send_EmailBuilder_Abstract
12{
13	public function getTitle()
14	{
15		return tr('Wiki pages updated:');
16	}
17
18	public function getOutput(array $change)
19	{
20		$base_url = $change['data']['base_url'];
21
22		$newVersion = $change['data']['oldVer'] + 1;
23
24		$output = tr(
25			"%0 edited the wikipage %1 (<a href=%2>this history</a>, <a href=%3>all history</a>)",
26			"<u>{$change['data']['editUser']}</u>",
27			"<a href=\"{$base_url}tiki-index.php?page={$change['data']['pageName']}\">{$change['data']['pageName']}</a>",
28			"\"{$base_url}tiki-pagehistory.php?page={$change['data']['pageName']}&diff_style=sidediff&compare=Compare&newver=$newVersion&oldver={$change['data']['oldVer']}\"",
29			"\"{$base_url}tiki-pagehistory.php?page={$change['data']['pageName']}&diff_style=sidediff&compare=Compare&newver=0&oldver={$change['data']['oldVer']}\""
30		);
31
32		return $output;
33	}
34}
35