- Timestamp:
- 08/17/15 17:37:32 (9 years ago)
- Location:
- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm
r1315 r1385 166 166 } 167 167 168 sub set_fields { 169 my ($self, %data) = @_; 170 171 if ($data{forward}) { 172 $data{forward} = ref $data{forward} 173 ? $data{forward} 174 : [ $data{forward} ]; 175 } 176 177 $self->SUPER::set_fields(%data); 178 } 179 168 180 169 181 1; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r1372 r1385 302 302 }, 303 303 aliases => { 304 reference => 'aliases',304 #reference => 'aliases', 305 305 formtype => 'TEXT', 306 306 multiple => 1, -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1380 r1385 194 194 $_ =~ /^exported$/ and $data{$_} = $data{$_} ? 1 : 0; 195 195 my $formatted = ref($data{$_}) 196 ? map { $attr->input($_) } @{ $data{$_} }196 ? [ map { $attr->input($_) } @{ $data{$_} } ] 197 197 : $attr->input($data{$_}); 198 if ($attr->{inline} ) {198 if ($attr->{inline} && ! $attr->{delayed}) { 199 199 $first{$_} = $formatted; 200 200 } else { … … 203 203 } 204 204 $first{$class->_key_field} = $id; 205 206 my $lastid; 207 { 208 my $sthnextval = $base->db->prepare_cached("select nextval('ikey_seq') as c"); 209 $sthnextval->execute; 210 $lastid = $sthnextval->fetchrow_hashref()->{c}; 211 $first{ikey} = $lastid; 212 } 205 213 206 214 my $sth = $base->db->prepare( … … 214 222 $sth->execute(map { $first{$_} || undef } sort keys %first) or return; 215 223 216 my $lastid = $base->db->last_insert_id(undef, undef, $class->_object_table, undef);217 224 my $sthid = $base->db->prepare_cached( 218 225 sprintf(q{select %s as k from %s where ikey = ?},
Note: See TracChangeset
for help on using the changeset viewer.