Final changes to Private Key branch

This commit is contained in:
Mark Pemberton 2011-02-05 00:09:48 -05:00
parent f6873268e5
commit 2242a0da33
4 changed files with 18 additions and 16 deletions

View File

@ -72,7 +72,7 @@ CREATE TABLE `sc_users` (
`email` varchar(50) NOT NULL default '',
`homepage` varchar(255) default NULL,
`uContent` text,
`privateKey` varchar(32) NOT NULL,
`privateKey` varchar(32) NULL,
PRIMARY KEY (`uId`),
UNIQUE KEY `privateKey` (`privateKey`)
) CHARACTER SET utf8 COLLATE utf8_general_ci ;

View File

@ -211,17 +211,7 @@ if ($currenttag!= '') {
$blast = '<a href="'. sprintf($nav_url, $user, $currenttag, '?page=') . $totalpages . $sortAmp .'">'. T_('Last') ."</a>\n";
}
// RSS
$brss = '';
$size = count($rsschannels);
for ($i = 0; $i < $size; $i++) {
$brss .= '<a style="background:#FFFFFF" href="'. htmlspecialchars($rsschannels[$i][1]) . '"'
. ' title="' . htmlspecialchars($rsschannels[$i][0]) . '">'
. '<img src="' . ROOT . 'images/rss.gif" width="16" height="16" alt="' . htmlspecialchars($rsschannels[$i][0]) .'"/>'
. '</a>';
}
$pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
$pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." </p>\n";
if (getPerPageCount($currentUser) > 10) {
echo $pagesBanner; // display a page banner if too many bookmarks to manage

View File

@ -2,6 +2,13 @@ Upgrading SemanticScuttle from a previous version
=================================================
From version 0.97 to 0.9x
-------------------------
Update your database:
- ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(32) NULL;
- CREATE INDEX `privateKey` ON `sc_users` (`privateKey`);
From version 0.96 to 0.97
-------------------------
No database changes necessary.

View File

@ -256,12 +256,17 @@ if ($templatename == 'editbookmark.tpl') {
array(
filter($sitename .': '. $pagetitle),
createURL('rss', filter($user, 'url') . $rssCat.'?sort='.getSortOrder())
),
array(
filter($sitename .': (private) '. $pagetitle),
createURL('rss', filter($user, 'url') . $rssCat.'?sort='.getSortOrder().'&privatekey='.$currentUser->getPrivateKey())
)
);
if ($currentUser->getPrivateKey() <> null) {
array_push(
$tplVars['rsschannels'],
array(
filter($sitename .': (private) '. $pagetitle),
createURL('rss', filter($user, 'url') . $rssCat.'?sort='.getSortOrder().'&privatekey='.$currentUser->getPrivateKey())
)
);
}
$tplVars['page'] = $page;
$tplVars['start'] = $start;