if($orig->tag != $this->tag || $orig->tagger != $this->tagger) {
$existing = Profile_list::getByTaggerAndTag($this->tagger, $this->tag);
if(!empty($existing)) {
+ // TRANS: Server exception.
throw new ServerException(_('The tag you are trying to rename ' .
'to already exists.'));
}
* @return mixed Profile_list on success, false on fail
*/
static function saveNew($fields) {
-
extract($fields);
$ptag = new Profile_list();
$ptag->query('BEGIN');
if (empty($tagger)) {
+ // TRANS: Server exception saving new tag without having a tagger specified.
throw new Exception(_('No tagger specified.'));
}
if (empty($tag)) {
+ // TRANS: Server exception saving new tag without having a tag specified.
throw new Exception(_('No tag specified.'));
}
if (!$result) {
common_log_db_error($ptag, 'INSERT', __FILE__);
+ // TRANS: Server exception saving new tag.
throw new ServerException(_('Could not create profile tag.'));
}
$result = $ptag->update($orig);
if (!$result) {
common_log_db_error($ptag, 'UPDATE', __FILE__);
+ // TRANS: Server exception saving new tag.
throw new ServerException(_('Could not set profile tag URI.'));
}
}
$result = $ptag->update($orig);
if (!$result) {
common_log_db_error($ptag, 'UPDATE', __FILE__);
+ // TRANS: Server exception saving new tag.
throw new ServerException(_('Could not set profile tag mainpage.'));
}
}