aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-06-16 14:59:17 +0100
committerThomas Willingham <founder@kakste.com>2013-06-16 14:59:17 +0100
commit33696cc8392daeb08d011aa3b1209f3b121898ea (patch)
tree466d48f5abc1a4ec1dbf83543471a8ac89428516 /mod/import.php
parent466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (diff)
parentc4c80a2e472173dfed9b982c6705ccfbb6e6cdab (diff)
downloadvolse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.gz
volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.bz2
volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/import.php b/mod/import.php
index d1b3216d0..1bc61da43 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -5,9 +5,13 @@
require_once('include/Contact.php');
require_once('include/zot.php');
+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);
@@ -22,6 +26,7 @@ function import_post(&$a) {
if($filesize) {
$data = @file_get_contents($src);
}
+ unlink($src);
}
if(! $src) {
@@ -326,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'),