a few last second bug fixes
This commit is contained in:
parent
0527e7bf39
commit
efbb31b7dc
6 changed files with 6 additions and 35 deletions
|
|
@ -417,7 +417,6 @@ sub recoverPasswordFinish {
|
||||||
$flag = 0;
|
$flag = 0;
|
||||||
while (($username,$userId) = $sth->array) {
|
while (($username,$userId) = $sth->array) {
|
||||||
my $len = $session{setting}{webguiPasswordLength} || 6;
|
my $len = $session{setting}{webguiPasswordLength} || 6;
|
||||||
my $len = 6;
|
|
||||||
$password = "";
|
$password = "";
|
||||||
for(my $i = 0; $i < $len; $i++) {
|
for(my $i = 0; $i < $len; $i++) {
|
||||||
$password .= chr(ord('A') + randint(32));
|
$password .= chr(ord('A') + randint(32));
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ sub process {
|
||||||
%hash = sortHash(%hash);
|
%hash = sortHash(%hash);
|
||||||
$var{'addcontent.label'} = WebGUI::International::get(1);
|
$var{'addcontent.label'} = WebGUI::International::get(1);
|
||||||
my @addcontent;
|
my @addcontent;
|
||||||
my $i = 0;
|
$i = 0;
|
||||||
foreach my $key (keys %hash) {
|
foreach my $key (keys %hash) {
|
||||||
push(@addcontent,{
|
push(@addcontent,{
|
||||||
'contenttype.url'=>$key,
|
'contenttype.url'=>$key,
|
||||||
|
|
|
||||||
|
|
@ -831,7 +831,7 @@ sub processTemplate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $templateId = shift;
|
my $templateId = shift;
|
||||||
my $var = shift;
|
my $var = shift;
|
||||||
my $namespace = shift;
|
my $namespace = shift || $self->get("namespace");
|
||||||
my %vars = (
|
my %vars = (
|
||||||
%{$self->{_property}},
|
%{$self->{_property}},
|
||||||
%{$var}
|
%{$var}
|
||||||
|
|
@ -841,7 +841,6 @@ sub processTemplate {
|
||||||
my ($originalPageURL) = WebGUI::SQL->quickArray("select urlizedTitle from page where pageId=".$self->get("pageId"),WebGUI::SQL->getSlave);
|
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"));
|
$vars{originalURL} = WebGUI::URL::gateway($originalPageURL."#".$self->get("wobjectId"));
|
||||||
}
|
}
|
||||||
my $namespace = $namespace || $self->get("namespace");
|
|
||||||
return WebGUI::Template::process($templateId,$namespace, \%vars);
|
return WebGUI::Template::process($templateId,$namespace, \%vars);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,6 @@ sub _getContentTypes {
|
||||||
'content' => WebGUI::International::get(21,$self->get("namespace")),
|
'content' => WebGUI::International::get(21,$self->get("namespace")),
|
||||||
'discussion' => WebGUI::International::get(892),
|
'discussion' => WebGUI::International::get(892),
|
||||||
'profile' => WebGUI::International::get(22,$self->get("namespace")),
|
'profile' => WebGUI::International::get(22,$self->get("namespace")),
|
||||||
#'help' => WebGUI::International::get(93),
|
|
||||||
'any' => WebGUI::International::get(23,$self->get("namespace")),
|
'any' => WebGUI::International::get(23,$self->get("namespace")),
|
||||||
);
|
);
|
||||||
tie my %contentTypes, 'Tie::IxHash';
|
tie my %contentTypes, 'Tie::IxHash';
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ sub indexDocument {
|
||||||
quote($self->getIndexName).", ".
|
quote($self->getIndexName).", ".
|
||||||
($document->{pageId} || 0).", ".
|
($document->{pageId} || 0).", ".
|
||||||
($document->{wobjectId} || 0).", ".
|
($document->{wobjectId} || 0).", ".
|
||||||
($document->{languageId} || quote('')).", ".
|
quote($document->{languageId}).", ".
|
||||||
quote($document->{namespace} || 'WebGUI')." , ".
|
quote($document->{namespace} || 'WebGUI')." , ".
|
||||||
quote($document->{location}).", ".
|
quote($document->{location}).", ".
|
||||||
($document->{page_groupIdView} || 7).", ".
|
($document->{page_groupIdView} || 7).", ".
|
||||||
|
|
|
||||||
|
|
@ -162,35 +162,6 @@ sub getIndexerParams {
|
||||||
headerShortcut => 'select subject from forumPost where forumPostId = $data{forumPostId}',
|
headerShortcut => 'select subject from forumPost where forumPostId = $data{forumPostId}',
|
||||||
bodyShortcut => 'select message 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 => {
|
userProfileData => {
|
||||||
sql => "select distinct(userProfileData.userId),
|
sql => "select distinct(userProfileData.userId),
|
||||||
userProfileData.userId as ownerId,
|
userProfileData.userId as ownerId,
|
||||||
|
|
@ -224,6 +195,9 @@ sub getIndexerParams {
|
||||||
);
|
);
|
||||||
foreach my $wobject (@{$session{config}{wobjects}}) {
|
foreach my $wobject (@{$session{config}{wobjects}}) {
|
||||||
my $cmd = "WebGUI::Wobject::".$wobject;
|
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});
|
my $w = $cmd->new({wobjectId=>"new",namespace=>$wobject});
|
||||||
%params = (%params, %{$w->getIndexerParams($now)});
|
%params = (%params, %{$w->getIndexerParams($now)});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue