From 1f6b7d4e9d8d828a8a15ac2503c977231f1a2965 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 12 Oct 2018 14:07:07 -0700 Subject: [PATCH] Web: let projects customize their certificate define CERT_FILENAME in your project.inc to whatever you want; default is "cert1.php" --- html/inc/bootstrap.inc | 2 +- html/inc/user.inc | 2 +- html/inc/util.inc | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/html/inc/bootstrap.inc b/html/inc/bootstrap.inc index 10863dfa78..82338065cc 100644 --- a/html/inc/bootstrap.inc +++ b/html/inc/bootstrap.inc @@ -195,7 +195,7 @@ function sample_navbar( array(tra("Preferences"), $url_prefix."edit_forum_preferences_form.php"), array(tra("User search"), $url_prefix."user_search.php"), array(tra("User of the day"), $url_prefix."uotd.php"), - array(tra("Certificate"), $url_prefix."cert1.php", "", "_blank"), + array(tra("Certificate"), $url_prefix.cert_filename(), "", "_blank"), )); navbar_menu(tra("Site"), array( array(tra("Site search"), $url_prefix."site_search.php"), diff --git a/html/inc/user.inc b/html/inc/user.inc index 72533aa65e..34d8df42eb 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -184,7 +184,7 @@ function show_user_stats_private($user) { } $x .= "
".tra("Cross-project ID").": $cpid\n"; row2(tra("Cross-project statistics"), $x); - $x = ''.tra("Account").''; + $x = sprintf('%s', cert_filename(), tra("Account")); if ($user->teamid) { $x .= ' · '.tra("Team").''; } diff --git a/html/inc/util.inc b/html/inc/util.inc index 5b4e1f68d1..19a2ed8e02 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -1117,6 +1117,10 @@ function text_end() { echo "\n"; } +function cert_filename() { + return defined("CERT_FILENAME")?CERT_FILENAME:"cert1.php"; +} + $cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit ?>