From 74f678076ae14929a1d50b507d513476aa485ec3 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 22 Jan 2013 18:49:48 +0000 Subject: [PATCH] Don't update openFiles array on upload Calling updateFileManagerList now includes a 6th argument and if a true value is passed, then it's indicating an uploaded file and shouldn't set the openFiles array value. --- lib/file-control.php | 4 ++-- lib/ice-coder.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/file-control.php b/lib/file-control.php index e00a020..0579a50 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -103,7 +103,7 @@ if ($_GET['action']=="upload") { $this->uploadFile=$uploadDir.$current->name; $fileName = $current->name; if ($this->upload($current,$this->uploadFile)) { - echo ''; + echo ''; } else { echo ""; } @@ -135,7 +135,7 @@ if ($_GET['action']=="upload") { echo ""; } - echo ""; + echo ""; } // If we're due to rename a file/folder... diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 217919f..7e3427b 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -652,7 +652,7 @@ var ICEcoder = { }, // Update the file manager tree list on demand - updateFileManagerList: function(action,location,file,perms,oldName) { + updateFileManagerList: function(action,location,file,perms,oldName,uploaded) { var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver; // Adding files @@ -714,7 +714,7 @@ var ICEcoder = { } } // If we added a new file, we've saved it under a new filename, so set that - if (actionElemType=="file") { + if (actionElemType=="file" && !uploaded) { top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=location+file; } }