Fix bookmark list

This commit is contained in:
Laurent Destailleur 2017-10-12 17:09:17 +02:00
parent 50da6a0c9e
commit 1fba58b9ce
4 changed files with 8 additions and 21 deletions

View File

@ -83,7 +83,7 @@ llxHeader('', $langs->trans("ListOfBookmarks"));
print load_fiche_titre($langs->trans("ListOfBookmarks"));
$sql = "SELECT b.fk_soc as rowid, b.dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,";
$sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,";
$sql.= " u.login, u.lastname, u.firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."bookmark as b LEFT JOIN ".MAIN_DB_PREFIX."user as u ON b.fk_user=u.rowid";
$sql.= " WHERE 1=1";
@ -107,7 +107,7 @@ if ($resql)
print "<tr class=\"liste_titre\">";
//print "<td>&nbsp;</td>";
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"bid","", $param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre("Ref",$_SERVER["PHP_SELF"],"rowid","", $param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre("Title",$_SERVER["PHP_SELF"],"title","", $param,'align="left"',$sortfield,$sortorder);
print_liste_field_titre("Link",'','');
print_liste_field_titre("Target",'','','','','align="center"');
@ -127,7 +127,7 @@ if ($resql)
// Id
print '<td align="left">';
print "<a href=\"card.php?id=".$obj->bid."\">".img_object($langs->trans("ShowBookmark"),"bookmark").' '.$obj->bid."</a>";
print "<a href=\"card.php?id=".$obj->rowid."\">".img_object($langs->trans("ShowBookmark"),"bookmark").' '.$obj->rowid."</a>";
print '</td>';
$linkintern=0;
@ -136,21 +136,7 @@ if ($resql)
// Title
print "<td>";
if ($obj->rowid)
{
// Lien interne societe
$linkintern=1;
$link="Dolibarr";
if (! $obj->title)
{
// For compatibility with old Dolibarr bookmarks
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$societe=new Societe($db);
$societe->fetch($obj->rowid);
$obj->title=$societe->name;
}
$title=img_object($langs->trans("ShowCompany"),"company").' '.$obj->title;
}
$linkintern=1;
if ($linkintern) print "<a href=\"".$obj->url."\">";
print $title;
if ($linkintern) print "</a>";

View File

@ -365,6 +365,7 @@ ALTER TABLE llx_c_payment_term DROP PRIMARY KEY;
ALTER TABLE llx_c_payment_term ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
ALTER TABLE llx_c_payment_term ADD UNIQUE INDEX uk_c_payment_term(rowid, entity, code);
ALTER TABLE llx_projet CHANGE datec datec datetime;
create table llx_c_email_senderprofile
(

View File

@ -21,7 +21,7 @@ create table llx_projet
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_soc integer,
datec date, -- date creation project
datec datetime, -- date creation project
tms timestamp,
dateo date, -- date start project
datee date, -- date end project

View File

@ -846,7 +846,7 @@ while ($i < min($num,$limit))
if (! empty($arrayfields['p.datec']['checked']))
{
print '<td align="center">';
print dol_print_date($db->jdate($obj->date_creation), 'dayhour');
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
@ -854,7 +854,7 @@ while ($i < min($num,$limit))
if (! empty($arrayfields['p.tms']['checked']))
{
print '<td align="center">';
print dol_print_date($db->jdate($obj->date_update), 'dayhour');
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
print '</td>';
if (! $i) $totalarray['nbfield']++;
}