From 0c1ecf9af4db5be0942850b8a08cc53595dcb86e Mon Sep 17 00:00:00 2001 From: parmentelat Date: Thu, 22 Mar 2018 15:34:48 +0100 Subject: [PATCH] search for 'person-registration.txt' in e.g. /etc/planetlab/php if this file exists then we use its content instead of just 'Select the site where you belong' --- planetlab/persons/register.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/planetlab/persons/register.php b/planetlab/persons/register.php index 2b5ee8c..db2b44f 100644 --- a/planetlab/persons/register.php +++ b/planetlab/persons/register.php @@ -67,9 +67,20 @@ Your E-mail address must be able to receive e-mail and will be used as your $PLC_NAME username EOF; -$person_form['site_ids']['comment'] = <<< EOF -Select the site where you belong -EOF; + +// dirty hack feb 2018; if this file can be found, +// its contents is used instead of the hard-wired message +// it is searched along php's include path, so it should be +// allright to save it as /etc/planetlab/php/person-registration.txt +// of course html tags like and
are OK +global $message_filename; +$message_filename = "person-registration.txt"; + +try { + $person_form['site_ids']['comment'] = file_get_contents($message_filename, TRUE); +} catch (Exception $e) { + $person_form['site_ids']['comment'] = "Select the site where you belong"; +} if (0) $person_form['roles']['comment'] = <<< EOF -- 2.43.0