a few last second bug fixes

This commit is contained in:
JT Smith 2004-07-14 19:40:01 +00:00
parent 0527e7bf39
commit efbb31b7dc
6 changed files with 6 additions and 35 deletions

View file

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

View file

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

View file

@ -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);
}

View file

@ -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';

View file

@ -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).", ".

View file

@ -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)});
}