diff --git a/ext/image/main.php b/ext/image/main.php index e0c30ce3..a888f357 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -167,6 +167,16 @@ class ImageIO extends Extension { global $database; global $config; + /* + * Validate things + */ + if(!empty($image->source)) { + if(!preg_match("#^(https?|ftp)://#", $image->source)) { + $error = "Image's source isn't a valid URL"; + return $error; + } + } + /* * Check for an existing image */ diff --git a/ext/rss_images/main.php b/ext/rss_images/main.php index 9b21eb45..6544f959 100644 --- a/ext/rss_images/main.php +++ b/ext/rss_images/main.php @@ -51,8 +51,7 @@ class RSS_Images extends Extension { $title = $config->get_string('title'); $base_href = $config->get_string('base_href'); $version = $config->get_string('version'); - $xml = " -<"."?xml version=\"1.0\" encoding=\"utf-8\" ?"."> + $xml = "<"."?xml version=\"1.0\" encoding=\"utf-8\" ?"."> $title @@ -62,8 +61,7 @@ class RSS_Images extends Extension { (c) 2007 Shish $data - -"; +"; $page->set_data($xml); } // }}} diff --git a/ext/upload/main.php b/ext/upload/main.php index 924d7c3d..217018cf 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -80,8 +80,8 @@ class Upload extends Extension { } else if(filesize($file['tmp_name']) > $config->get_int('upload_size')) { $this->theme->display_upload_error($page, "Error with ".html_escape($file['name']), - "File too large (".filesize($file['tmp_name'])." > ". - ($config->get_int('upload_size')).")"); + "File too large (".to_shorthand_int(filesize($file['tmp_name']))." > ". + (to_shorthand_int($config->get_int('upload_size'))).")"); } else if(!($info = getimagesize($file['tmp_name']))) { $this->theme->display_upload_error($page, "Error with ".html_escape($file['name']), diff --git a/themes/danbooru/style.css b/themes/danbooru/style.css index 24812430..71df6eb5 100644 --- a/themes/danbooru/style.css +++ b/themes/danbooru/style.css @@ -122,10 +122,6 @@ A:hover {text-decoration: underline;} .withleft { margin-left: 160px; } -#body TABLE { - width: 90%; - margin: auto; -} .paginator { margin: 16px; text-align: center; diff --git a/themes/danbooru/tag_list.theme.php b/themes/danbooru/tag_list.theme.php index f7605f24..18696934 100644 --- a/themes/danbooru/tag_list.theme.php +++ b/themes/danbooru/tag_list.theme.php @@ -20,7 +20,7 @@ class TagListTheme extends Themelet { $page->disable_left(); $page->set_title("Tag List"); $page->set_heading($this->heading); - $page->add_block(new Block("Navigation", str_replace("
", " ", $this->navigation), "main", 0)); + $page->add_block(new Block("Navigation", str_replace("
", ", ", $this->navigation), "main", 0)); $page->add_block(new Block(" ", $this->list)); } diff --git a/themes/danbooru/user.theme.php b/themes/danbooru/user.theme.php index 395a63e4..9a6767fd 100644 --- a/themes/danbooru/user.theme.php +++ b/themes/danbooru/user.theme.php @@ -33,7 +33,7 @@ class UserPageTheme extends Themelet { $html .= "
- +
@@ -75,7 +75,7 @@ class UserPageTheme extends Themelet { } public function display_ip_list($page, $uploads, $comments) { - $html = "
Name
Password
Repeat Password
"; + $html = "
"; $html .= "
Uploaded from: "; foreach($uploads as $ip => $count) { $html .= "
$ip ($count)"; @@ -140,7 +140,7 @@ class UserPageTheme extends Themelet { - +
diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index ce93d864..79aa5bf6 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -103,7 +103,7 @@ class ViewTheme extends Themelet {
-
Change Password
Password
Repeat Password
+
Tags
Source