From 8891d3af476742ccc717944906742b302c359735 Mon Sep 17 00:00:00 2001 From: Sazpaimon Date: Sat, 26 Sep 2009 05:10:06 +0000 Subject: [PATCH] Fix a bug where load balancer enabled boards cannot delete files. git-svn-id: http://kusabax.cultnet.net/svn/repo/stable@233 73d99b7e-4f53-4972-b7b7-2ecd3c4d89ee --- inc/classes/board-post.class.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/inc/classes/board-post.class.php b/inc/classes/board-post.class.php index f2a0f15..309d326 100644 --- a/inc/classes/board-post.class.php +++ b/inc/classes/board-post.class.php @@ -95,21 +95,20 @@ class Board { if($this->board['type'] != 1) { $this->board['filetypes_allowed'] = $tc_db->GetAll("SELECT ".KU_DBPREFIX."filetypes.filetype FROM ".KU_DBPREFIX."boards, ".KU_DBPREFIX."filetypes, ".KU_DBPREFIX."board_filetypes WHERE ".KU_DBPREFIX."boards.id = " . $this->board['id'] . " AND ".KU_DBPREFIX."board_filetypes.boardid = " . $this->board['id'] . " AND ".KU_DBPREFIX."board_filetypes.typeid = ".KU_DBPREFIX."filetypes.id ORDER BY ".KU_DBPREFIX."filetypes.filetype ASC;"); } - - $this->board['loadbalanceurl_formatted'] = ($this->board['loadbalanceurl'] != '') ? substr($this->board['loadbalanceurl'], 0, strrpos($this->board['loadbalanceurl'], '/')) : ''; - - if ($this->board['loadbalanceurl'] != '' && $this->board['loadbalancepassword'] != '') { - require_once KU_ROOTDIR . 'inc/classes/loadbalancer.class.php'; - $this->loadbalancer = new Load_Balancer; - - $this->loadbalancer->url = $this->board['loadbalanceurl']; - $this->loadbalancer->password = $this->board['loadbalancepassword']; - } + if ($this->board['locale'] && $this->board['locale'] != KU_LOCALE) { changeLocale($this->board['locale']); } } + $this->board['loadbalanceurl_formatted'] = ($this->board['loadbalanceurl'] != '') ? substr($this->board['loadbalanceurl'], 0, strrpos($this->board['loadbalanceurl'], '/')) : ''; + if ($this->board['loadbalanceurl'] != '' && $this->board['loadbalancepassword'] != '') { + require_once KU_ROOTDIR . 'inc/classes/loadbalancer.class.php'; + $this->loadbalancer = new Load_Balancer; + + $this->loadbalancer->url = $this->board['loadbalanceurl']; + $this->loadbalancer->password = $this->board['loadbalancepassword']; + } } }