From d56c1a3d49b09e9f6a1c6f1160fbe7d6cd88e789 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 25 Oct 2004 21:49:52 +0000 Subject: [PATCH] GUID comparison fixes from sf bug 1053187 --- docs/changelog/6.x.x.txt | 3 ++- lib/WebGUI/Macro/H_homeLink.pm | 2 +- lib/WebGUI/Page.pm | 2 +- lib/WebGUI/Persistent/Tree.pm | 2 +- lib/WebGUI/Wobject/HttpProxy.pm | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 6ac142fde..69d2d959d 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -7,7 +7,8 @@ - Fixed typo in Wobjects/IndexedSearch.pm - Navigation template variable rename, added template variables for basepage.hasDaughter, page.inRoot. - - Lots of GUID changes in Perl and SQL code. + - Lots of GUID changes in Perl and SQL code, including: + bugfix [1053187] 6.2.7 diff --git a/lib/WebGUI/Macro/H_homeLink.pm b/lib/WebGUI/Macro/H_homeLink.pm index 10afa2f31..462c92845 100644 --- a/lib/WebGUI/Macro/H_homeLink.pm +++ b/lib/WebGUI/Macro/H_homeLink.pm @@ -20,7 +20,7 @@ use WebGUI::SQL; sub process { my (@param, $temp); @param = WebGUI::Macro::getParams($_[0]); - if ($session{setting}{defaultPage} == $session{page}{pageId}) { + if ($session{setting}{defaultPage} eq $session{page}{pageId}) { $temp = $session{page}{urlizedTitle}; } else { ($temp) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=".quote($session{setting}{defaultPage}),WebGUI::SQL->getSlave); diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index ac695e719..a81583393 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -1562,7 +1562,7 @@ sub traversePreOrder { @pages = $self->self_and_descendants; # The 'ueber'-root contains no data so we do not want to return i! - shift @pages if ($pages[0]->{'pageId'} == 0); + shift @pages if ($pages[0]->{'pageId'} eq 0); foreach (@pages) { $page = WebGUI::Page->new($_->{'pageId'}); diff --git a/lib/WebGUI/Persistent/Tree.pm b/lib/WebGUI/Persistent/Tree.pm index 2aa1291f4..e936abbfc 100644 --- a/lib/WebGUI/Persistent/Tree.pm +++ b/lib/WebGUI/Persistent/Tree.pm @@ -88,7 +88,7 @@ sub buildTree { foreach my $obj (grep {$_} @$objs) { $nodes->{$obj->get($keyColumn)} = $obj; $obj->{daughters} ||= []; - next if ($obj->get('parentId') == $obj->get($keyColumn)); + next if ($obj->get('parentId') eq $obj->get($keyColumn)); push @{ $parentToChild{$obj->get('parentId')} }, $obj; } diff --git a/lib/WebGUI/Wobject/HttpProxy.pm b/lib/WebGUI/Wobject/HttpProxy.pm index d6e28db3d..57c5ff413 100644 --- a/lib/WebGUI/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Wobject/HttpProxy.pm @@ -155,7 +155,7 @@ sub www_view { $cookiebox = $node->getPath.$session{os}{slash}.$cookiebox; my $jar = HTTP::Cookies->new(File => $cookiebox, AutoSave => 1, Ignore_Discard => 1); - if($session{form}{wid} == $_[0]->get("wobjectId") && $session{form}{func}!~/editSave/i) { + if($session{form}{wid} eq $_[0]->get("wobjectId") && $session{form}{func}!~/editSave/i) { $proxiedUrl = $session{form}{FormAction} || $session{form}{proxiedUrl} || $_[0]->get("proxiedUrl") ; } else { $proxiedUrl = $_[0]->get("proxiedUrl"); @@ -194,7 +194,7 @@ sub www_view { if($session{env}{REQUEST_METHOD}=~/GET/i || $redirect != 0) { # request_method is also GET after a redirection. Just to make sure we're # not posting the same data over and over again. - if($redirect == 0 && $session{form}{wid} == $_[0]->get("wobjectId")) { + if($redirect == 0 && $session{form}{wid} eq $_[0]->get("wobjectId")) { foreach my $input_name (keys %{$session{form}}) { next if ($input_name !~ /^HttpProxy_/); # Skip non proxied form var's $input_name =~ s/^HttpProxy_//;