Skip to content

Commit

Permalink
Item877: logic flipped
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/DBConnectorPlugin@2196 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
EugenMayer authored and EugenMayer committed Jan 27, 2009
1 parent bc8b6c8 commit 3353cf7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Foswiki/Plugins/DBConnectorPlugin.pm
Expand Up @@ -104,7 +104,7 @@ sub getValues {
my $fields = shift;
my $checkAccess = shift || 1;
my @fields = @{$fields};
_debug( "Getting values for$web.Topic - fields:", @fields );
_debug( "Getting values for $web.$topic - fields:", @fields );
if ( $checkAccess && !_hasAccess("VIEW") ) {

# no access;
Expand Down Expand Up @@ -204,12 +204,13 @@ sub _createEntryForTopicIfNotExitent {
my $created = 0;
my $result = getValues( $web, $topic, ["topic_id"], 0 );
if ( defined $result ) {
my $qry = "INSERT into $web (`$TableKeyField`) VALUES ('$topic')";
_debug("Inserting values: $qry");
$created = $DBC_con->do($qry);
_debug("no need to create, topic entry was there before");
}
else {
_debug("no need to create, topic entry was there before");
my $qry = "INSERT into $web (`$TableKeyField`) VALUES ('$topic')";
_debug("Inserting values: $qry");
$created = $DBC_con->do($qry);

}

# somehow this is not working. Any ideas?
Expand Down

0 comments on commit 3353cf7

Please sign in to comment.