Ticket #348 (closed defect: fixed)

Opened 6 years ago

Last modified 15 months ago

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

Changed 6 years ago by NilsLindenberg

  • description modified (diff)

Changed 6 years ago by NilsLindenberg

  • description modified (diff)

Changed 6 years ago by DarTar

  • owner changed from unassigned to DarTar
  • status changed from new to assigned
  • milestone set to 1.1.7

Hmm, I'll have to look into this. Case A works as expected and it's not a bug, case B is more problematic.

Changed 5 years ago by NilsLindenberg

  • owner changed from DarTar to NilsLindenberg
  • status changed from assigned to new

Changed 5 years ago by NilsLindenberg

  • status changed from new to assigned

Changed 5 years ago by NilsLindenberg

  • status changed from assigned to closed
  • resolution set to fixed

fixed in [292]

Changed 3 years ago by DarTar

  • milestone changed from 1.2 to 1.3

Retargeting to 1.3, this ticket has already been closed in trunk, from which 1.3 will be branched. Consider backporting urgent issues to 1.2.X

Changed 15 months ago by BrianKoontz

  • milestone changed from 1.3 to 1.3.1

Changed milestone to 1.3.1

Note: See TracTickets for help on using tickets.