From cecbfea5aa78ffb1a33469fa5bac25e7a16b0073 Mon Sep 17 00:00:00 2001 From: shish Date: Wed, 2 Jan 2008 23:20:20 +0000 Subject: [PATCH] direct transload git-svn-id: file:///home/shish/svn/shimmie2/trunk@683 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/upload/main.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ext/upload/main.php b/ext/upload/main.php index 8043d1b6..4233f4a5 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -42,6 +42,21 @@ class Upload extends Extension { $this->theme->display_error($event->page, "Upload Denied", "Anonymous posting is disabled"); } } + else if(!empty($_GET['url'])) { + global $user; + if($this->can_upload($user)) { + $url = $_GET['url']; + $tags = array('tagme'); + if(!empty($_GET['tags'])) { + $tags = tag_explode($_GET['tags']); + } + $ok = $this->try_transload($url, $tags, $url); + $this->theme->display_upload_status($event->page, $ok); + } + else { + $this->theme->display_error($event->page, "Upload Denied", "Anonymous posting is disabled"); + } + } else { $this->theme->display_page($event->page); }