diff --git a/htdocs/core/bookmarks_page.php b/htdocs/core/bookmarks_page.php
index 05ae866463f..af2ba15829c 100644
--- a/htdocs/core/bookmarks_page.php
+++ b/htdocs/core/bookmarks_page.php
@@ -75,38 +75,43 @@ $nbofsearch = 0;
$hookmanager->initHooks(array('bookmarks'));
// Define $bookmarks
-$bookmarks = '';
-
+$bookmarkList = '';
+$searchForm = '';
$arrayresult = array();
//include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php';
-$i = 0;
-$accesskeyalreadyassigned = array();
-foreach ($arrayresult as $key => $val) {
- $tmp = explode('?', $val['url']);
- $urlaction = $tmp[0];
- $keysearch = 'search_all';
- $accesskey = '';
- if (!$accesskeyalreadyassigned[$val['label'][0]]) {
- $accesskey = $val['label'][0];
- $accesskeyalreadyassigned[$accesskey] = $accesskey;
+
+// Menu with list of bookmarks
+$sql = "SELECT rowid, title, url, target FROM ".MAIN_DB_PREFIX."bookmark";
+$sql .= " WHERE (fk_user = ".((int) $user->id)." OR fk_user is NULL OR fk_user = 0)";
+$sql .= " AND entity IN (".getEntity('bookmarks').")";
+$sql .= " ORDER BY position";
+if ($resql = $db->query($sql)) {
+ $bookmarkList = '
';
- //$bookmarks .= printSearchForm($urlaction, $urlaction, $val['label'], 'minwidth200', $keysearch, $accesskey, $key, $val['img'], $showtitlebefore, ($i > 0 ? 0 : 1));
-
- $i++;
+ $searchForm .= '';
+} else {
+ dol_print_error($db);
}
-// Execute hook printSearchForm
-$parameters = array('bookmarks'=>$bookmarks);
+// Execute hook printBookmarks
+$parameters = array('bookmarks'=>$bookmarkList);
$reshook = $hookmanager->executeHooks('printBookmarks', $parameters); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) {
- $bookmarks .= $hookmanager->resPrint;
+ $bookmarkList .= $hookmanager->resPrint;
} else {
- $bookmarks = $hookmanager->resPrint;
+ $bookmarkList = $hookmanager->resPrint;
}
@@ -115,7 +120,7 @@ print "\n";
print '';
print '';
print ''."\n";
print '
';
print "\n\n";
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 03ed22e9b19..e02369fa22f 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -680,6 +680,12 @@ textarea.centpercent {
.alignstart {
text-align: start;
}
+.start {
+ text-align: start;
+}
+.end {
+ text-align: end;
+}
.left {
text-align: ;
}
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index d929373c402..0a4eb3fc5d0 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -829,6 +829,12 @@ textarea.centpercent {
.alignstart {
text-align: start;
}
+.start {
+ text-align: start;
+}
+.end {
+ text-align: end;
+}
.left {
text-align: ;
}