Index: /sandbox/filemanager/js/draw_api.js
===================================================================
--- /sandbox/filemanager/js/draw_api.js	(revision 1782)
+++ /sandbox/filemanager/js/draw_api.js	(revision 1784)
@@ -227,5 +227,59 @@
 	fl.drawStripes();
 }
-
+folderList.prototype.createLine = function(file){
+		var fl = folderList;
+		retBuff = fl.td;
+		retBuff += '<input name="fileman" value="'+file.name+'" type="checkbox"></td>';
+		if (permissions['private']) {
+			retBuff += '<td><img id="restrict_'+file.name+'" onclick="setRestricted(\''+file.name+'\')" ';
+			retBuff += 'src="'+templatePath+'images/button_'+(file.pub == '1'?'lock':'unlock')+'.png"></td>';
+		}
+		else
+			retBuff += '<td></td>';
+
+		if (file.mime == 'text/html')
+			retBuff += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(file.name)+';path='+base64_encode(currentPath)+'"><img alt="'+get_lang('export')+'" title="'+get_lang('export')+'" src="'+templatePath+'images/button_export.png"></a></td>';
+		else
+			retBuff += '<td></td>';
+		retBuff += fl.td+'<img src="'+(file.icon)+'">';
+		retBuff += '<a id="name_'+file.name+'" href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(file.name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+file.name+'</a>&nbsp;</td>';
+		if (preferences.mime_type =='1') retBuff += fl.td+file.mime+'</td>';
+		if (preferences.size =='1') retBuff += fl.td+borkb(file.size)+'</td>';
+		var now = new Date();
+		var dtString = "";
+		if (preferences.created =='1') {
+			var created = new Date();
+			created.setTime(file.creatd*1000);
+			if (now.getTime() - created.getTime() < 86400000)
+				if (created.getMinutes() < 10 )
+					dtString = created.getHours()+":0"+created.getMinutes();
+				else
+					dtString = created.getHours()+":"+created.getMinutes();
+			else
+				dtString = created.getDate()+"/"+created.getMonth()+"/"+created.getFullYear();
+			retBuff += fl.td+dtString+'</td>';
+		}
+		if (preferences.modified =='1'){
+			var modified = new Date();
+			modified.setTime(file.modifd*1000);
+			if (file.modifd != "")
+				if (now.getTime() - modified.getTime() < 86400000)
+	                                if (modified.getMinutes() < 10)
+        	                                dtString = modified.getHours()+":0"+modified.getMinutes();
+                	                else
+						dtString = modified.getHours()+":"+modified.getMinutes();
+				else
+					dtString = modified.getDate()+"/"+modified.getMonth()+"/"+modified.getFullYear();
+			else
+				dtString = "";
+			retBuff += fl.td+dtString+'</td>';
+		}
+		if (preferences.owner =='1') retBuff += fl.td+file.owner+'</td>';
+		if (preferences.createdby_id =='1') retBuff += fl.td+file.creatdby+'</td>';
+		if (preferences.modifiedby_id =='1') retBuff += fl.td+file.modifdby+'</td>';
+		if (preferences.comment =='1') retBuff += fl.td+'<input id="'+file.name+'" class="inputComment" onblur="setComments(this)" value="'+file.comm+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>';
+		if (preferences.version =='1') retBuff += fl.td+'<span onclick="loadHistory(\''+file.name+'\')">'+file.vers+'</span></td>';
+		return retBuff;
+}
 folderList.prototype.drawFiles = function(data){
 	var fl = folderList;
@@ -259,55 +313,7 @@
 	for (var i=0; i < files.length; i++)
 	{
-		newpage += '<tr>'+fl.td;
-		newpage += '<input name="fileman" value="'+files[i].name+'" type="checkbox"></td>';
-		if (permissions['private']) {
-			newpage += '<td><img id="restrict_'+files[i].name+'" onclick="setRestricted(\''+files[i].name+'\')" ';
-			newpage += 'src="'+templatePath+'images/button_'+(files[i].pub == '1'?'lock':'unlock')+'.png"></td>';
-		}
-		else
-			newpage += '<td></td>';
-
-		if (files[i].mime == 'text/html')
-			newpage += '<td><a href="./index.php?menuaction=filemanager.uifilemanager.export&file='+base64_encode(files[i].name)+';path='+base64_encode(currentPath)+'"><img alt="'+get_lang('export')+'" title="'+get_lang('export')+'" src="'+templatePath+'images/button_export.png"></a></td>';
-		else
-			newpage += '<td></td>';
-		newpage += fl.td+'<img src="'+(files[i].icon)+'">';
-		newpage += '<a id="name_'+files[i].name+'" href="./index.php?menuaction=filemanager.uifilemanager.view&file='+base64_encode(files[i].name)+'&path='+base64_encode(currentPath)+'" target="_blank">'+files[i].name+'</a>&nbsp;</td>';
-		if (preferences.mime_type =='1') newpage += fl.td+files[i].mime+'</td>';
-		if (preferences.size =='1') newpage += fl.td+borkb(files[i].size)+'</td>';
-		var now = new Date();
-		var dtString = "";
-		if (preferences.created =='1') {
-			var created = new Date();
-			created.setTime(files[i].creatd*1000);
-			if (now.getTime() - created.getTime() < 86400000)
-				if (created.getMinutes() < 10 )
-					dtString = created.getHours()+":0"+created.getMinutes();
-				else
-					dtString = created.getHours()+":"+created.getMinutes();
-			else
-				dtString = created.getDate()+"/"+created.getMonth()+"/"+created.getFullYear();
-			newpage += fl.td+dtString+'</td>';
-		}
-		if (preferences.modified =='1'){
-			var modified = new Date();
-			modified.setTime(files[i].modifd*1000);
-			if (files[i].modifd != "")
-				if (now.getTime() - modified.getTime() < 86400000)
-	                                if (modified.getMinutes() < 10)
-        	                                dtString = modified.getHours()+":0"+modified.getMinutes();
-                	                else
-						dtString = modified.getHours()+":"+modified.getMinutes();
-				else
-					dtString = modified.getDate()+"/"+modified.getMonth()+"/"+modified.getFullYear();
-			else
-				dtString = "";
-			newpage += fl.td+dtString+'</td>';
-		}
-		if (preferences.owner =='1') newpage += fl.td+files[i].owner+'</td>';
-		if (preferences.createdby_id =='1') newpage += fl.td+files[i].creatdby+'</td>';
-		if (preferences.modifiedby_id =='1') newpage += fl.td+files[i].modifdby+'</td>';
-		if (preferences.comment =='1') newpage += fl.td+'<input id="'+files[i].name+'" class="inputComment" onblur="setComments(this)" value="'+files[i].comm+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>';
-		if (preferences.version =='1') newpage += fl.td+'<span onclick="loadHistory(\''+files[i].name+'\')">'+files[i].vers+'</span></td></tr>';
+		newpage += '<tr>';
+		newpage += fl.createLine(files[i]);
+		newpage += '</tr>';
 	}
 	else
@@ -402,5 +408,5 @@
 					var filename = nameLink.innerHTML;
 					inputName.value = filename;
-					inputName.onblur = function () { cExecute('./index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath),updateRename) };
+					inputName.onblur = function () { cExecute('./index.php?menuaction=filemanager.vfs_functions.rename&file='+base64_encode(this.id.substr(6))+'&to='+base64_encode(this.value)+"&path="+base64_encode(currentPath),handlerRename) };
 					nameLink.parentNode.appendChild(inputName);
 					nameLink.parentNode.removeChild(nameLink);
Index: /sandbox/filemanager/js/common_functions.js
===================================================================
--- /sandbox/filemanager/js/common_functions.js	(revision 1783)
+++ /sandbox/filemanager/js/common_functions.js	(revision 1784)
@@ -190,5 +190,5 @@
 }
 
-function updateRename(data) {
+function handlerRename(data) {
 	var returnVal = data.split(':');
 	if (data.indexOf("True") == 0){
