From 361a9ee684fa8774b8ac9d701f64f42f24a91f2f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 14 Oct 2004 04:59:52 +0000 Subject: [PATCH] More GUID string vs numeric comparisons --- lib/WebGUI/Page.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Page.pm b/lib/WebGUI/Page.pm index 5597d4f75..ac695e719 100644 --- a/lib/WebGUI/Page.pm +++ b/lib/WebGUI/Page.pm @@ -143,7 +143,7 @@ sub _processWobjectFunctions { } } if ($wobject) { - if (${$wobject}{pageId} != $session{page}{pageId}) { + if (${$wobject}{pageId} ne $session{page}{pageId}) { ($proxyWobjectId) = WebGUI::SQL->quickArray("select wobject.wobjectId from wobject,WobjectProxy where wobject.wobjectId=WobjectProxy.wobjectId @@ -151,9 +151,9 @@ sub _processWobjectFunctions { and WobjectProxy.proxiedWobjectId=".quote(${$wobject}{wobjectId}),WebGUI::SQL->getSlave); ${$wobject}{_WobjectProxy} = $proxyWobjectId; } - unless (${$wobject}{pageId} eq $session{page}{pageId} - || ${$wobject}{pageId} == 2 - || ${$wobject}{pageId} == 3 + unless (${$wobject}{pageId} eq $session{page}{pageId} + || ${$wobject}{pageId} eq '2' + || ${$wobject}{pageId} eq '3' || ${$wobject}{_WobjectProxy} ne "") { $output .= WebGUI::International::get(417); WebGUI::ErrorHandler::security("access wobject [".$session{form}{wid}."] on page '" @@ -1191,7 +1191,7 @@ sub moveUp { return 0 if (!defined $mother); # Don't allow to move up if node is already a webguiroot; - return 0 if ($mother->get('pageId') =~ /^\d+$/ && $mother->get('pageId') == 0); + return 0 if ($mother->get('pageId') eq "0"); # Update depth, we do this before the move because now we know the nestedSetRight range of nodes # that change in depth.