projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
aliases.id => aliases.uid
[platal.git]
/
include
/
name.func.inc.php
diff --git
a/include/name.func.inc.php
b/include/name.func.inc.php
index
aef47cd
..
547f535
100644
(file)
--- a/
include/name.func.inc.php
+++ b/
include/name.func.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
10
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-173,7
+173,7
@@
function build_short_name(&$search_names, &$sn_types, &$alias = null)
$firstname = $search_names[$sn_types['firstname']]['fullname'];
}
if ($alias) {
$firstname = $search_names[$sn_types['firstname']]['fullname'];
}
if ($alias) {
- $alias =
make_usern
ame($firstname, $lastname);
+ $alias =
PlUser::makeUserN
ame($firstname, $lastname);
}
return $firstname . " " . $lastname;
}
}
return $firstname . " " . $lastname;
}
@@
-274,16
+274,15
@@
function set_alias_names(&$sn_new, $sn_old, $update_new = false, $new_alias = nu
}
if ($update_new) {
XDB::execute("DELETE FROM aliases
}
if ($update_new) {
XDB::execute("DELETE FROM aliases
- WHERE FIND_IN_SET('usage', flags) AND id = {?}",
+ WHERE FIND_IN_SET('usage', flags) AND
u
id = {?}",
S::i('uid'));
}
if ($new_alias) {
S::i('uid'));
}
if ($new_alias) {
- XDB::execute("INSERT INTO aliases (alias, type, flags, id)
+ XDB::execute("INSERT INTO aliases (alias, type, flags,
u
id)
VALUES ({?}, 'alias', 'usage', {?})",
$new_alias, S::i('uid'));
}
VALUES ({?}, 'alias', 'usage', {?})",
$new_alias, S::i('uid'));
}
- require_once('user.func.inc.php');
- user_reindex(S::i('uid'));
+ Profile::rebuildSearchTokens(S::i('uid'));
return $has_new;
}
return $has_new;
}