aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/pocheCore.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:25:11 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:25:11 +0200
commit8cbb2a88024969f7efd90f8053f3b0805fa2f8fa (patch)
tree0bb5c7fb3adc752d9ea9a933b524bd08631ca11a /inc/poche/pocheCore.php
parentc67e13e04baab64bcc63fd0dca46125513250c44 (diff)
downloadwallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.tar.gz
wallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.tar.zst
wallabag-8cbb2a88024969f7efd90f8053f3b0805fa2f8fa.zip
twig implementation
Diffstat (limited to 'inc/poche/pocheCore.php')
-rw-r--r--inc/poche/pocheCore.php30
1 files changed, 18 insertions, 12 deletions
diff --git a/inc/poche/pocheCore.php b/inc/poche/pocheCore.php
index e68696af..3e32c4a8 100644
--- a/inc/poche/pocheCore.php
+++ b/inc/poche/pocheCore.php
@@ -134,10 +134,12 @@ function fetch_url_content($url)
134 return FALSE; 134 return FALSE;
135} 135}
136 136
137function display_view($view, $id = 0, $full_head = 'yes') 137function display_view($view, $id = 0)
138{ 138{
139 global $tpl, $store; 139 global $tpl, $store;
140 140
141 $tpl_vars = array();
142
141 switch ($view) 143 switch ($view)
142 { 144 {
143 case 'install': 145 case 'install':
@@ -186,21 +188,25 @@ function display_view($view, $id = 0, $full_head = 'yes')
186 break; 188 break;
187 default: # home view 189 default: # home view
188 $entries = $store->getEntriesByView($view); 190 $entries = $store->getEntriesByView($view);
189 $tpl->assign('entries', $entries); 191 $tpl_vars = array(
192 'entries' => $entries,
193 );
190 194
191 if ($full_head == 'yes') { 195 // if ($full_head == 'yes') {
192 $tpl->assign('load_all_js', 1); 196 // $tpl->assign('load_all_js', 1);
193 $tpl->draw('head'); 197 // $tpl->draw('head');
194 $tpl->draw('home'); 198 // $tpl->draw('home');
195 } 199 // }
196 200
197 $tpl->draw('entries'); 201 // $tpl->draw('entries');
198 if ($full_head == 'yes') { 202 // if ($full_head == 'yes') {
199 $tpl->draw('js'); 203 // $tpl->draw('js');
200 $tpl->draw('footer'); 204 // $tpl->draw('footer');
201 } 205 // }
202 break; 206 break;
203 } 207 }
208
209 return $tpl_vars;
204} 210}
205 211
206/** 212/**