bugfix [ 912400 ] db link not working
This commit is contained in:
parent
3f8162519f
commit
2e240b8cda
5 changed files with 9 additions and 11 deletions
|
|
@ -154,7 +154,7 @@ sub dbh {
|
|||
$dsn = $class->{_databaseLink}{DSN};
|
||||
$username = $class->{_databaseLink}{username};
|
||||
$identifier = $class->{_databaseLink}{identifier};
|
||||
if ($class->{databaseLinkId} == 0) {
|
||||
if ($class->{_databaseLinkId} == 0) {
|
||||
$class->{_dbh} = $session{dbh};
|
||||
return $session{dbh};
|
||||
} elsif ($dsn =~ /\DBI\:\w+\:\w+/i) {
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ The unique identifier for the selected template. Defaults to "0", which is the W
|
|||
=cut
|
||||
|
||||
sub databaseLink {
|
||||
my $value = $_[0]->{value} || 1;
|
||||
my $value = $_[0]->{value} || 0;
|
||||
my $name = $_[0]->{name} || "databaseLinkId";
|
||||
return selectList({
|
||||
name=>$name,
|
||||
|
|
|
|||
|
|
@ -536,14 +536,10 @@ sub databaseLink {
|
|||
if (_uiLevelChecksOut($uiLevel)) {
|
||||
$label = $label || WebGUI::International::get(1075);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
#disabled until we can resolve the "new" wobject problem
|
||||
#if ($afterEdit) {
|
||||
# $subtext = '<a href="'.WebGUI::URL::page("op=editDatabaseLink&lid=".$value
|
||||
# ."&afterEdit="
|
||||
# .WebGUI::URL::escape($afterEdit)).'">'.WebGUI::International::get(0).'</a> / ';
|
||||
#}
|
||||
$subtext .= '<a href="'.WebGUI::URL::page("op=listDatabaseLinks").'">'
|
||||
.WebGUI::International::get(981).'</a>';
|
||||
if ($afterEdit) {
|
||||
$subtext = editIcon("op=editDatabaseLink&lid=".$value."&afterEdit=".WebGUI::URL::escape($afterEdit));
|
||||
}
|
||||
$subtext .= manageIcon("op=listDatabaseLinks");
|
||||
}
|
||||
$output = WebGUI::Form::databaseLink({
|
||||
"name"=>$name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue