bug fixes

This commit is contained in:
JT Smith 2005-03-07 19:38:17 +00:00
parent d7d6819204
commit 88c42da7a0
14 changed files with 59 additions and 23 deletions

View file

@ -4,6 +4,10 @@
the start date.
- fix [ 1157202 ] users can add themselves to Admins group
- fix [ 1157218 ] user cannot view it's own profile
- fix [ 1157195 ] Problem with request when saving profile
- fix [ 1158117 ] Help Index Unavailable from RWG
- fix [ 1157453 ] Error on Edit Template / Save and Cancel
- fix [ 1157434 ] [CVS 6.5]edit question controls have incorrect URL in Survey
6.4.0

View file

@ -1,4 +1,4 @@
insert into webguiVersion values ('6.5.0','upgrade',unix_timestamp());
alter table asset add column isPrototype int not null default 0;
alter table asset add index isPrototype_className_assetId (isPrototype,className,assetId);
update Folder set templateId='PBtmpl0000000000000078' where templateId='';

View file

@ -225,7 +225,7 @@ sub getAdminFunction {
},
icon=>"help.gif",
op=>"viewHelpIndex",
group=>"12"
group=>"7"
},
"statistics"=>{
title=>{

View file

@ -455,20 +455,22 @@ sub getThumbnailUrl {
#-------------------------------------------------------------------
sub getUploadControl {
my $self = shift;
my $maxAttachments = $self->getThread->getParent->getValue("attachmentsPerPost");
my $uploadControl;
return undef unless ($maxAttachments);
if ($self->get("storageId")) {
my $i;
foreach my $filename (@{$self->getStorageLocation->getFiles}) {
$uploadControl .= '<a href="'.$self->getStorageLocation->getUrl($filename).'">'.$filename.'</a><br />';
$i++;
}
return $uploadControl unless ($i < $self->getThread->getParent->get("attachmentsPerPost"));
return $uploadControl unless ($i < $maxAttachments);
}
WebGUI::Style::setScript($session{config}{extrasURL}.'/FileUploadControl.js',{type=>"text/javascript"});
$uploadControl .= '<div id="fileUploadControl"> </div>
<script>
var images = new Array();
var fileLimit = '.$self->getThread->getParent->get("attachmentsPerPost").';
var fileLimit = '.$maxAttachments.';
';
opendir(DIR,$session{config}{extrasPath}.'/fileIcons');
my @files = readdir(DIR);
@ -817,15 +819,16 @@ sub www_edit {
.WebGUI::Form::hidden({
name=>"func",
value=>"add"
})
.WebGUI::Form::hidden({
name=>"assetId",
value=>"new"
})
.WebGUI::Form::hidden({
name=>"class",
value=>$session{form}{class}
});
$var{'isNewPost'} = 1;
$var{'form.header'} .= WebGUI::Form::hidden({
name=>"assetId",
value=>"new"
}).WebGUI::Form::hidden({
name=>"class",
value=>$session{form}{class}
});
if ($session{form}{class} eq "WebGUI::Asset::Post") { # new reply
$self->{_thread} = $self->getParent->getThread;
return WebGUI::Privilege::insufficient() unless ($self->getThread->canReply);
@ -859,7 +862,7 @@ sub www_edit {
name=>"subscribe",
value=>$session{form}{subscribe} || 1
});
}
}
$content .= "\n\n".$session{user}{signature} if ($session{user}{signature});
} else { # edit
return WebGUI::Privilege::insufficient() unless ($self->canEdit);

View file

@ -559,10 +559,10 @@ sub view {
while (my %data = $sth->hash) {
push(@edit,{
'question.edit.controls'=>
deleteIcon('func=deleteQuestionConfirm&qid='.$data{Survey_questionId}, $self->getUrl, WebGUI::International::get(44,'Survey')).
editIcon('func=editQuestion&qid='.$data{Survey_questionId}, $self->getUrl).
moveUpIcon('func=moveQuestionUp&qid='.$data{Survey_questionId}, $self->getUrl).
moveDownIcon('func=moveQuestionDown&qid='.$data{Survey_questionId}, $self->getUrl),
deleteIcon('func=deleteQuestionConfirm&qid='.$data{Survey_questionId}, $self->get("url"), WebGUI::International::get(44,'Survey')).
editIcon('func=editQuestion&qid='.$data{Survey_questionId}, $self->get("url")).
moveUpIcon('func=moveQuestionUp&qid='.$data{Survey_questionId}, $self->get("url")).
moveDownIcon('func=moveQuestionDown&qid='.$data{Survey_questionId}, $self->get("url")),
'question.edit.question'=>$data{question},
'question.edit.id'=>$data{Survey_questionId}
});

View file

@ -213,7 +213,7 @@ sub _tableFormRow {
unless ($_[0]->{_noTable}) {
my $class = $_[0]->{_class};
$class = qq| class="$class" | if($class);
return '<tr'.$class.'><td class="formDescription" valign="top">'.$_[1].'</td><td class="tableData">'.$_[2]."</td></tr>\n";
return '<tr'.$class.'><td class="formDescription" valign="top">'.$_[1].'</td><td class="tableData" style="width: 95%;">'.$_[2]."</td></tr>\n";
} else {
return $_[2];
}

View file

@ -53,7 +53,7 @@ sub www_auth {
my $auth;
($auth) = WebGUI::SQL->quickArray("select authMethod from users where username=".quote($session{form}{username})) if($session{form}{username});
my $authMethod = getInstance($auth);
my $methodCall = $session{form}{method} || $_[0];
my $methodCall = $session{form}{method} || $_[0] || "init";
if(!$authMethod->isCallable($methodCall)){
WebGUI::ErrorHandler::security("access uncallable auth method on page '".$session{page}{title}."' [".$session{page}{pageId}."].");
return WebGUI::International::get(1077);

View file

@ -46,7 +46,7 @@ sub _seeAlso {
#-------------------------------------------------------------------
sub www_viewHelp {
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(12));
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(7));
my $ac = WebGUI::AdminConsole->new("help");
my $namespace = $session{form}{namespace} || "WebGUI";
my $help = _get($session{form}{hid},$namespace);
@ -63,7 +63,7 @@ sub www_viewHelp {
#-------------------------------------------------------------------
sub www_viewHelpIndex {
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(12));
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(7));
my %helpIndex;
tie %helpIndex, "Tie::IxHash";
my $i;

View file

@ -215,7 +215,7 @@ sub www_editProfileSave {
foreach $fieldName (keys %{$profile}) {
$u->profileField($fieldName,WebGUI::HTML::filter(${$profile}{$fieldName},"javascript"));
}
return WebGUI::Operation::Auth::www_displayAccount();
return WebGUI::Operation::Auth::www_auth();
}
#-------------------------------------------------------------------

View file

@ -501,7 +501,7 @@ each wobject under the tab &quot;Metadata&quot; in the wobject properties.</p>
'493' => {
lastUpdated => 1031514049,
message => q|Back to site.|
}
},
'encrypt page' => {
message => q|Encrypt content?|,
lastUpdated =>1092748557,

View file

@ -1,7 +1,7 @@
package WebGUI::UploadsAccessHandler;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2004 Plain Black Corporation.
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 1,023 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

@ -18,6 +18,7 @@ function toggleTab(i){
document.getElementById('tab'+i).className = 'tab tabActive';
document.getElementById('tab'+i).onmouseover = '';
document.getElementById('tab'+i).onmouseout = '';
fixFckEditor();
}
}
@ -25,4 +26,32 @@ function initTabs () {
toggleTab(1);
}
function fixFckEditor() {
if ( !document.all && FCKeditorAPI) {
for ( var o in FCKeditorAPI.__Instances ) {
var oEditor = FCKeditorAPI.__Instances[ o ] ;
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) {
oEditor.SwitchEditMode() ;
//oEditor.SwitchEditMode() ;
}
}
}
}
function fixFckEditor1 () {
for (i=0;i<document.forms.length; i++) {
for (j=0; j< document.forms[i].elements.length; j++) {
if (document.forms[i].elements[j].type == "textarea") {
if ( !document.all ) {
var oEditor = FCKeditorAPI.GetInstance( document.forms[i].elements[j].name ) ;
if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) {
oEditor.SwitchEditMode() ;
// oEditor.SwitchEditMode() ;
}
}
//alert("found a text area - value = " + document.forms[i].elements[j].value);
}
}
}
}