direct transload in 2.1
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@687 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
918a85e721
commit
96fb17b5f1
@ -40,6 +40,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']) && $_GET['tags'] != "null") {
|
||||
$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);
|
||||
}
|
||||
|
@ -42,6 +42,15 @@ class UploadTheme extends Themelet {
|
||||
<div id='upload_completions' style='clear: both;'><small>(Max file size is $max_kb)</small></div>
|
||||
";
|
||||
|
||||
if($tl_enabled) {
|
||||
global $config;
|
||||
$link = make_link("upload");
|
||||
$title = "Upload to " . $config->get_string('title');
|
||||
$html .= '<p><a href="javascript:location.href="' .
|
||||
$link . '?url="+location.href+"&tags="+prompt("enter tags")">' .
|
||||
$title . '</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
|
||||
}
|
||||
|
||||
$page->set_title("Upload");
|
||||
$page->set_heading("Upload");
|
||||
$page->add_block(new NavBlock());
|
||||
|
Loading…
x
Reference in New Issue
Block a user