1: <?php
2: 3: 4: 5: 6: 7:
8: class Wicked_Page_StandardHistoryPage extends Wicked_Page_StandardPage {
9:
10: 11: 12: 13: 14:
15: public $supportedModes = array(
16: Wicked::MODE_DISPLAY => true,
17: Wicked::MODE_EDIT => false,
18: Wicked::MODE_REMOVE => true,
19: Wicked::MODE_HISTORY => true,
20: Wicked::MODE_DIFF => true,
21: Wicked::MODE_LOCKING => false,
22: Wicked::MODE_UNLOCKING => false);
23:
24: 25: 26: 27: 28: 29: 30: 31: 32:
33: public function __construct($pagename, $version = null)
34: {
35: if (empty($version)) {
36: parent::__construct($pagename);
37: return;
38: }
39:
40:
41: $pages = $GLOBALS['wicked']->retrieveHistory($pagename, $version);
42:
43:
44: if (empty($pages[0])) {
45: throw new Wicked_Exception(_("History page not found"));
46: }
47:
48: $this->_page = $pages[0];
49: }
50:
51: public function isOld()
52: {
53: return true;
54: }
55:
56: public function pageUrl($linkpage = null, $actionId = null)
57: {
58: return Horde_Util::addParameter(parent::pageUrl($linkpage, $actionId), 'version', $this->version());
59: }
60:
61: }
62: