aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/config.php8
-rw-r--r--inc/poche/pocheCore.php30
2 files changed, 23 insertions, 15 deletions
diff --git a/inc/config.php b/inc/config.php
index c4898cc9..b78147ab 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -10,7 +10,7 @@
10 10
11define ('POCHE_VERSION', '0.3'); 11define ('POCHE_VERSION', '0.3');
12define ('MODE_DEMO', FALSE); 12define ('MODE_DEMO', FALSE);
13define ('DEBUG_POCHE', TRUE); 13define ('DEBUG_POCHE', FALSE);
14define ('CONVERT_LINKS_FOOTNOTES', FALSE); 14define ('CONVERT_LINKS_FOOTNOTES', FALSE);
15define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); 15define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
16define ('DOWNLOAD_PICTURES', FALSE); 16define ('DOWNLOAD_PICTURES', FALSE);
@@ -21,7 +21,7 @@ define ('LOCALE', './locale');
21define ('CACHE', './cache'); 21define ('CACHE', './cache');
22define ('LANG', 'fr_FR.UTF8'); 22define ('LANG', 'fr_FR.UTF8');
23 23
24$storage_type = 'sqlite'; # sqlite or file 24$storage_type = 'sqlite'; # sqlite, file
25 25
26# /!\ Be careful if you change the lines below /!\ 26# /!\ Be careful if you change the lines below /!\
27 27
@@ -75,4 +75,6 @@ if(!$store->isInstalled())
75} 75}
76 76
77$_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin(); 77$_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin();
78$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword(); \ No newline at end of file 78$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();
79
80pocheTools::initPhp(); \ No newline at end of file
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/**