X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fuimport.php;h=7ed5648d9e2d360de0cef3b85bb885ed9a903d66;hb=0c9cc29a51941eb572bf16fd5489d0947d47d033;hp=5fe2642fc67152bcee01f776428a52ac4fdc0c99;hpb=cbbd68563bf03e2d077a35fe02944ffccd25eaa8;p=friendica.git
diff --git a/mod/uimport.php b/mod/uimport.php
index 5fe2642fc6..7ed5648d9e 100644
--- a/mod/uimport.php
+++ b/mod/uimport.php
@@ -29,22 +29,45 @@ function uimport_post(&$a) {
}
if (x($_FILES,'accountfile')){
- // TODO: pass $blocked / $verified, send email to admin on REGISTER_APPROVE
+ /// @TODO Pass $blocked / $verified, send email to admin on REGISTER_APPROVE
import_account($a, $_FILES['accountfile']);
return;
}
}
function uimport_content(&$a) {
+
+ if((! local_user()) && ($a->config['register_policy'] == REGISTER_CLOSED)) {
+ notice("Permission denied." . EOL);
+ return;
+ }
+
+ $max_dailies = intval(get_config('system','max_daily_registrations'));
+ if($max_dailies) {
+ $r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
+ if($r && $r[0]['total'] >= $max_dailies) {
+ logger('max daily registrations exceeded.');
+ notice( t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
+ return;
+ }
+ }
+
+
+ if(x($_SESSION,'theme'))
+ unset($_SESSION['theme']);
+ if(x($_SESSION,'mobile-theme'))
+ unset($_SESSION['mobile-theme']);
+
+
$tpl = get_markup_template("uimport.tpl");
return replace_macros($tpl, array(
'$regbutt' => t('Import'),
'$import' => array(
'title' => t("Move account"),
- 'text' => t("You can import an account from another Friendica server.
- You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here.
- This feature is experimental. We can't import contacts from the OStatus network (statusnet/identi.ca) or from diaspora"),
- 'field' => array('accountfile', t('Account file'),'', t('To export your accont, go to "Settings->Export your porsonal data" and select "Export account"')),
- ),
+ 'intro' => t("You can import an account from another Friendica server."),
+ 'instruct' => t("You need to export your account from the old server and upload it here. We will recreate your old account here with all your contacts. We will try also to inform your friends that you moved here."),
+ 'warn' => t("This feature is experimental. We can't import contacts from the OStatus network (GNU Social/Statusnet) or from Diaspora"),
+ 'field' => array('accountfile', t('Account file'),'', t('To export your account, go to "Settings->Export your personal data" and select "Export account"')),
+ ),
));
}