fixed bug 654227
This commit is contained in:
parent
d241598851
commit
82c84b7000
12 changed files with 47 additions and 40 deletions
|
|
@ -8,6 +8,14 @@ versions. Be sure to heed the warnings contained herein as they will
|
|||
save you many hours of grief.
|
||||
|
||||
|
||||
4.9.4
|
||||
--------------------------------------------------------------------
|
||||
* The "extras" property in the config file has been renamed to
|
||||
"extrasURL". You also need to add an "extrasPath" to your
|
||||
config file that points to the server path of your extras
|
||||
folder.
|
||||
|
||||
|
||||
4.9.3
|
||||
--------------------------------------------------------------------
|
||||
* The import utilities imImport.pl and dmImport.pl have been
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ dsn = DBI:mysql:WebGUI
|
|||
dbuser = webgui
|
||||
dbpass = password
|
||||
logfile = /data/webgui.log
|
||||
extras = /extras
|
||||
extrasURL = /extras
|
||||
extrasPath = /data/WebGUI/www/extras
|
||||
uploadsURL = /uploads
|
||||
uploadsPath = /data/WebGUI/www/uploads
|
||||
#excludeMacro =
|
||||
#excludeWobject =
|
||||
#excludeHourly =
|
||||
#scripturl = /
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Displays the attachment in WebGUI's standard "Attachment Box".
|
|||
sub box {
|
||||
my ($output);
|
||||
$output = '<p><table cellpadding=3 cellspacing=0 border=1><tr><td class="tableHeader">'.
|
||||
'<a href="'.$_[0]->getURL.'"><img src="'.$session{config}{extras}.
|
||||
'<a href="'.$_[0]->getURL.'"><img src="'.$session{config}{extrasURL}.
|
||||
'/attachment.gif" border=0 alt="'.
|
||||
$_[0]->getFilename.'"></a></td><td><a href="'.$_[0]->getURL.
|
||||
'"><img src="'.$_[0]->getIcon.
|
||||
|
|
@ -230,7 +230,7 @@ Returns the full URL to the file icon for this attachment.
|
|||
sub getIcon {
|
||||
my ($extension, $icon);
|
||||
$extension = $_[0]->getType;
|
||||
$icon = $session{config}{extras}."/fileIcons/";
|
||||
$icon = $session{config}{extrasURL}."/fileIcons/";
|
||||
if (isIn($extension, qw(doc dot wri))) {
|
||||
$icon .= "doc.gif";
|
||||
} elsif (isIn($extension, qw(txt log sql config conf pm cnf readme))) {
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ sub date {
|
|||
extras=>$_[0]->{extras}
|
||||
});
|
||||
$output .= '<input type="button" style="font-size: 8pt;" onClick="window.dateField = this.form.'.
|
||||
$_[0]->{name}.';calendar = window.open(\''.$session{config}{extras}.
|
||||
$_[0]->{name}.';calendar = window.open(\''.$session{config}{extrasURL}.
|
||||
'/calendar.html\',\'cal\',\'WIDTH=200,HEIGHT=250\');return false" value="'.
|
||||
WebGUI::International::get(34).'">';
|
||||
return $output;
|
||||
|
|
@ -323,7 +323,7 @@ The number of characters wide this form element should be. There should be no re
|
|||
|
||||
sub email {
|
||||
my ($output);
|
||||
$output = '<script language="javascript" src="'.$session{config}{extras}.'/emailCheck.js"></script>';
|
||||
$output = '<script language="javascript" src="'.$session{config}{extrasURL}.'/emailCheck.js"></script>';
|
||||
$output .= text({
|
||||
name=>$_[0]->{name},
|
||||
value=>$_[0]->{value},
|
||||
|
|
@ -647,25 +647,25 @@ sub HTMLArea {
|
|||
var formObj;
|
||||
function openEditWindow(obj) {
|
||||
formObj = obj;
|
||||
window.open("'.$session{config}{extras}.'/eopro.html","editWindow","width=720,height=450,resizable=1");
|
||||
window.open("'.$session{config}{extrasURL}.'/eopro.html","editWindow","width=720,height=450,resizable=1");
|
||||
}
|
||||
</script>';
|
||||
} else {
|
||||
my $browser = HTTP::BrowserDetect->new($session{env}{HTTP_USER_AGENT});
|
||||
if ($browser->ie && $browser->version >= 5.5) {
|
||||
$output .= '<script language="Javascript1.2" src="'.$session{config}{extras}
|
||||
$output .= '<script language="Javascript1.2" src="'.$session{config}{extrasURL}
|
||||
.'/htmlArea/editor.js"></script>'."\n";
|
||||
$output .= '<script>'."\n";
|
||||
$output .= '_editor_url = "'.$session{config}{extras}.'/htmlArea/";'."\n";
|
||||
$output .= '_editor_url = "'.$session{config}{extrasURL}.'/htmlArea/";'."\n";
|
||||
$output .= '</script>'."\n";
|
||||
$htmlArea = 1;
|
||||
} elsif ($browser->ie && $browser->version >= 5) {
|
||||
$output .= '<script language="JavaScript">
|
||||
var formObj;
|
||||
var extrasDir="'.$session{config}{extras}.'";
|
||||
var extrasDir="'.$session{config}{extrasURL}.'";
|
||||
function openEditWindow(obj) {
|
||||
formObj = obj;
|
||||
window.open("'.$session{config}{extras}.'/ie5edit.html","editWindow","width=490,height=400,resizable=1"); }
|
||||
window.open("'.$session{config}{extrasURL}.'/ie5edit.html","editWindow","width=490,height=400,resizable=1"); }
|
||||
function setContent(content) {
|
||||
formObj.value = content;
|
||||
} </script>';
|
||||
|
|
@ -674,10 +674,10 @@ sub HTMLArea {
|
|||
# } elsif ($browser->gecko && $browser->version >= 1.3) {
|
||||
# $output .= '<script language="JavaScript">
|
||||
# var formObj;
|
||||
## var extrasDir="'.$session{config}{extras}.'";
|
||||
## var extrasDir="'.$session{config}{extrasURL}.'";
|
||||
# function openEditWindow(obj) {
|
||||
# formObj = obj;
|
||||
# window.open("'.$session{config}{extras}.'/wendedit.html","editWindow","width=490,height=400,resizable=1"); }
|
||||
# window.open("'.$session{config}{extrasURL}.'/wendedit.html","editWindow","width=490,height=400,resizable=1"); }
|
||||
# function setContent(content) {
|
||||
# formObj.value = content;
|
||||
# } </script>';
|
||||
|
|
@ -685,10 +685,10 @@ sub HTMLArea {
|
|||
} else {
|
||||
$output .= '<script language="JavaScript">
|
||||
var formObj;
|
||||
var extrasDir="'.$session{config}{extras}.'";
|
||||
var extrasDir="'.$session{config}{extrasURL}.'";
|
||||
function openEditWindow(obj) {
|
||||
formObj = obj;
|
||||
window.open("'.$session{config}{extras}.'/lastResortEdit.html","editWindow","width=500,height=410");
|
||||
window.open("'.$session{config}{extrasURL}.'/lastResortEdit.html","editWindow","width=500,height=410");
|
||||
}
|
||||
function setContent(content) {
|
||||
formObj.value = content;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ sub becomeIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/become.gif" align="middle" border="0" alt="Become"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/become.gif" align="middle" border="0" alt="Become"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ sub copyIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ sub cutIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ sub deleteIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ sub editIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ sub helpIcon {
|
|||
my ($output, $namespace);
|
||||
$namespace = $_[1] || "WebGUI";
|
||||
$output = '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.$_[0].'&namespace='.$namespace).
|
||||
'" target="_blank"><img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/help.gif" border="0" align="right"></a>';
|
||||
'" target="_blank"><img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/help.gif" border="0" align="right"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ sub moveBottomIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/moveBottom.gif" align="middle" border="0" alt="Move To Bottom"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveBottom.gif" align="middle" border="0" alt="Move To Bottom"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ sub moveDownIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/moveDown.gif" align="middle" border="0" alt="Move Down"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveDown.gif" align="middle" border="0" alt="Move Down"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ sub moveTopIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/moveTop.gif" align="middle" border="0" alt="Move To Top"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveTop.gif" align="middle" border="0" alt="Move To Top"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ sub moveUpIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/moveUp.gif" align="middle" border="0" alt="Move Up"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveUp.gif" align="middle" border="0" alt="Move Up"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +343,7 @@ Generates an icon that looks like a page. It's purpose is to represent whether y
|
|||
=cut
|
||||
|
||||
sub pageIcon {
|
||||
return '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/page.gif" align="middle" border="0" alt="Page Settings">';
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/page.gif" align="middle" border="0" alt="Page Settings">';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -370,7 +370,7 @@ sub viewIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/view.gif" align="middle" border="0" alt="View"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/view.gif" align="middle" border="0" alt="View"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +383,7 @@ Generates an icon that looks like a wobject. It's purpose is to represent whethe
|
|||
=cut
|
||||
|
||||
sub wobjectIcon {
|
||||
return '<img src="'.$session{config}{extras}.'/toolbar/'.$session{language}{toolbar}.'/wobject.gif" align="middle" border="0" alt="Wobject Settings">';
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/wobject.gif" align="middle" border="0" alt="Wobject Settings">';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^Extras\;/$session{config}{extras}\//g;
|
||||
$output =~ s/\^Extras\;/$session{config}{extrasURL}\//g;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ sub www_listCollateral {
|
|||
where collateralFolderId=$folderId");
|
||||
$output .= '<tr><td colspan="5" class="tableData"><a href="'.WebGUI::URL::page('op=listCollateral&fid='
|
||||
.$parent.'&pn=1')
|
||||
.'"><img src="'.$session{config}{extras}.'/smallAttachment.gif" border="0">'
|
||||
.'"><img src="'.$session{config}{extrasURL}.'/smallAttachment.gif" border="0">'
|
||||
.' '.WebGUI::International::get(542).'</a></td></tr>';
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select collateralFolderId, name, description from collateralFolder
|
||||
|
|
@ -439,7 +439,7 @@ sub www_listCollateral {
|
|||
while ($data = $sth->hashRef) {
|
||||
$output .= '<tr><td class="tableData"><a href="'.WebGUI::URL::page('op=listCollateral&fid='
|
||||
.$data->{collateralFolderId}.'&pn=1')
|
||||
.'"><img src="'.$session{config}{extras}.'/smallAttachment.gif" border="0">'
|
||||
.'"><img src="'.$session{config}{extrasURL}.'/smallAttachment.gif" border="0">'
|
||||
.' '.$data->{name}.'</a></td><td class="tableData" colspan="4">'.$data->{description}.'</td></tr>';
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -171,11 +171,10 @@ sub www_editInternationalMessageSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editLanguage {
|
||||
my ($output, $slash, $dir, @files, $file, %data, $f, %options);
|
||||
my ($output, $dir, @files, $file, %data, $f, %options);
|
||||
return WebGUI::Privilege::adminOnly() unless (WebGUI::Privilege::isInGroup(3));
|
||||
tie %data, 'Tie::CPHash';
|
||||
$slash = ($^O =~ /Win/i) ? "\\" : "/";
|
||||
$dir = $session{config}{webguiRoot}.$slash."www".$slash."extras".$slash."toolbar";
|
||||
$dir = $session{config}{extrasPath}.$session{os}{slash}."toolbar";
|
||||
opendir (DIR,$dir) or WebGUI::ErrorHandler::warn("Can't open toolbar directory!");
|
||||
@files = readdir(DIR);
|
||||
foreach $file (@files) {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ sub _traversePageTree {
|
|||
my ($a, $b, %page, %wobject, $output, $depth, $i, $spacer);
|
||||
tie %page, 'Tie::CPHash';
|
||||
tie %wobject, 'Tie::CPHash';
|
||||
$spacer = '<img src="'.$session{config}{extras}.'/spacer.gif" width=12>';
|
||||
$spacer = '<img src="'.$session{config}{extrasURL}.'/spacer.gif" width=12>';
|
||||
for ($i=1;$i<=$_[1];$i++) {
|
||||
$depth .= $spacer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,6 +411,9 @@ sub open {
|
|||
# default to the "real" path to script.
|
||||
$session{config}{scripturl} = $ENV{SCRIPT_NAME};
|
||||
}
|
||||
$session{config}{extrasURL} = $session{config}{extrasURL} || $session{config}{extras} || "/extras";
|
||||
$session{config}{extras} = $session{config}{extras} || $session{config}{extrasURL}; # for backward compatibility
|
||||
$session{config}{extrasPath} = $session{config}{extrasPath} || "/data/WebGUI/www/extras";
|
||||
###----------------------------
|
||||
### default database handler object
|
||||
$session{dbh} = DBI->connect($session{config}{dsn},$session{config}{dbuser},$session{config}{dbpass},{ RaiseError=>0,AutoCommit=>1 });
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ sub get {
|
|||
@body = split(/\^\-\;/,$style{body});
|
||||
$header = $session{setting}{docTypeDec}."\n".'<!-- WebGUI '.$WebGUI::VERSION.' --> <html> <head> <title>';
|
||||
$header .= $session{page}{title}.' - '.$session{setting}{companyName};
|
||||
$header .= '</title><link REL="icon" HREF="'.$session{config}{extras}.'/favicon.png" TYPE="image/png">'
|
||||
$header .= '</title><link REL="icon" HREF="'.$session{config}{extrasURL}.'/favicon.png" TYPE="image/png">'
|
||||
.$style{styleSheet}.$session{page}{metaTags};
|
||||
if ($session{var}{adminOn}) {
|
||||
# This "triple incantation" panders to the delicate tastes of various browsers for reliable cache suppression.
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ sub www_view {
|
|||
.$_[0]->get("wobjectId")." group by answer");
|
||||
$output .= '<table cellpadding=0 cellspacing=0 border=0><tr><td width="'.
|
||||
round($_[0]->get("graphWidth")*$data[0]/$totalResponses).'" class="pollColor"><img src="'.
|
||||
$session{config}{extras}.'/spacer.gif" height="1" width="1"></td><td class="pollAnswer"> '.
|
||||
$session{config}{extrasURL}.'/spacer.gif" height="1" width="1"></td><td class="pollAnswer"> '.
|
||||
round(100*$data[0]/$totalResponses).'% ('.($data[0]+0).')</td></tr></table>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue