Commit 41516fb6 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Move the bulk of site registration stuff off admin home


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 1ec0b3b3
......@@ -41,7 +41,6 @@ else {
}
require_once('pieforms/pieform.php');
require(get_config('libroot') . 'upgrade.php');
require(get_config('libroot') . 'registration.php');
$upgrades = check_upgrades();
......@@ -54,7 +53,7 @@ if (isset($upgrades['core']) && !empty($upgrades['core']->install)) {
}
if (!get_config('registration_lastsent')) {
$register = register_site();
$register = true;
}
$closed = get_config('siteclosedbyadmin');
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage admin
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*
*/
define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'adminhome');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
require(dirname(dirname(__FILE__)).'/init.php');
require_once('pieforms/pieform.php');
require(get_config('libroot') . 'registration.php');
if (!get_config('registration_lastsent')) {
$register = register_site();
}
$smarty = smarty();
if (isset($register)) {
$smarty->assign('register', $register);
}
$smarty->display('admin/registersite.tpl');
?>
......@@ -127,11 +127,15 @@ $string['Register'] = 'Register';
$string['registrationfailedtrylater'] = 'Registation failed with error code %s. Please try again later.';
$string['registrationsuccessfulthanksforregistering'] = 'Registation successful - thanks for registering!';
$string['registeryourmaharasite'] = 'Register your Mahara Site';
$string['registeryourmaharasitesummary'] = '
<p>You can choose to register your Mahara Site with <a href="http://mahara.org/">mahara.org</a>, and help us to build up a picture of the Mahara installation base around the world. Registering will remove this notice.</p>
<p>You can register your site, and preview the information that will be sent on the <strong><a href="%sadmin/registersite.php">Site Registration page.</a></strong></p>';
$string['registeryourmaharasitedetail'] = '
<p>You can choose to register your Mahara Site with <a href="http://mahara.org/">mahara.org</a>. Registration is free, and helps us build up a picture of the Mahara installation base around the world.</p>
<p>You can see the information that will be sent to mahara.org - nothing that can personally identify any of your users will be sent.</p>
<p>If you tick &quot;send weekly updates&quot;, Mahara will automatically send an update to mahara.org once a week with your updated information.</p>
<p>Registering will remove this notice. You will be able to change whether you send weekly updates on the <a href="%sadmin/site/options.php">site options</a> page.</p>';
$string['siteregistered'] = 'Your site has been registered. You can turn weekly updates on and off on the <a href="%sadmin/site/options.php">site options</a> page.</p>';
// Close site
$string['Close'] = 'Close';
......
......@@ -26,11 +26,8 @@
{/if}
{if $register}
<div class="message" id="register-site">
<h3>{str tag=registeryourmaharasite section=admin}</h3>
{str tag=registeryourmaharasitedetail section=admin args=$WWWROOT}
{$register}
{str tag=registeryourmaharasitesummary section=admin args=$WWWROOT}
</div>
{/if}
......
{include file='header.tpl'}
<div class="message" id="register-site">
<h3>{str tag=registeryourmaharasite section=admin}</h3>
{if $register}
{str tag=registeryourmaharasitedetail section=admin args=$WWWROOT}
{$register}
{else}
{str tag=siteregistered section=admin args=$WWWROOT}
{/if}
</div>
{include file='footer.tpl'}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment