Update param_ihm.php

This commit is contained in:
Laurent Destailleur 2023-02-19 02:58:48 +01:00 committed by GitHub
parent 4ba1309a17
commit b3e54b5ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,16 +219,16 @@ if (!empty($conf->global->MAIN_USE_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 1=1";
$sql .= " AND b.entity IN (".getEntity('bookmark').")";
$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 = $object->db->query($sql);
$resql = $db->query($sql);
if ($resql) {
$i = 0;
while ($i < $object->db->num_rows($resql)) {
$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;