* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once 'name.func.inc.php';
-
class ProfileSettingSearchNames implements ProfileSetting
{
private $private_name_end;
public function save(ProfilePage &$page, $field, $value)
{
require_once 'name.func.inc.php';
+ require_once 'validations.inc.php';
+
$sn_old = build_sn_pub($page->pid());
XDB::execute("DELETE FROM s
USING profile_name AS s
// Only requires validation if modification in public names
if ($has_new) {
- $new_names = new NamesReq(S::user(), $this->search_names, $this->private_name_end);
+ $new_names = new NamesReq(S::user(), $this->profile, $this->search_names, $this->private_name_end);
$new_names->submit();
Platal::page()->trigWarning('La demande de modification de tes noms a bien été prise en compte.' .
' Tu recevras un email dès que ces changements auront été effectués.');
} else {
require_once 'validations.inc.php';
- $myorange = new OrangeReq(S::user(), $gradYearNew);
+ $myorange = new OrangeReq(S::user(), $this->profile, $gradYearNew);
$myorange->submit();
Platal::page()->trigSuccess('Tu pourras changer l\'affichage de ta promotion dès que ta nouvelle promotion aura été validée.');
}
if ($this->owner) {
$res = XDB::query("SELECT COUNT(*)
FROM requests
- WHERE type = 'photo' AND uid = {?}",
+ WHERE type = 'photo' AND pid = {?}",
$this->owner->id());
$this->values['nouvellephoto'] = $res->fetchOneCell();
} else {