aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-package-details.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-06-12 13:57:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-06-12 14:00:28 +0300
commit20a456e33222ed31008db3c328f1e10c212acf00 (patch)
tree49656edebb9e6ad6bb139d46d52a8c45c6e2af65 /mod/mod-package-details.cxx
parenta259cbd13dcf9a25fdd758fc18f7611e1ac404f6 (diff)
Make project url and email optional in package manifest
Diffstat (limited to 'mod/mod-package-details.cxx')
-rw-r--r--mod/mod-package-details.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index c56d91a..a348d95 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -186,8 +186,10 @@ handle (request& rq, response& rs)
s << TABLE(CLASS="proplist", ID="package")
<< TBODY
- << TR_LICENSE (licenses)
- << TR_URL (pkg->url);
+ << TR_LICENSE (licenses);
+
+ if (pkg->url)
+ s << TR_URL (*pkg->url);
if (pkg->doc_url)
s << TR_URL (*pkg->doc_url, "doc-url");
@@ -195,8 +197,10 @@ handle (request& rq, response& rs)
if (pkg->src_url)
s << TR_URL (*pkg->src_url, "src-url");
- s << TR_EMAIL (pkg->email)
- << TR_TAGS (pkg->tags, root)
+ if (pkg->email)
+ s << TR_EMAIL (*pkg->email);
+
+ s << TR_TAGS (pkg->tags, root)
<< ~TBODY
<< ~TABLE;
}