Ticket #348 (closed defect: fixed)
Code grabber problems
| Reported by: | AlinElena | Owned by: | NilsLindenberg |
|---|---|---|---|
| Priority: | low | Milestone: | 1.3.1 |
| Component: | handlers | Version: | 1.1.6.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by NilsLindenberg) (diff)
Code tag % % ... % % problems
in version 1.1.6.2 using a code tag like this (A)
%%(cpp;test.cpp)
#include <iostream>
int main() {
std::cout <<"Hello World\n";
return 0;
}
%%
and then one like this (B)
%% some rubish %%
in situation A grab button will return you a file called test.cpp.txt (small issue here with the extra-extension)
solution: in file handlers/page/grabcode.php
%%(php;20)
// defaults
define('DEFAULT_FILENAME', 'codeblock.txt'); # default name for code blocks
define('FILE_EXTENSION', '.txt'); # extension appended to code block name
%%
should be changed to
%%(php;20)
// defaults
define('DEFAULT_FILENAME', 'codeblock.txt'); # default name for code blocks
define('FILE_EXTENSION', ''); # extension appended to code block name
%%
in situation B when you click grab you will get the same name for the file like in situation A (test.cpp.txt or test.cpp, if corrected) instead of what you would expect (some default name eg codeblock.txt)
Change History
Note: See
TracTickets for help on using
tickets.