Skip to content
Snippets Groups Projects
Commit dfe0266b authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

rename url -> information_url, add organization_url

parent 97af5818
No related branches found
No related tags found
No related merge requests found
......@@ -90,10 +90,11 @@ foreach my $id (split(/, */, $configuration->{groups}->{list})) {
next if $seen{$entry->{entityid}}++;
my $entity = AccountManager::Entity->new(
db => $db,
entityid => $entry->{entityid},
displayname => $entry->{display_name},
url => $entry->{url},
db => $db,
entityid => $entry->{entityid},
displayname => $entry->{display_name},
information_url => $entry->{information_url},
organization_url => $entry->{organization_url},
);
$entity->contacts(uniq map { $_->{EmailAddress} } @{$entry->{contacts}})
......
......@@ -14,7 +14,8 @@ CREATE TABLE tokens (
CREATE TABLE entities (
id bigint(20) NOT NULL AUTO_INCREMENT,
entityid varchar(200) NOT NULL,
url varchar(200) DEFAULT NULL,
information_url varchar(200) DEFAULT NULL,
organization_url varchar(200) DEFAULT NULL,
displayname varchar(500) DEFAULT NULL,
contacts varchar(2000) DEFAULT NULL,
PRIMARY KEY (id),
......
......@@ -696,7 +696,7 @@ sub req_create_accounts {
action => 'create_accounts',
accounts => \@accounts,
entityid => $entityid,
url => $sp->url(),
url => $sp->information_url(),
email => $email,
key => $key,
token => $download_token->secret(),
......
......@@ -12,11 +12,12 @@ __PACKAGE__->meta->setup(
table => 'entities',
columns => [
id => { type => 'bigserial', not_null => 1 },
entityid => { type => 'varchar', length => 200, not_null => 1 },
displayname => { type => 'varchar', length => 500 },
url => { type => 'varchar', length => 200 },
contacts => { type => 'array' },
id => { type => 'bigserial', not_null => 1 },
entityid => { type => 'varchar', length => 200, not_null => 1 },
displayname => { type => 'varchar', length => 500 },
information_url => { type => 'varchar', length => 200 },
organization_url => { type => 'varchar', length => 200 },
contacts => { type => 'array' },
],
primary_key_columns => [ 'id' ],
......
......@@ -146,7 +146,7 @@ sub parse {
my %urls =
map { $_->getAttribute('xml:lang') => $_->textContent() }
@urls;
$data->{url} =
$data->{information_url} =
$urls{en} ? $urls{en} :
@urls ? $urls[0]->textContent() :
undef;
......@@ -191,7 +191,7 @@ sub parse {
my %urls =
map { $_->getAttribute('xml:lang') => $_->textContent() }
@urls;
$data->{organization} =
$data->{organization_url} =
$urls{en} ? $urls{en} :
@urls ? $urls[0]->textContent() :
undef;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment