Added an error message to SQLForm if we can't find the privileges of the database link
fix: Sometimes the error message for the Calendar Update Feeds is part of the content response. fix: Serial workflows no longer get held up in the queue
This commit is contained in:
parent
5ee03110d7
commit
fe5bc93a52
5 changed files with 24 additions and 14 deletions
|
|
@ -35,6 +35,9 @@
|
|||
http://www.plainblack.com/bugs/tracker/help-link-broken-for-navigation-template
|
||||
- fix: HttpProxy no longer processes macros in proxied content
|
||||
http://www.plainblack.com/bugs/tracker/weird-characters-in-webgui.log-caused-by-http-proxy
|
||||
- Added an error message to SQLForm if we can't find any permissions for the
|
||||
database link.
|
||||
- fix: Calendar events do not show up on the last day of the month.
|
||||
|
||||
7.3.15
|
||||
- Added more documentation to WebGUI.pm
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ sub viewMonth {
|
|||
my $dt = WebGUI::DateTime->new($self->session, $params->{start});
|
||||
$dt->truncate( to => "month");
|
||||
my $start = $dt->toMysql;
|
||||
my $dtEnd = $dt->clone->add(months => 1)->add(seconds => -1);
|
||||
my $dtEnd = $dt->clone->add(months => 1);
|
||||
my $end = $dtEnd->toMysql;
|
||||
|
||||
my @events
|
||||
|
|
|
|||
|
|
@ -662,6 +662,14 @@ sub _databaseLinkHasPrivileges {
|
|||
}
|
||||
}
|
||||
|
||||
# Check if we found any privileges at all
|
||||
if (!@privileges) {
|
||||
$self->session->errorHandler->warn(
|
||||
"SQLForm: Could not find SQL privileges or no privileges on database '$databaseName' for user '".$dbLink->get->{username}."' with database link ID '".$dbLink->getId."' using DSN '".$dbLink->get->{dsn}."'"
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
||||
# Check if all required privs are present.
|
||||
return 1 if (isIn('ALL PRIVILEGES', @privileges));
|
||||
|
||||
|
|
|
|||
|
|
@ -85,8 +85,7 @@ sub execute {
|
|||
my $ua = LWP::UserAgent->new(agent => "WebGUI");
|
||||
my $dt = WebGUI::DateTime->new($session, time)->toMysql;
|
||||
|
||||
my $sth = $self->session->db->prepare("select * from Calendar_feeds");
|
||||
$sth->execute();
|
||||
my $sth = $self->session->db->read("select * from Calendar_feeds");
|
||||
|
||||
#use Data::Dumper;
|
||||
|
||||
|
|
@ -113,21 +112,21 @@ sub execute {
|
|||
|
||||
# Get the feed
|
||||
my $response = $ua->get($feed->{url});
|
||||
|
||||
|
||||
if ($response->is_success)
|
||||
{
|
||||
my $data = $response->content;
|
||||
{
|
||||
my $data = $response->content;
|
||||
|
||||
# If doesn't start with BEGIN:VCALENDAR then error
|
||||
unless ($data =~ /^BEGIN:VCALENDAR/i)
|
||||
{
|
||||
# Update the result and last updated fields
|
||||
# Update the result and last updated fields
|
||||
$self->session->db->write(
|
||||
"update Calendar_feeds set lastResult=?,lastUpdated=? where feedId=?",
|
||||
["Not an iCalendar feed",$dt,$feed->{feedId}]);
|
||||
next FEED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $active = 0; # Parser on/off
|
||||
my %current_event = ();
|
||||
|
|
@ -165,7 +164,6 @@ sub execute {
|
|||
# Flush old entry
|
||||
# KEY;ATTRIBUTE=VALUE;ATTRIBUTE=VALUE:KEYVALUE
|
||||
my ($key_attrs,$value) = split /:/,$current_entry,2;
|
||||
|
||||
my @attrs = split /;/, $key_attrs;
|
||||
my $key = shift @attrs;
|
||||
my %attrs;
|
||||
|
|
@ -377,12 +375,10 @@ sub execute {
|
|||
{
|
||||
# Update the result and last updated fields
|
||||
$self->session->db->write("update Calendar_feeds set lastResult=?,lastUpdated=? where feedId=?",
|
||||
[$response->message,$dt,$feed->{feedId}]);
|
||||
[($response->message || $response->content),$dt,$feed->{feedId}]);
|
||||
}
|
||||
}
|
||||
|
||||
$sth->finish;
|
||||
|
||||
return $self->COMPLETE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -273,8 +273,11 @@ sub run {
|
|||
return "disabled";
|
||||
}
|
||||
if ($workflow->get("isSerial")) {
|
||||
my ($firstId) = $self->session->db->quickArray("select workflowId from WorkflowInstance order by runningSince");
|
||||
if ($workflow->getId ne $firstId) { # must wait for currently running instance to complete
|
||||
my ($firstId) = $self->session->db->quickArray(
|
||||
"select instanceId from WorkflowInstance where workflowId=? order by runningSince",
|
||||
[$workflow->getId]
|
||||
);
|
||||
if ($self->getId ne $firstId) { # must wait for currently running instance to complete
|
||||
$self->set({lastStatus=>"waiting", notifySpectre=>0});
|
||||
return "waiting";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue