Enhancement in bookmark module
This commit is contained in:
parent
69d6ce7467
commit
23d715f8ac
@ -23,9 +23,15 @@
|
|||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function printBookmarksList ($aDb, $aLangs)
|
/**
|
||||||
|
* Add area with bookmarks in menu
|
||||||
|
*
|
||||||
|
* @param unknown_type $aDb
|
||||||
|
* @param unknown_type $aLangs
|
||||||
|
* @return unknown
|
||||||
|
*/function printBookmarksList ($aDb, $aLangs)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf, $user;
|
||||||
|
|
||||||
$db = $aDb;
|
$db = $aDb;
|
||||||
$langs = $aLangs;
|
$langs = $aLangs;
|
||||||
@ -54,6 +60,7 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark";
|
$sql = "SELECT rowid, title, url FROM ".MAIN_DB_PREFIX."bookmark";
|
||||||
|
if (! $user->admin) $sql.= " WHERE (fk_user = ".$user->id." OR fk_user is NULL)";
|
||||||
if ($resql = $db->query($sql) )
|
if ($resql = $db->query($sql) )
|
||||||
{
|
{
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user