mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
twig implementation
This commit is contained in:
parent
c67e13e04b
commit
8cbb2a8802
7 changed files with 86 additions and 90 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
define ('POCHE_VERSION', '0.3');
|
||||
define ('MODE_DEMO', FALSE);
|
||||
define ('DEBUG_POCHE', TRUE);
|
||||
define ('DEBUG_POCHE', FALSE);
|
||||
define ('CONVERT_LINKS_FOOTNOTES', FALSE);
|
||||
define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
|
||||
define ('DOWNLOAD_PICTURES', FALSE);
|
||||
|
@ -21,7 +21,7 @@ define ('LOCALE', './locale');
|
|||
define ('CACHE', './cache');
|
||||
define ('LANG', 'fr_FR.UTF8');
|
||||
|
||||
$storage_type = 'sqlite'; # sqlite or file
|
||||
$storage_type = 'sqlite'; # sqlite, file
|
||||
|
||||
# /!\ Be careful if you change the lines below /!\
|
||||
|
||||
|
@ -75,4 +75,6 @@ if(!$store->isInstalled())
|
|||
}
|
||||
|
||||
$_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin();
|
||||
$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();
|
||||
$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();
|
||||
|
||||
pocheTools::initPhp();
|
|
@ -134,10 +134,12 @@ function fetch_url_content($url)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
function display_view($view, $id = 0, $full_head = 'yes')
|
||||
function display_view($view, $id = 0)
|
||||
{
|
||||
global $tpl, $store;
|
||||
|
||||
$tpl_vars = array();
|
||||
|
||||
switch ($view)
|
||||
{
|
||||
case 'install':
|
||||
|
@ -186,21 +188,25 @@ function display_view($view, $id = 0, $full_head = 'yes')
|
|||
break;
|
||||
default: # home view
|
||||
$entries = $store->getEntriesByView($view);
|
||||
$tpl->assign('entries', $entries);
|
||||
$tpl_vars = array(
|
||||
'entries' => $entries,
|
||||
);
|
||||
|
||||
if ($full_head == 'yes') {
|
||||
$tpl->assign('load_all_js', 1);
|
||||
$tpl->draw('head');
|
||||
$tpl->draw('home');
|
||||
}
|
||||
// if ($full_head == 'yes') {
|
||||
// $tpl->assign('load_all_js', 1);
|
||||
// $tpl->draw('head');
|
||||
// $tpl->draw('home');
|
||||
// }
|
||||
|
||||
$tpl->draw('entries');
|
||||
if ($full_head == 'yes') {
|
||||
$tpl->draw('js');
|
||||
$tpl->draw('footer');
|
||||
}
|
||||
// $tpl->draw('entries');
|
||||
// if ($full_head == 'yes') {
|
||||
// $tpl->draw('js');
|
||||
// $tpl->draw('footer');
|
||||
// }
|
||||
break;
|
||||
}
|
||||
|
||||
return $tpl_vars;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue