projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'xorg/1.0.2/master' into xorg/master
[platal.git]
/
modules
/
carnet.php
diff --git
a/modules/carnet.php
b/modules/carnet.php
index
f5f4cb3
..
ba5e1df
100644
(file)
--- a/
modules/carnet.php
+++ b/
modules/carnet.php
@@
-292,9
+292,10
@@
class CarnetModule extends PLModule
case 'ajouter':
if (($contact = User::get(Env::v('user')))) {
case 'ajouter':
if (($contact = User::get(Env::v('user')))) {
- if (XDB::execute("REPLACE INTO contacts (uid, contact)
- VALUES ({?}, {?})",
- $uid, $contact->id())) {
+ XDB::execute('INSERT IGNORE INTO contacts (uid, contact)
+ VALUES ({?}, {?})',
+ $uid, $contact->id());
+ if (XDB::affectedRows() > 0) {
Platal::session()->updateNbNotifs();
$page->trigSuccess('Contact ajouté !');
} else {
Platal::session()->updateNbNotifs();
$page->trigSuccess('Contact ajouté !');
} else {
@@
-315,7
+316,7
@@
class CarnetModule extends PLModule
}
if ($search && trim(Env::v('quick'))) {
$base = 'carnet/contacts/search';
}
if ($search && trim(Env::v('quick'))) {
$base = 'carnet/contacts/search';
- $view = new
SearchSet(true, false,
new UFC_Contact($user));
+ $view = new
QuickSearchSet(
new UFC_Contact($user));
} else {
$base = 'carnet/contacts';
$view = new ProfileSet(new UFC_Contact($user));
} else {
$base = 'carnet/contacts';
$view = new ProfileSet(new UFC_Contact($user));