diff --git a/dwoo/templates/img_post_box.tpl b/dwoo/templates/img_post_box.tpl
index ea474dc..7a101b1 100644
--- a/dwoo/templates/img_post_box.tpl
+++ b/dwoo/templates/img_post_box.tpl
@@ -27,12 +27,12 @@
{t}Email{/t}
- |
-
- {/if}
+
+
|
- {t}Subject{/t} |
+ {t}Subject{/t}
+
{strip}
|
- {/if}
|
{t}Subject{/t} |
diff --git a/dwoo/templates/upl_post_box.tpl b/dwoo/templates/upl_post_box.tpl
index ac6a471..e95ad06 100644
--- a/dwoo/templates/upl_post_box.tpl
+++ b/dwoo/templates/upl_post_box.tpl
@@ -29,7 +29,6 @@
- {/if}
|
{t}Subject{/t} |
diff --git a/inc/classes/board-post.class.php b/inc/classes/board-post.class.php
index 8b49007..a0167d2 100644
--- a/inc/classes/board-post.class.php
+++ b/inc/classes/board-post.class.php
@@ -191,8 +191,14 @@ class Board {
} else {
$replycount = $tc_db->GetAll("SELECT COUNT(`id`) AS replies, SUM(CASE WHEN `file_md5` = '' THEN 0 ELSE 1 END) AS files FROM `" . KU_DBPREFIX . "posts` WHERE `boardid` = " . $this->board['id']." AND `parentid` = ".$thread['id']." AND `is_deleted` = 0 AND `id` NOT IN (" . $omitids . ")");
}
- $newposts[$k][0]['replies'] = $replycount[0][0];
- $newposts[$k][0]['images'] = (isset($replycount[0][1]) ? $replycount[0][1] : '');
+ // Workaround for upload boards
+ if ($this->board['type'] == 3) {
+ $newposts[$k]['replies'] = $replycount[0][0];
+ $newposts[$k]['images'] = (isset($replycount[0][1]) ? $replycount[0][1] : '');
+ } else {
+ $newposts[$k][0]['replies'] = $replycount[0][0];
+ $newposts[$k][0]['images'] = (isset($replycount[0][1]) ? $replycount[0][1] : '');
+ }
}
if ($this->board['type'] == 0 && !isset($embeds)) {
$embeds = $tc_db->GetAll("SELECT * FROM `" . KU_DBPREFIX . "embeds`");
@@ -208,6 +214,7 @@ class Board {
}
$this->dwoo_data->assign('posts', $newposts);
$this->dwoo_data->assign('file_path', getCLBoardPath($this->board['name'], $this->board['loadbalanceurl_formatted'], ''));
+
$content = $this->dwoo->get(KU_TEMPLATEDIR . '/' . $this->board['text_readable'] . '_board_page.tpl', $this->dwoo_data);
$footer = $this->Footer(false, (microtime_float() - $executiontime_start_page), (($this->board['type'] == 1) ? (true) : (false)));
$content = $header.$postbox.$content.$footer;
diff --git a/inc/classes/manage.class.php b/inc/classes/manage.class.php
index bde0a8b..e55dd5b 100644
--- a/inc/classes/manage.class.php
+++ b/inc/classes/manage.class.php
@@ -2083,9 +2083,7 @@ class Manage {
function editfiletypes() {
global $tc_db, $tpl_page;
$this->AdministratorsOnly();
- if ($_POST['filetype'] == "htaccess") {
- exitWithErrorPage(_gettext('Invalid filetype.'));
- }
+
$tpl_page .= ''. _gettext('Edit filetypes') . '
';
if (isset($_GET['do'])) {
if ($_GET['do'] == 'addfiletype') {
@@ -2181,7 +2179,7 @@ class Manage {
if (count($results) > 0) {
$tpl_page .= '';
} else {
@@ -3228,7 +3226,7 @@ class Manage {
$ban_boards = implode('|', $_POST['bannedfrom']);
}
$ban_globalban = (isset($_POST['banfromall']) || $instantban) ? 1 : 0;
- $ban_allowread = ($_POST['allowread'] = 0 || $instantban) ? 0 : 1;
+ $ban_allowread = ($_POST['allowread'] == 0 || $instantban) ? 0 : 1;
if (isset($_POST['quickbanboardid'])) {
$ban_board_id = $_POST['quickbanboardid'];
}
diff --git a/inc/classes/upload.class.php b/inc/classes/upload.class.php
index fc27fac..e5b1a11 100644
--- a/inc/classes/upload.class.php
+++ b/inc/classes/upload.class.php
@@ -216,7 +216,12 @@ class Upload {
/* Otherwise, use this script alone */
} else {
$this->file_location = KU_BOARDSDIR . $board_class->board['name'] . '/src/' . $this->file_name . $this->file_type;
-
+
+ if (file_exists($this->file_location)) {
+ exitWithErrorPage(_gettext('A file by that name already exists'));
+ die();
+ }
+
if($this->file_type == '.mp3') {
require_once(KU_ROOTDIR . 'lib/getid3/getid3.php');