bugfix [ 912400 ] db link not working

This commit is contained in:
JT Smith 2004-03-25 19:52:19 +00:00
parent 3f8162519f
commit 2e240b8cda
5 changed files with 9 additions and 11 deletions

View file

@ -10,7 +10,8 @@ Andreas Graf).
- Bugfix [ 904313 ] Problem with page-template preview in 6.0.0
- Bugfix [ 912017 ] viewSubmission function error in 6.0.0
- Bugfix [ 912217 ] top level nav macro problems
- Bugfix [ 912401 ] level 0 nav
- Bugfix [ 912400 ] db link not working
6.0.0

View file

@ -79,4 +79,5 @@ INSERT INTO international VALUES (1095,'WebGUI',1,'<P>The general idea behind th
INSERT INTO international VALUES (1096,'WebGUI',1,'Navigation Template',1078207966,NULL);
INSERT INTO international VALUES (1097,'WebGUI',1,'<STRONG>config.button</STRONG>&nbsp;<BR>A \"Edit / Manage\" button for this navigation item.<BR>\r\n<P><STRONG>page_loop</STRONG><BR>A loop containing page information.</P>\r\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\">\r\n<P dir=ltr><STRONG>page.menuTitle<BR></STRONG>The menu title of this page.</P>\r\n<P dir=ltr><STRONG>page.title<BR></STRONG>The title of this page.</P>\r\n<P><STRONG>page.urlizedTitle<BR></STRONG>The urlized title of this pagepage.url.</P>\r\n<P><STRONG>page.url<BR></STRONG>The url of this page.</P>\r\n<P dir=ltr><STRONG>page.pageId</STRONG><BR>The pageId of this page.</P>\r\n<P dir=ltr><STRONG>page.parentId</STRONG><BR>The ParentId&nbsp;of this page.</P>\r\n<P dir=ltr><STRONG>page.ownerId<BR></STRONG>The ownerId of this page.</P>\r\n<P dir=ltr><STRONG>page.synopsis<BR></STRONG>The synopsis of this page.</P>\r\n<P dir=ltr><STRONG>page.newWindow</STRONG><BR>A condition indicating whether this page should be opened in a new window.</P>\r\n<P dir=ltr><STRONG>page.absDepth</STRONG><BR>The absolute depth of this page&nbsp;(relative to nameless root).</P>\r\n<P><STRONG>page.relDepth</STRONG><BR>The relative depth of this page (relative to starting point).</P>\r\n<P><STRONG>page.isCurrent</STRONG><BR>A condition indicating whether this page is current page.</P>\r\n<P><STRONG>page.isHidden</STRONG><BR>A condition indicating whether this page is a hidden page.<BR><EM>(Note: This variable is only visible if \"Show hidden pages\" is switched on.)</EM></P>\r\n<P><STRONG>page.isSystem</STRONG><BR>A condition indicating whether this page is a system page (Trash, Clipboard, etc).<BR><EM>(Note: This variable is only visible if \"Show system pages\" is switched on.)</EM></P>\r\n<P><STRONG>page.isViewable<BR></STRONG>A condition indicating whether the user has permission to view it.<BR><EM>(Note: This variable is only visible if \"Show unprivileged pages\" is switched on.)</EM></P>\r\n<P><STRONG>page.indent<BR></STRONG>A variable containing the indent for current page. The default indent is three spaces. Use the <STRONG>page.indent_loop </STRONG>if you need a more flexible indent.</P>\r\n<P><STRONG>page.indent_loop<BR></STRONG>A loop that runs <STRONG>page.relDepth </STRONG>times.</P>\r\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\">\r\n<P><STRONG>indent</STRONG><BR>A number representing the loop count. </P></BLOCKQUOTE>\r\n<P dir=ltr><STRONG>page.isRoot</STRONG><BR>A condition indication whether this page is a root page.</P>\r\n<P dir=ltr><STRONG>page.isTop</STRONG><BR>A condition indication whether this page is a top page (daughter of root).</P>\r\n<P dir=ltr><STRONG>page.hasDaughter</STRONG><BR>A condition indication whether this page has a daughter. In other words: It evaluates to true if this page is a mother.</P>\r\n<P dir=ltr><STRONG>page.isMyDaughter</STRONG><BR>A condition indication whether this page is a daughter of current page.</P>\r\n<P dir=ltr><STRONG>page.isMyMother<BR></STRONG>A condition indication whether this page is the mother of current page.</P>\r\n<P dir=ltr><STRONG>page.mother.title<BR></STRONG>The title of the mother of this&nbsp;page.</P>\r\n<P dir=ltr><STRONG>page.mother.urlizedTitle<BR></STRONG>The urlized title of the mother of this page.</P>\r\n<P dir=ltr><STRONG>page.mother.pageId</STRONG><BR>The pageId of the mother of this page.</P>\r\n<P dir=ltr><STRONG>page.mother.parentId</STRONG><BR>The parentId of the mother of this page.</P>\r\n<P dir=ltr><STRONG>page.depthIs1 , page.depthIs2 , page.depthIs3 , page.depthIs4 , page.depthIsN<BR></STRONG>A condition indicating whether the depth of this page is N. This variable is useful if you want to style a certain level.</P>\r\n<P dir=ltr>&lt;tmpl_if page.depthIs1&gt;<BR>&nbsp;&nbsp; &lt;img src=\"level1.gif\"&gt;<BR>&lt;tmpl_else&gt;<BR>&nbsp;&nbsp; &lt;img src=\"defaultBullet.gif\"&gt;<BR>&lt;/tmpl_if&gt;</P>\r\n<P dir=ltr><STRONG>page.relativeDepthIs1 , page.relativeDepthIs2 , page.relativeDepthIs3 , page.relativeDepthIsN</STRONG><BR>A condition indicating whether the relative depth of this page is N.</P></BLOCKQUOTE>\r\n<P dir=ltr>&nbsp;</P>',1078207966,NULL);
update Navigation set depth=99 where depth=0;
delete from international where internationalId=981 and namespace='WebGUI';

View file

@ -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) {

View file

@ -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,

View file

@ -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&amp;lid=".$value."&amp;afterEdit=".WebGUI::URL::escape($afterEdit));
}
$subtext .= manageIcon("op=listDatabaseLinks");
}
$output = WebGUI::Form::databaseLink({
"name"=>$name,