diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 917955f5dfc..02821baadd1 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -231,20 +231,22 @@ if ($conf->commande->enabled)
* Bookmark
*
*/
-$sql = "SELECT s.idp, s.nom,b.rowid as bid";
-$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b";
-$sql .= " WHERE b.fk_soc = s.idp AND b.fk_user = ".$user->id;
-if ($socid)
-{
- $sql .= " AND s.idp = $socid";
-}
-$sql .= " ORDER BY lower(s.nom) ASC";
+ if ($conf->bookmark->enabled)
+ {
+ $sql = "SELECT s.idp, s.nom,b.rowid as bid";
+ $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."bookmark as b";
+ $sql .= " WHERE b.fk_soc = s.idp AND b.fk_user = ".$user->id;
+ if ($socid)
+ {
+ $sql .= " AND s.idp = $socid";
+ }
+ $sql .= " ORDER BY lower(s.nom) ASC";
-if ( $db->query($sql) )
-{
- $num = $db->num_rows();
+ if ( $db->query($sql) )
+ {
+ $num = $db->num_rows();
- if ($num)
+ if ($num)
{
$i = 0;
@@ -256,19 +258,20 @@ if ( $db->query($sql) )
$var=true;
while ($i < $num)
- {
- $obj = $db->fetch_object();
- $var = !$var;
- print "
";
- print '| '.$obj->nom.' | ';
- print '';
- print img_delete();
- print ' | ';
- print '
';
- $i++;
- }
+ {
+ $obj = $db->fetch_object();
+ $var = !$var;
+ print "";
+ print '| '.$obj->nom.' | ';
+ print '';
+ print img_delete();
+ print ' | ';
+ print '
';
+ $i++;
+ }
print '';
}
+ }
}
print '';
diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php
index 1d5969b9bec..990d57781cb 100644
--- a/htdocs/conf/conf.class.php
+++ b/htdocs/conf/conf.class.php
@@ -2,7 +2,8 @@
/* Copyright (C) 2003 Rodolphe Quiedeville
* Copyright (C) 2003 Xavier Dutoit
* Copyright (C) 2004-2007 Laurent Destailleur
- * Copyright (C) 2006 Jean Heimburger
+ * Copyright (C) 2005-2007 Regis Houssin
+ * Copyright (C) 2006 Jean Heimburger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -151,6 +152,8 @@ class Conf
// Module bookmark4u
$this->bookmark4u->enabled=defined('MAIN_MODULE_BOOKMARK4U')?MAIN_MODULE_BOOKMARK4U:0;
+
+ // Module bookmark
$this->bookmark->enabled=defined('MAIN_MODULE_BOOKMARK')?MAIN_MODULE_BOOKMARK:0;
// Module deplacement
|