From b27b1473af457902a9f2e8e106c749d6591fe7e3 Mon Sep 17 00:00:00 2001 From: scyrma Date: Thu, 15 Nov 2007 02:39:43 +0000 Subject: [PATCH] MDL-11401, merged from 19_STABLE --- admin/index.php | 36 ++++++++++++++---------------------- lang/en_utf8/admin.php | 3 ++- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/admin/index.php b/admin/index.php index 1374684890..8ce6328d18 100644 --- a/admin/index.php +++ b/admin/index.php @@ -25,7 +25,7 @@ require_once($CFG->libdir.'/adminlib.php'); // Contains various admin-only functions require_once($CFG->libdir.'/ddllib.php'); // Install/upgrade related db functions - $id = optional_param('id', '', PARAM_ALPHANUM); + $id = optional_param('id', '', PARAM_TEXT); $confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL); $confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL); $agreelicense = optional_param('agreelicense', 0, PARAM_BOOL); @@ -605,18 +605,19 @@ } -/// Print slightly annoying registration button every six months ;-) -/// You can set the "registered" variable to something far in the future -/// if you really want to prevent this. eg 9999999999 - if (!isset($CFG->registered) || $CFG->registered < (time() - 3600*24*30*6)) { - $options = array(); - $options['sesskey'] = $USER->sesskey; - print_box_start('generalbox adminwarning'); - print_string('pleaseregister', 'admin'); - print_single_button('register.php', $options, get_string('registration')); - print_box_end(); - $registrationbuttonshown = true; +/// Print slightly annoying registration button + $options = array(); + $options['sesskey'] = $USER->sesskey; + print_box_start('generalbox adminwarning'); + if(!isset($CFG->registered)) { + print_string('pleaseregister', 'admin'); } + else { /* if (isset($CFG->registered) && $CFG->registered < (time() - 3600*24*30*6)) { */ + print_string('pleaserefreshregistration', 'admin', userdate($CFG->registered)); + } + print_single_button('register.php', $options, get_string('registration')); + print_box_end(); + ////////////////////////////////////////////////////////////////////////////////////////////////// //// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE /// @@ -628,15 +629,6 @@ print_box($copyrighttext, 'copyright'); ////////////////////////////////////////////////////////////////////////////////////////////////// - - if (empty($registrationbuttonshown)) { - $options = array(); - $options['sesskey'] = $USER->sesskey; - print_single_button('register.php', $options, get_string('registration')); - } - - admin_externalpage_print_footer(); - -?> +?> \ No newline at end of file diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index a71a495397..2f0349bca1 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -478,6 +478,7 @@ $string['pgcluster'] = 'PostgreSQL Cluster'; $string['pgclusterdescription'] = 'PostgreSQL version/cluster parameter for command line operations. If you only have one postgresql on your system or you are not sure what this is, leave this blank.'; $string['php50restricted'] = 'PHP 5.0.x has a number of known problems, please upgrade to 5.1.x or downgrade to 4.3.x or 4.4.x'; $string['pleaseregister'] = 'Please register your site to remove this button'; +$string['pleaserefreshregistration'] = 'Your site has been registered with moodle.org, please consider updating the registration if significant changes happened since your last update, on $a'; $string['plugins'] = 'Modules'; $string['profilecategory'] = 'Category'; $string['profilecategoryname'] = 'Category name (must be unique)'; @@ -676,4 +677,4 @@ $string['uuupdatetype'] = 'Existing user details'; $string['validateerror'] = 'This value was not valid:'; $string['xmlstrictheaders'] = 'XML strict headers'; -?> +?> \ No newline at end of file -- 2.39.5