diff options
Diffstat (limited to 'application/PageBuilder.php')
-rw-r--r-- | application/PageBuilder.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/application/PageBuilder.php b/application/PageBuilder.php index 8e39455b..50e3f124 100644 --- a/application/PageBuilder.php +++ b/application/PageBuilder.php | |||
@@ -22,15 +22,22 @@ class PageBuilder | |||
22 | protected $conf; | 22 | protected $conf; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * @var LinkDB $linkDB instance. | ||
26 | */ | ||
27 | protected $linkDB; | ||
28 | |||
29 | /** | ||
25 | * PageBuilder constructor. | 30 | * PageBuilder constructor. |
26 | * $tpl is initialized at false for lazy loading. | 31 | * $tpl is initialized at false for lazy loading. |
27 | * | 32 | * |
28 | * @param ConfigManager $conf Configuration Manager instance (reference). | 33 | * @param ConfigManager $conf Configuration Manager instance (reference). |
34 | * @param LinkDB $linkDB instance. | ||
29 | */ | 35 | */ |
30 | public function __construct(&$conf) | 36 | public function __construct(&$conf, $linkDB = null) |
31 | { | 37 | { |
32 | $this->tpl = false; | 38 | $this->tpl = false; |
33 | $this->conf = $conf; | 39 | $this->conf = $conf; |
40 | $this->linkDB = $linkDB; | ||
34 | } | 41 | } |
35 | 42 | ||
36 | /** | 43 | /** |
@@ -81,6 +88,9 @@ class PageBuilder | |||
81 | $this->tpl->assign('feed_type', $this->conf->get('feed.show_atom', true) !== false ? 'atom' : 'rss'); | 88 | $this->tpl->assign('feed_type', $this->conf->get('feed.show_atom', true) !== false ? 'atom' : 'rss'); |
82 | $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false)); | 89 | $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false)); |
83 | $this->tpl->assign('token', getToken($this->conf)); | 90 | $this->tpl->assign('token', getToken($this->conf)); |
91 | if ($this->linkDB !== null) { | ||
92 | $this->tpl->assign('tags', $this->linkDB->allTags()); | ||
93 | } | ||
84 | // To be removed with a proper theme configuration. | 94 | // To be removed with a proper theme configuration. |
85 | $this->tpl->assign('conf', $this->conf); | 95 | $this->tpl->assign('conf', $this->conf); |
86 | } | 96 | } |