Răsfoiți Sursa

change the mode of temporarily disabling file uploads

Juan Carlos Raña 14 ani în urmă
părinte
comite
c40926d29a

+ 11 - 4
main/inc/lib/svg-edit/extensions/fileopen.php

@@ -37,8 +37,15 @@ api_block_anonymous_users();
 		$info = getimagesize($file);
 		$prefix = 'data:' . $info['mime'] . ';base64,';
 	}
+	
+//disable upload files (IMPORT SVG FILES) for now. Chamilo
+	$file='';
+	$output='';
+	type='';
+	prefix='';
+//
 ?>
-<!--disable upload files (IMPORT SVG FILES) for now. Chamilo -->
-<!--<script>
-window.top.window.svgEditor.processFile("<?php // echo $prefix . base64_encode($output); ?>", "<?php // echo $type ?>");
-</script>   -->
+
+<script>
+window.top.window.svgEditor.processFile("<?php echo $prefix . base64_encode($output); ?>", "<?php echo $type ?>");
+</script>

+ 1 - 1
main/inc/lib/svg-edit/svg-editor.js

@@ -3443,7 +3443,7 @@
 			};
 			
 			Editor.openPrep = function(func) {
-				//return false;// temporal hack for Chamilo, add this line to disable open svg file
+				return false;// temporal hack for Chamilo, add this line to disable open svg file
 				$('#main_menu').hide();
 				if(undoMgr.getUndoStackSize() === 0) {
 					func(true);

+ 2 - 2
main/inc/lib/svg-edit/svg-editor.php

@@ -112,12 +112,12 @@ api_block_anonymous_users();
 				New Image [N]
 			</li>
 			
-			<!--<li id="tool_open" style="display:none;">
+			<li id="tool_open" style="display:none;">
 				<div id="fileinputs">
 					<div></div>
 				</div>
 				Open Image [O]
-			</li> --><!-- Disabled by now for Chamilo -->
+			</li>
 			
 			<li id="tool_import" style="display:none;">
 				<div id="fileinputs_import">