$dayDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $day.'_000000');
$data = array(
'linksToDisplay' => $linksToDisplay,
- 'linkcount' => count($LINKSDB),
'cols' => $columns,
'day' => $dayDate->getTimestamp(),
'previousday' => $previousday,
}
$PAGE = new PageBuilder();
+ $PAGE->assign('linkcount', count($LINKSDB));
+ $PAGE->assign('privateLinkcount', count_private($LINKSDB));
// Determine which page will be rendered.
$query = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : '';
}
$data = array(
- 'linkcount' => count($LINKSDB),
'linksToDisplay' => $linksToDisplay,
);
$pluginManager->executeHooks('render_picwall', $data, array('loggedin' => isLoggedIn()));
}
$data = array(
- 'linkcount' => count($LINKSDB),
'tags' => $tagList,
);
$pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn()));
if ($targetPage == Router::$PAGE_TOOLS)
{
$data = array(
- 'linkcount' => count($LINKSDB),
'pageabsaddr' => index_url($_SERVER),
);
$pluginManager->executeHooks('render_tools', $data);
}
else // show the change password form.
{
- $PAGE->assign('linkcount',count($LINKSDB));
$PAGE->assign('token',getToken());
$PAGE->renderPage('changepassword');
exit;
}
else // Show the configuration form.
{
- $PAGE->assign('linkcount',count($LINKSDB));
$PAGE->assign('token',getToken());
$PAGE->assign('title', empty($GLOBALS['title']) ? '' : $GLOBALS['title'] );
$PAGE->assign('redirector', empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector'] );
if ($targetPage == Router::$PAGE_CHANGETAG)
{
if (empty($_POST['fromtag']) || (empty($_POST['totag']) && isset($_POST['renametag']))) {
- $PAGE->assign('linkcount', count($LINKSDB));
$PAGE->assign('token', getToken());
$PAGE->assign('tags', $LINKSDB->allTags());
$PAGE->renderPage('changetag');
// -------- User wants to add a link without using the bookmarklet: Show form.
if ($targetPage == Router::$PAGE_ADDLINK)
{
- $PAGE->assign('linkcount',count($LINKSDB));
$PAGE->renderPage('addlink');
exit;
}
$link = $LINKSDB[$_GET['edit_link']]; // Read database
if (!$link) { header('Location: ?'); exit; } // Link not found in database.
$data = array(
- 'linkcount' => count($LINKSDB),
'link' => $link,
'link_is_new' => false,
'token' => getToken(),
}
$data = array(
- 'linkcount' => count($LINKSDB),
'link' => $link,
'link_is_new' => $link_is_new,
'token' => getToken(), // XSRF protection.
// Export links as a Netscape Bookmarks file
if (empty($_GET['selection'])) {
- $PAGE->assign('linkcount',count($LINKSDB));
$PAGE->renderPage('export');
exit;
}
// -------- Show upload/import dialog:
if ($targetPage == Router::$PAGE_IMPORT)
{
- $PAGE->assign('linkcount',count($LINKSDB));
$PAGE->assign('token',getToken());
$PAGE->assign('maxfilesize',getMaxFileSize());
$PAGE->renderPage('import');
// Fill all template fields.
$data = array(
- 'linkcount' => count($LINKSDB),
'previous_page_url' => $previous_page_url,
'next_page_url' => $next_page_url,
'page_current' => $page,
$timezone_html = '<tr><td><b>Timezone:</b></td><td>'.$timezone_form.'</td></tr>';
}
- $PAGE = new pageBuilder;
+ $PAGE = new PageBuilder();
$PAGE->assign('timezone_html',$timezone_html);
$PAGE->assign('timezone_js',$timezone_js);
$PAGE->renderPage('install');