From 23d715f8ac769a342e880826a50e4e21e54e59d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Jan 2009 16:16:50 +0000 Subject: [PATCH] Enhancement in bookmark module --- htdocs/bookmarks/bookmarks.lib.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 7a037f353d9..ea547fa49b2 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -23,9 +23,15 @@ * \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; $langs = $aLangs; @@ -54,6 +60,7 @@ function printBookmarksList ($aDb, $aLangs) if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) { $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) ) { $i=0;