diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index 264d2552d..94559421a 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -417,7 +417,6 @@ sub recoverPasswordFinish { $flag = 0; while (($username,$userId) = $sth->array) { my $len = $session{setting}{webguiPasswordLength} || 6; - my $len = 6; $password = ""; for(my $i = 0; $i < $len; $i++) { $password .= chr(ord('A') + randint(32)); diff --git a/lib/WebGUI/Macro/AdminBar.pm b/lib/WebGUI/Macro/AdminBar.pm index fbbc49c48..c1d588aab 100644 --- a/lib/WebGUI/Macro/AdminBar.pm +++ b/lib/WebGUI/Macro/AdminBar.pm @@ -66,7 +66,7 @@ sub process { %hash = sortHash(%hash); $var{'addcontent.label'} = WebGUI::International::get(1); my @addcontent; - my $i = 0; + $i = 0; foreach my $key (keys %hash) { push(@addcontent,{ 'contenttype.url'=>$key, diff --git a/lib/WebGUI/Wobject.pm b/lib/WebGUI/Wobject.pm index 9c9e5a7ff..2cbbef435 100644 --- a/lib/WebGUI/Wobject.pm +++ b/lib/WebGUI/Wobject.pm @@ -831,7 +831,7 @@ sub processTemplate { my $self = shift; my $templateId = shift; my $var = shift; - my $namespace = shift; + my $namespace = shift || $self->get("namespace"); my %vars = ( %{$self->{_property}}, %{$var} @@ -841,7 +841,6 @@ sub processTemplate { my ($originalPageURL) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=".$self->get("pageId"),WebGUI::SQL->getSlave); $vars{originalURL} = WebGUI::URL::gateway($originalPageURL."#".$self->get("wobjectId")); } - my $namespace = $namespace || $self->get("namespace"); return WebGUI::Template::process($templateId,$namespace, \%vars); } diff --git a/lib/WebGUI/Wobject/IndexedSearch.pm b/lib/WebGUI/Wobject/IndexedSearch.pm index 337a89675..d27f91f48 100644 --- a/lib/WebGUI/Wobject/IndexedSearch.pm +++ b/lib/WebGUI/Wobject/IndexedSearch.pm @@ -494,7 +494,6 @@ sub _getContentTypes { 'content' => WebGUI::International::get(21,$self->get("namespace")), 'discussion' => WebGUI::International::get(892), 'profile' => WebGUI::International::get(22,$self->get("namespace")), - #'help' => WebGUI::International::get(93), 'any' => WebGUI::International::get(23,$self->get("namespace")), ); tie my %contentTypes, 'Tie::IxHash'; diff --git a/lib/WebGUI/Wobject/IndexedSearch/Search.pm b/lib/WebGUI/Wobject/IndexedSearch/Search.pm index 8462fb70e..f03c7a07a 100644 --- a/lib/WebGUI/Wobject/IndexedSearch/Search.pm +++ b/lib/WebGUI/Wobject/IndexedSearch/Search.pm @@ -459,7 +459,7 @@ sub indexDocument { quote($self->getIndexName).", ". ($document->{pageId} || 0).", ". ($document->{wobjectId} || 0).", ". - ($document->{languageId} || quote('')).", ". + quote($document->{languageId}).", ". quote($document->{namespace} || 'WebGUI')." , ". quote($document->{location}).", ". ($document->{page_groupIdView} || 7).", ". diff --git a/sbin/Hourly/IndexedSearch_buildIndex.pm b/sbin/Hourly/IndexedSearch_buildIndex.pm index 752c4f344..bad963c1b 100644 --- a/sbin/Hourly/IndexedSearch_buildIndex.pm +++ b/sbin/Hourly/IndexedSearch_buildIndex.pm @@ -162,35 +162,6 @@ sub getIndexerParams { headerShortcut => 'select subject from forumPost where forumPostId = $data{forumPostId}', bodyShortcut => 'select message from forumPost where forumPostId = $data{forumPostId}', }, - help => { - sql => "select distinct(page.languageId) as languageId, - title.message as title, - body.message as body, - help.helpId as hid, - help.titleId as titleId, - help.bodyId as bodyId, - help.namespace as namespace, - 1 as pageId, - 7 as page_groupIdView, - 7 as wobject_groupIdView, - 7 as wobject_special_groupIdView - from help, page - left join international body on bodyId = body.internationalId - and help.namespace = body.namespace - and page.languageId = body.languageId - left join international title on titleId = title.internationalId - and help.namespace = title.namespace - and page.languageId = title.languageId - where body.languageId = title.languageId", - fieldsToIndex => ["title", "body"], - contentType => 'help', - url => '"?op=viewHelp&hid=$data{hid}&namespace=$data{namespace}"', - headerShortcut => q/select message from international where languageId=$data{languageId} - and namespace='$data{namespace}' and internationalId=$data{titleId}/, - bodyShortcut => q/select message from international where languageId=$data{languageId} - and namespace='$data{namespace}' and internationalId=$data{bodyId}/, - - }, userProfileData => { sql => "select distinct(userProfileData.userId), userProfileData.userId as ownerId, @@ -224,6 +195,9 @@ sub getIndexerParams { ); foreach my $wobject (@{$session{config}{wobjects}}) { my $cmd = "WebGUI::Wobject::".$wobject; + my $load = 'use '.$cmd; + eval($load); + WebGUI::ErrorHandler::warn("Wobject failed to compile: $cmd.".$@) if($@); my $w = $cmd->new({wobjectId=>"new",namespace=>$wobject}); %params = (%params, %{$w->getIndexerParams($now)}); }