X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fuimport.php;h=704439216b5537fe790eac758af7973ee51f99e3;hb=684dfd5bbd5c6bea1fee22d121e558cee16ec120;hp=f5f7366f592489dbd957c5690a5c7751a39b5f75;hpb=64b0e490d561068b09abdbb92a00c3111fbc69cf;p=friendica.git
diff --git a/mod/uimport.php b/mod/uimport.php
index f5f7366f59..704439216b 100644
--- a/mod/uimport.php
+++ b/mod/uimport.php
@@ -1,50 +1,61 @@
-config['register_policy']) {
- case REGISTER_OPEN:
- $blocked = 0;
- $verified = 1;
- break;
-
- case REGISTER_APPROVE:
- $blocked = 1;
- $verified = 0;
- break;
-
- default:
- case REGISTER_CLOSED:
- if((! x($_SESSION,'authenticated') && (! x($_SESSION,'administrator')))) {
- notice( t('Permission denied.') . EOL );
- return;
- }
- $blocked = 1;
- $verified = 0;
- break;
- }
-
- if (x($_FILES,'accountfile')){
- // TODO: pass $blocked / $verified, send email to admin on REGISTER_APPROVE
- import_account($a, $_FILES['accountfile']);
- return;
- }
-}
-
-function uimport_content(&$a) {
- $tpl = get_markup_template("uimport.tpl");
- return replace_macros($tpl, array(
- '$regbutt' => t('Import'),
- '$import' => array(
- 'title' => t("Move account"),
- 'text' => t("You can move here an account from another Friendica server.
- You need to export your account form the old server and upload it here. We will create here your old account with all your contacts. We will try also to inform you friends that you moved here.
- This feature is experimental. We can't move here contacts from 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"')),
- ),
- ));
-}
+ UTC_TIMESTAMP - INTERVAL 1 day");
+ if ($r && $r[0]['total'] >= $max_dailies) {
+ logger('max daily registrations exceeded.');
+ notice(L10n::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, [
+ '$regbutt' => L10n::t('Import'),
+ '$import' => [
+ 'title' => L10n::t("Move account"),
+ 'intro' => L10n::t("You can import an account from another Friendica server."),
+ 'instruct' => L10n::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' => L10n::t("This feature is experimental. We can't import contacts from the OStatus network \x28GNU Social/Statusnet\x29 or from Diaspora"),
+ 'field' => ['accountfile', L10n::t('Account file'), '', L10n::t('To export your account, go to "Settings->Export your personal data" and select "Export account"')],
+ ],
+ ]);
+}