From 0242fa276ae889d05f713aec4a6f09372f996a1d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2016 21:40:34 +0200 Subject: Support comment in the repository email manifest value --- brep/mod-repository-details.cxx | 12 +++++++++++- brep/package | 8 +++++--- brep/package.xml | 3 ++- 3 files changed, 18 insertions(+), 5 deletions(-) (limited to 'brep') diff --git a/brep/mod-repository-details.cxx b/brep/mod-repository-details.cxx index 7d38c6c..27493c1 100644 --- a/brep/mod-repository-details.cxx +++ b/brep/mod-repository-details.cxx @@ -109,7 +109,17 @@ handle (request& rq, response& rs) s << P_DESCRIPTION (*r.description); if (r.email) - s << P << A(HREF="mailto:" + *r.email) << *r.email << ~A << ~P; + { + const email& e (*r.email); + + s << P + << A(HREF="mailto:" + e) << e << ~A; + + if (!e.comment.empty ()) + s << " (" << e.comment << ")"; + + s << ~P; + } ostringstream o; butl::to_stream (o, diff --git a/brep/package b/brep/package index 5360623..8aa88a1 100644 --- a/brep/package +++ b/brep/package @@ -21,9 +21,9 @@ // Used by the data migration entries. // -#define LIBBREP_SCHEMA_VERSION_BASE 1 +#define LIBBREP_SCHEMA_VERSION_BASE 2 -#pragma db model version(LIBBREP_SCHEMA_VERSION_BASE, 1, closed) +#pragma db model version(LIBBREP_SCHEMA_VERSION_BASE, 2, open) // The uint16_t value range is not fully covered by SMALLINT PostgreSQL type // to which uint16_t is mapped by default. @@ -355,6 +355,8 @@ namespace brep class repository { public: + using email_type = brep::email; + // Create internal repository. // repository (repository_location, @@ -380,7 +382,7 @@ namespace brep // Present only for internal repositories. // - optional email; + optional email; optional summary; optional description; diff --git a/brep/package.xml b/brep/package.xml index 9c88f25..6abbf1d 100644 --- a/brep/package.xml +++ b/brep/package.xml @@ -1,5 +1,5 @@ - + @@ -7,6 +7,7 @@ + -- cgit v1.1