From b263f11d77db347122bce22de23587fbb2b0edff Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 7 Jun 2013 20:40:36 +0100 Subject: Another missing include --- mod/import.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/import.php') diff --git a/mod/import.php b/mod/import.php index d1b3216d0..b7e48ed7a 100644 --- a/mod/import.php +++ b/mod/import.php @@ -5,6 +5,7 @@ require_once('include/Contact.php'); require_once('include/zot.php'); +require_once('include/identity.php'); function import_post(&$a) { -- cgit v1.2.3 From ee1ecd8ea29e41f70f8ee233ff6859e2e45e28b7 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 8 Jun 2013 16:29:56 -0700 Subject: remove uploaded import file once we're done with it. --- mod/import.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/import.php') diff --git a/mod/import.php b/mod/import.php index d1b3216d0..a36519a0c 100644 --- a/mod/import.php +++ b/mod/import.php @@ -22,6 +22,7 @@ function import_post(&$a) { if($filesize) { $data = @file_get_contents($src); } + unlink($src); } if(! $src) { -- cgit v1.2.3 From d76ec28f7900c0c5fcf2d52bda3476de59b8fb1d Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 8 Jun 2013 16:41:57 -0700 Subject: import requires a valid account --- mod/import.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/import.php') diff --git a/mod/import.php b/mod/import.php index bf55b3104..1bc61da43 100644 --- a/mod/import.php +++ b/mod/import.php @@ -9,6 +9,9 @@ require_once('include/identity.php'); function import_post(&$a) { + if(! $a->get_account()) { + return; + } $data = null; $seize = ((x($_REQUEST,'make_primary')) ? intval($_REQUEST['make_primary']) : 0); @@ -328,6 +331,10 @@ function import_post(&$a) { function import_content(&$a) { + if(! $a->get_account()) { + notice( t('You must be logged in to use this feature.')); + return ''; + } $o = replace_macros(get_markup_template('channel_import.tpl'),array( '$title' => t('Import Channel'), -- cgit v1.2.3