Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
6c1e9fed89
@ -214,6 +214,27 @@ if (isModEnabled('agenda')) {
|
||||
if (isModEnabled('ticket')) {
|
||||
$tmparray['ticket/list.php?mainmenu=ticket&leftmenu='] = 'Tickets';
|
||||
}
|
||||
// add bookmarks to available landing pages
|
||||
if (empty($conf->global->MAIN_NO_BOOKMARKS_FOR_LANDING_PAGES)) {
|
||||
$sql = "SELECT b.rowid, b.fk_user, b.url, b.title";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bookmark as b";
|
||||
$sql .= " WHERE b.entity IN (".getEntity('bookmark').")";
|
||||
$sql .= " AND b.url NOT LIKE 'http%'";
|
||||
if (!$object->admin) {
|
||||
$sql .= " AND (b.fk_user = ".((int) $object->id)." OR b.fk_user is NULL OR b.fk_user = 0)";
|
||||
}
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$landing_url = str_replace(DOL_URL_ROOT, '', $obj->url);
|
||||
$tmparray[$landing_url] = $obj->title;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hook for insertion new items in the List of possible landing pages
|
||||
$reshook = $hookmanager->executeHooks('addToLandingPageList', $tmparray, $object);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user