Changeset 7482
- Timestamp:
- May 14, 2018, 8:13:12 AM (5 years ago)
- Location:
- branches/3.12-stable/www/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.12-stable/www/common/import/index.jsp
r7201 r7482 189 189 190 190 cc.setObject("auto-detected-file", f); 191 cc.setObject("last-file-charset", charset); 191 192 int matches = plugins.size(); 192 193 if (matches == 0) -
branches/3.12-stable/www/common/plugin/configure.jsp
r7030 r7482 99 99 } 100 100 } 101 102 // Special handling for "charset" parameter to make it match the auto-selected file 103 if (currentContext != null && Parameters.CHARSET_PARAMETER.equals(pp.getName())) 104 { 105 Object charset = currentContext.getObject("last-file-charset"); 106 if (charset != null) values = Collections.singletonList(charset); 107 } 108 101 109 // Then, we check the parameters default value 102 110 if ((values == null || values.size() == 0) && pp.getDefaultValue() != null) … … 123 131 try 124 132 { 125 values.add(File.getById(dc, cc.getId()).getPath().toString()); 133 File file = File.getById(dc, cc.getId()); 134 values.add(file.getPath().toString()); 135 if (currentContext != null && file.getCharacterSet() != null) 136 { 137 currentContext.setObject("last-file-charset", file.getCharacterSet()); 138 } 126 139 } 127 140 catch (Throwable t)
Note: See TracChangeset
for help on using the changeset viewer.