function display_view($view, $id = 0, $full_head = 'yes')
{
- global $tpl, $store, $msg;
+ global $tpl, $store;
switch ($view)
{
+ case 'install':
+ pocheTool::logm('install mode');
+ break;
+ case 'import';
+ pocheTool::logm('import mode');
+ break;
case 'export':
$entries = $store->retrieveAll();
$tpl->assign('export', pocheTool::renderJson($entries));
break;
case 'view':
$entry = $store->retrieveOneById($id);
-
if ($entry != NULL) {
+ pocheTool::logm('view link #' . $id);
$tpl->assign('id', $entry['id']);
$tpl->assign('url', $entry['url']);
$tpl->assign('title', $entry['title']);
else {
pocheTool::logm('error in view call : entry is NULL');
}
-
- pocheTool::logm('view link #' . $id);
break;
default: # home view
$entries = $store->getEntriesByView($view);
-
$tpl->assign('entries', $entries);
if ($full_head == 'yes') {
}
$tpl->draw('entries');
-
if ($full_head == 'yes') {
$tpl->draw('js');
$tpl->draw('footer');
}
/**
- * Appel d'une action (mark as fav, archive, delete)
+ * Call action (mark as fav, archive, delete, etc.)
*/
function action_to_do($action, $url, $id = 0)
{
- global $store, $msg;
+ global $store;
switch ($action)
{