merge of Snippet fix
This commit is contained in:
parent
175622c23e
commit
67511cd89f
5 changed files with 49 additions and 3 deletions
|
|
@ -24,6 +24,7 @@
|
|||
Group matching.
|
||||
- fix [ 1397890 ] Can't click directly to page 2+ of a thread
|
||||
- fix [ 1328895 ] Page Redirect Asset Help File needs to be changed
|
||||
- fix [ 1423815 ] snippet v6.8.5
|
||||
|
||||
6.8.5
|
||||
- fix [ 1396957 ] Insufficient privileges check on the DataForm
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e
|
|||
sub getToolbar {
|
||||
my $self = shift;
|
||||
return undef if ($self->getToolbarState);
|
||||
return $self->SUPER::getToolbar();
|
||||
return '<p>'.$self->SUPER::getToolbar().'</p>';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -164,7 +164,7 @@ sub view {
|
|||
my $calledAsWebMethod = shift;
|
||||
my $output = $self->get("snippet");
|
||||
WebGUI::Macro::process($self->session,\$output);
|
||||
$output = '<p>'.$self->getToolbar.'</p>'.$output if ($self->session->var->get("adminOn") && !$calledAsWebMethod);
|
||||
$output = $self->getToolbar.$output if ($self->session->var->get("adminOn") && !$calledAsWebMethod);
|
||||
return $output unless ($self->getValue("processAsTemplate"));
|
||||
return WebGUI::Asset::Template->processRaw($self->session, $output);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ checkModule("LWP",5.80);
|
|||
checkModule("HTTP::Request",1.40);
|
||||
checkModule("HTTP::Headers",1.61);
|
||||
checkModule("Test::More",0.61,1);
|
||||
checkModule("Test::MockObject",1.02,1);
|
||||
checkModule("Pod::Coverage",0.17,2);
|
||||
checkModule("Text::Balanced",1.95,1);
|
||||
checkModule("Digest::MD5",2.20);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ use lib "$FindBin::Bin/../lib";
|
|||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
|
||||
use Test::More tests => 26; # increment this value for each test you create
|
||||
use Test::More tests => 63; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -52,3 +52,41 @@ is($session->datetime->secondsToTime(60*60*8),"08:00:00", "secondsToTime()");
|
|||
is($session->datetime->setToEpoch("2001-08-16 08:00:00"), $wgbday, "setToEpoch()");
|
||||
ok($session->datetime->time() > $wgbday,"time()");
|
||||
is($session->datetime->timeToSeconds("08:00:00"), 60*60*8, "timeToSeconds()");
|
||||
|
||||
my %conversion = (
|
||||
"%c" => "%B",
|
||||
"%C" => "%b",
|
||||
"%d" => "%d",
|
||||
"%D" => "%e",
|
||||
"%h" => "%I",
|
||||
"%H" => "%l",
|
||||
"%j" => "%H",
|
||||
"%J" => "%k",
|
||||
"%m" => "%m",
|
||||
"%M" => "%_varmonth_",
|
||||
"%n" => "%M",
|
||||
"%O" => "%z",
|
||||
"%p" => "%P",
|
||||
"%P" => "%p",
|
||||
"%s" => "%S",
|
||||
"%w" => "%A",
|
||||
"%W" => "%a",
|
||||
"%y" => "%Y",
|
||||
"%Y" => "%y"
|
||||
);
|
||||
|
||||
diag("check WebGUI to DateTime conversion");
|
||||
foreach my $wg (keys %conversion) {
|
||||
is( $session->datetime->wgToDt($wg), $conversion{$wg},
|
||||
sprintf "WG to DT format conversion: %s => %s", $wg, $conversion{$wg});
|
||||
}
|
||||
|
||||
%conversion = reverse %conversion;
|
||||
|
||||
delete $conversion{'%_varmonth_'};
|
||||
|
||||
diag("check DateTime to WebGUI conversion");
|
||||
foreach my $dt (keys %conversion) {
|
||||
is( $session->datetime->dtToWg($dt), $conversion{$dt},
|
||||
sprintf "WG to DT format conversion: %s => %s", $dt, $conversion{$dt});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,6 +148,12 @@ sub label_finder_pm {
|
|||
|
||||
sub obj_finder_pm {
|
||||
next unless /\.pm$/;
|
||||
warn "filename: $File::Find::name\n";
|
||||
if ($File::Find::name =~ m#(?:Help|i18n)/?$#) {
|
||||
warn "Pruned $File::Find::name\n";
|
||||
$File::Find::prune=1;
|
||||
return;
|
||||
}
|
||||
open my $pmf, $_
|
||||
or die "unable to open file $File::Find::name: $!\n";
|
||||
my $libFile = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue