<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public function save(ProfilePage &$page, $field, $value)
{
- Phone::deletePhones($page->pid(), Phone::LINK_PROFILE);
+ Phone::deletePhones($page->pid(), Phone::LINK_PROFILE, null, S::user()->isMe($page->owner) || S::admin());
Phone::savePhones($value, $page->pid(), Phone::LINK_PROFILE);
}
VALUES ({?}, {?}, {?}, {?}, {?}, {?}, NOW())
ON DUPLICATE KEY UPDATE uid = VALUES(uid), oldText = IF(VALUES(type) != type, VALUES(oldText), oldText),
newText = VALUES(newText), type = VALUES(type), timestamp = NOW()',
- $this->pid(), $user->id(), $field, $values[0], $values[1], ($owner->id() == $user->id()) ? 'self' : 'third_party');
+ $this->pid(), $user->id(), Profile::$descriptions[$field], $values[0], $values[1],
+ ($owner->id() == $user->id()) ? 'self' : 'third_party');
}
}
return true;