Moved extras, uploadsURL, and uploadsPath settings to config file.
This commit is contained in:
parent
b81aa7f9aa
commit
29d2b0e63c
19 changed files with 86 additions and 99 deletions
|
|
@ -7,6 +7,23 @@ upgrading from one version to the next, or even between multiple
|
||||||
versions. Be sure to heed the warnings contained herein as they will
|
versions. Be sure to heed the warnings contained herein as they will
|
||||||
save you many hours of grief.
|
save you many hours of grief.
|
||||||
|
|
||||||
|
4.3.0
|
||||||
|
--------------------------------------------------------------------
|
||||||
|
* The settings "extras", "uploadsURL", and "uploadsPath" have all
|
||||||
|
been moved to the config file to make installations easier.
|
||||||
|
This means that you must add those lines to your old
|
||||||
|
configuration files before you upgrade. See
|
||||||
|
etc/WebGUI.conf.original for details.
|
||||||
|
|
||||||
|
* For wobject and macro developers this also means that any third-
|
||||||
|
party wobjects that use those settings, must be modified to
|
||||||
|
use the new variable name. The following is the change in
|
||||||
|
relationship:
|
||||||
|
|
||||||
|
$session{setting}{lib} = $session{config}{extras}
|
||||||
|
$session{setting}{attachmentDirectoryWeb} = $session{config}{uploadsURL}
|
||||||
|
$session{setting}{attachmentDirectoryLocal} = $session{config}{uploadsPath}
|
||||||
|
|
||||||
4.2.0
|
4.2.0
|
||||||
--------------------------------------------------------------------
|
--------------------------------------------------------------------
|
||||||
* All Discussion properties have been reset to enable the new
|
* All Discussion properties have been reset to enable the new
|
||||||
|
|
|
||||||
|
|
@ -649,8 +649,13 @@ INSERT INTO international VALUES (555,'WebGUI',8,'Modifica il karma di questo ut
|
||||||
INSERT INTO international VALUES (556,'WebGUI',8,'Ammontare');
|
INSERT INTO international VALUES (556,'WebGUI',8,'Ammontare');
|
||||||
INSERT INTO international VALUES (557,'WebGUI',8,'Descrizione');
|
INSERT INTO international VALUES (557,'WebGUI',8,'Descrizione');
|
||||||
INSERT INTO international VALUES (558,'WebGUI',8,'Modifica il karma dell\'utente');
|
INSERT INTO international VALUES (558,'WebGUI',8,'Modifica il karma dell\'utente');
|
||||||
|
delete from international where namespace='WebGUI' and internationalId=129;
|
||||||
|
delete from international where namespace='WebGUI' and internationalId=132;
|
||||||
|
delete from international where namespace='WebGUI' and internationalId=131;
|
||||||
|
delete from international where namespace='WebGUI' and internationalId=128;
|
||||||
|
delete from settings where name='attachmentDirectoryLocal';
|
||||||
|
delete from settings where name='attachmentDirectoryWeb';
|
||||||
|
delete from settings where name='lib';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,7 @@ dsn = DBI:mysql:WebGUI
|
||||||
dbuser = webgui
|
dbuser = webgui
|
||||||
dbpass = password
|
dbpass = password
|
||||||
logfile = /data/webgui.log
|
logfile = /data/webgui.log
|
||||||
|
extras = /extras
|
||||||
|
uploadsURL = /uploads
|
||||||
|
uploadsPath = /data/WebGUI/www/uploads
|
||||||
#scripturl = /
|
#scripturl = /
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ sub _resizeImage {
|
||||||
sub box {
|
sub box {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<p><table cellpadding=3 cellspacing=0 border=1><tr><td class="tableHeader">'.
|
$output = '<p><table cellpadding=3 cellspacing=0 border=1><tr><td class="tableHeader">'.
|
||||||
'<a href="'.$_[0]->getURL.'"><img src="'.$session{setting}{lib}.
|
'<a href="'.$_[0]->getURL.'"><img src="'.$session{config}{extras}.
|
||||||
'/attachment.gif" border=0 alt="'.
|
'/attachment.gif" border=0 alt="'.
|
||||||
$_[0]->getFilename.'"></a></td><td><a href="'.$_[0]->getURL.
|
$_[0]->getFilename.'"></a></td><td><a href="'.$_[0]->getURL.
|
||||||
'"><img src="'.$_[0]->getIcon.
|
'"><img src="'.$_[0]->getIcon.
|
||||||
|
|
@ -223,7 +223,7 @@ sub getFilename {
|
||||||
sub getIcon {
|
sub getIcon {
|
||||||
my ($extension, $icon);
|
my ($extension, $icon);
|
||||||
$extension = $_[0]->getType;
|
$extension = $_[0]->getType;
|
||||||
$icon = $session{setting}{lib}."/fileIcons/";
|
$icon = $session{config}{extras}."/fileIcons/";
|
||||||
if (isIn($extension, qw(doc dot wri))) {
|
if (isIn($extension, qw(doc dot wri))) {
|
||||||
$icon .= "doc.gif";
|
$icon .= "doc.gif";
|
||||||
} elsif (isIn($extension, qw(txt log sql config conf pm cnf readme))) {
|
} elsif (isIn($extension, qw(txt log sql config conf pm cnf readme))) {
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ sub date {
|
||||||
$output = '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
$output = '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
||||||
$size.'" maxlength="10" '.$extras.'>';
|
$size.'" maxlength="10" '.$extras.'>';
|
||||||
$output .= '<input type="button" style="font-size: 8pt;" onClick="window.dateField = this.form.'.
|
$output .= '<input type="button" style="font-size: 8pt;" onClick="window.dateField = this.form.'.
|
||||||
$name.';calendar = window.open(\''.$session{setting}{lib}.
|
$name.';calendar = window.open(\''.$session{config}{extras}.
|
||||||
'/calendar.html\',\'cal\',\'WIDTH=200,HEIGHT=250\');return false" value="'.
|
'/calendar.html\',\'cal\',\'WIDTH=200,HEIGHT=250\');return false" value="'.
|
||||||
WebGUI::International::get(34).'">';
|
WebGUI::International::get(34).'">';
|
||||||
$output .= _subtext($subtext);
|
$output .= _subtext($subtext);
|
||||||
|
|
@ -335,7 +335,7 @@ sub email {
|
||||||
$extras = shift;
|
$extras = shift;
|
||||||
$subtext = shift;
|
$subtext = shift;
|
||||||
$size = shift || $session{setting}{textBoxSize} || 30;
|
$size = shift || $session{setting}{textBoxSize} || 30;
|
||||||
$output = '<script language="javascript" src="'.$session{setting}{lib}.'/emailCheck.js"></script>';
|
$output = '<script language="javascript" src="'.$session{config}{extras}.'/emailCheck.js"></script>';
|
||||||
$output .= '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
$output .= '<input type="text" name="'.$name.'" value="'.$value.'" size="'.
|
||||||
$size.'" maxlength="'.$maxLength.'" onBlur="emailCheck(this.value)" '.$extras.'>';
|
$size.'" maxlength="'.$maxLength.'" onBlur="emailCheck(this.value)" '.$extras.'>';
|
||||||
$output .= _subtext($subtext);
|
$output .= _subtext($subtext);
|
||||||
|
|
@ -564,19 +564,19 @@ sub HTMLArea {
|
||||||
var formObj;
|
var formObj;
|
||||||
function openEditWindow(obj) {
|
function openEditWindow(obj) {
|
||||||
formObj = obj;
|
formObj = obj;
|
||||||
window.open("'.$session{setting}{lib}.'/eopro.html","editWindow","width=720,height=450,resizable=1");
|
window.open("'.$session{config}{extras}.'/eopro.html","editWindow","width=720,height=450,resizable=1");
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
} else {
|
} else {
|
||||||
$output .= '<script language="JavaScript">
|
$output .= '<script language="JavaScript">
|
||||||
var formObj;
|
var formObj;
|
||||||
var extrasDir="'.$session{setting}{lib}.'";
|
var extrasDir="'.$session{config}{extras}.'";
|
||||||
function openEditWindow(obj) {
|
function openEditWindow(obj) {
|
||||||
formObj = obj;
|
formObj = obj;
|
||||||
if (navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE")+5,1)>=5)
|
if (navigator.userAgent.substr(navigator.userAgent.indexOf("MSIE")+5,1)>=5)
|
||||||
window.open("'.$session{setting}{lib}.'/ieEdit.html","editWindow","width=490,height=400,resizable=1");
|
window.open("'.$session{config}{extras}.'/ieEdit.html","editWindow","width=490,height=400,resizable=1");
|
||||||
else
|
else
|
||||||
window.open("'.$session{setting}{lib}.'/nonIeEdit.html","editWindow","width=500,height=410");
|
window.open("'.$session{config}{extras}.'/nonIeEdit.html","editWindow","width=500,height=410");
|
||||||
}
|
}
|
||||||
function setContent(content) {
|
function setContent(content) {
|
||||||
formObj.value = content;
|
formObj.value = content;
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ our @EXPORT = qw(&helpIcon &becomeIcon &cutIcon ©Icon &deleteIcon &editIcon
|
||||||
sub becomeIcon {
|
sub becomeIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/become.gif" align="middle" border="0" alt="Become"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/become.gif" align="middle" border="0" alt="Become"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ sub becomeIcon {
|
||||||
sub copyIcon {
|
sub copyIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ sub copyIcon {
|
||||||
sub cutIcon {
|
sub cutIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@ sub cutIcon {
|
||||||
sub deleteIcon {
|
sub deleteIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,7 +152,7 @@ sub deleteIcon {
|
||||||
sub editIcon {
|
sub editIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,7 +178,7 @@ sub helpIcon {
|
||||||
my ($output, $namespace);
|
my ($output, $namespace);
|
||||||
$namespace = $_[1] || "WebGUI";
|
$namespace = $_[1] || "WebGUI";
|
||||||
$output = '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.$_[0].'&namespace='.$namespace).
|
$output = '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.$_[0].'&namespace='.$namespace).
|
||||||
'" target="_blank"><img src="'.$session{setting}{lib}.'/help.gif" border="0" align="right"></a>';
|
'" target="_blank"><img src="'.$session{config}{extras}.'/help.gif" border="0" align="right"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ sub helpIcon {
|
||||||
sub moveBottomIcon {
|
sub moveBottomIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/jumpDown.gif" align="middle" border="0" alt="Move To Bottom"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/jumpDown.gif" align="middle" border="0" alt="Move To Bottom"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -218,7 +218,7 @@ sub moveBottomIcon {
|
||||||
sub moveDownIcon {
|
sub moveDownIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/downArrow.gif" align="middle" border="0" alt="Move Down"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/downArrow.gif" align="middle" border="0" alt="Move Down"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -238,7 +238,7 @@ sub moveDownIcon {
|
||||||
sub moveTopIcon {
|
sub moveTopIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/jumpUp.gif" align="middle" border="0" alt="Move To Top"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/jumpUp.gif" align="middle" border="0" alt="Move To Top"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,7 +258,7 @@ sub moveTopIcon {
|
||||||
sub moveUpIcon {
|
sub moveUpIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/upArrow.gif" align="middle" border="0" alt="Move Up"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/upArrow.gif" align="middle" border="0" alt="Move Up"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,7 +273,7 @@ sub moveUpIcon {
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub pageIcon {
|
sub pageIcon {
|
||||||
return '<img src="'.$session{setting}{lib}.'/page.gif" align="middle" border="0" alt="Page Settings">';
|
return '<img src="'.$session{config}{extras}.'/page.gif" align="middle" border="0" alt="Page Settings">';
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -292,7 +292,7 @@ sub pageIcon {
|
||||||
sub viewIcon {
|
sub viewIcon {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
$output = '<a href="'.WebGUI::URL::page($_[0]).'">';
|
||||||
$output .= '<img src="'.$session{setting}{lib}.'/view.gif" align="middle" border="0" alt="View"></a>';
|
$output .= '<img src="'.$session{config}{extras}.'/view.gif" align="middle" border="0" alt="View"></a>';
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use WebGUI::Session;
|
||||||
sub process {
|
sub process {
|
||||||
my ($output);
|
my ($output);
|
||||||
$output = $_[0];
|
$output = $_[0];
|
||||||
$output =~ s/\^Extras\;/$session{setting}{lib}\//g;
|
$output =~ s/\^Extras\;/$session{config}{extras}\//g;
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,13 +59,13 @@ use WebGUI::Session;
|
||||||
sub create {
|
sub create {
|
||||||
my ($slash, $node);
|
my ($slash, $node);
|
||||||
$slash = ($^O =~ /Win/i) ? "\\" : "/";
|
$slash = ($^O =~ /Win/i) ? "\\" : "/";
|
||||||
$node = $session{setting}{attachmentDirectoryLocal}.$slash.$_[0]->{_node1};
|
$node = $session{config}{uploadsPath}.$slash.$_[0]->{_node1};
|
||||||
mkdir($node);
|
mkdir($node);
|
||||||
unless ($! eq "File exists" || $! eq "") {
|
unless ($! eq "File exists" || $! eq "") {
|
||||||
WebGUI::ErrorHandler::warn("Couldn't create node: $node : $!");
|
WebGUI::ErrorHandler::warn("Couldn't create node: $node : $!");
|
||||||
}
|
}
|
||||||
if ($_[0]->{_node2} ne "") {
|
if ($_[0]->{_node2} ne "") {
|
||||||
$node = $session{setting}{attachmentDirectoryLocal}.$slash.$_[0]->{_node1}.$slash.$_[0]->{_node2};
|
$node = $session{config}{uploadsPath}.$slash.$_[0]->{_node1}.$slash.$_[0]->{_node2};
|
||||||
mkdir($node);
|
mkdir($node);
|
||||||
unless ($! eq "File exists" || $! eq "") {
|
unless ($! eq "File exists" || $! eq "") {
|
||||||
WebGUI::ErrorHandler::warn("Couldn't create node: $node : $!");
|
WebGUI::ErrorHandler::warn("Couldn't create node: $node : $!");
|
||||||
|
|
@ -97,7 +97,7 @@ sub delete {
|
||||||
sub getPath {
|
sub getPath {
|
||||||
my ($path,$slash);
|
my ($path,$slash);
|
||||||
$slash = ($^O =~ /Win/i) ? "\\" : "/";
|
$slash = ($^O =~ /Win/i) ? "\\" : "/";
|
||||||
$path = $session{setting}{attachmentDirectoryLocal}.$slash.$_[0]->{_node1};
|
$path = $session{config}{uploadsPath}.$slash.$_[0]->{_node1};
|
||||||
if ($_[0]->{_node2} ne "") {
|
if ($_[0]->{_node2} ne "") {
|
||||||
$path .= $slash.$_[0]->{_node2};
|
$path .= $slash.$_[0]->{_node2};
|
||||||
}
|
}
|
||||||
|
|
@ -115,7 +115,7 @@ sub getPath {
|
||||||
|
|
||||||
sub getURL {
|
sub getURL {
|
||||||
my ($url);
|
my ($url);
|
||||||
$url = $session{setting}{attachmentDirectoryWeb}.'/'.$_[0]->{_node1};
|
$url = $session{config}{uploadsURL}.'/'.$_[0]->{_node1};
|
||||||
if ($_[0]->{_node2} ne "") {
|
if ($_[0]->{_node2} ne "") {
|
||||||
$url .= '/'.$_[0]->{_node2};
|
$url .= '/'.$_[0]->{_node2};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -142,11 +142,10 @@ sub www_listGroups {
|
||||||
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups
|
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups
|
||||||
where groupId<>1 and groupId<>2 and groupId<>7 order by groupName");
|
where groupId<>1 and groupId<>2 and groupId<>7 order by groupName");
|
||||||
while (@data = $sth->array) {
|
while (@data = $sth->array) {
|
||||||
$row[$i] = '<tr><td valign="top" class="tableData"><a href="'.
|
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||||
WebGUI::URL::page('op=deleteGroup&gid='.$data[0]).
|
.deleteIcon('op=deleteGroup&gid='.$data[0])
|
||||||
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
|
.editIcon('op=editGroup&gid='.$data[0])
|
||||||
WebGUI::URL::page('op=editGroup&gid='.$data[0]).
|
.'</td>';
|
||||||
'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
|
|
||||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[1].'</td>';
|
$row[$i] .= '<td valign="top" class="tableData">'.$data[1].'</td>';
|
||||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[2].'</td></tr>';
|
$row[$i] .= '<td valign="top" class="tableData">'.$data[2].'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ sub www_listImages {
|
||||||
if($imageGroupId > 0) { # show previous link
|
if($imageGroupId > 0) { # show previous link
|
||||||
$row[$i] = '<tr class="tableData">';
|
$row[$i] = '<tr class="tableData">';
|
||||||
$row[$i] .= '<td colspan="5"><a href="'.WebGUI::URL::page('op=listImages&gid='.$imageGroupParentId)
|
$row[$i] .= '<td colspan="5"><a href="'.WebGUI::URL::page('op=listImages&gid='.$imageGroupParentId)
|
||||||
.'"><img src="'.$session{setting}{lib}.'/smallAttachment.gif" border="0"></a>'
|
.'"><img src="'.$session{config}{extras}.'/smallAttachment.gif" border="0"></a>'
|
||||||
.' <a href="'.WebGUI::URL::page('op=listImages&gid='.$imageGroupParentId)
|
.' <a href="'.WebGUI::URL::page('op=listImages&gid='.$imageGroupParentId)
|
||||||
.'">'.WebGUI::International::get(542).'</a></td>'; # FIXME folder icon
|
.'">'.WebGUI::International::get(542).'</a></td>'; # FIXME folder icon
|
||||||
$row[$i] .= '</tr>';
|
$row[$i] .= '</tr>';
|
||||||
|
|
@ -203,7 +203,7 @@ sub www_listImages {
|
||||||
$row[$i] .= viewIcon('op=viewImageGroup&gid='.$data{imageGroupId}.'&pid='.$imageGroupId);
|
$row[$i] .= viewIcon('op=viewImageGroup&gid='.$data{imageGroupId}.'&pid='.$imageGroupId);
|
||||||
$row[$i] .= '</td>';
|
$row[$i] .= '</td>';
|
||||||
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=listImages&gid='.$data{imageGroupId}.'&pid='.$imageGroupId)
|
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=listImages&gid='.$data{imageGroupId}.'&pid='.$imageGroupId)
|
||||||
.'"><img src="'.$session{setting}{lib}.'/smallAttachment.gif" border="0"></a>'
|
.'"><img src="'.$session{config}{extras}.'/smallAttachment.gif" border="0"></a>'
|
||||||
.' <a href="'.WebGUI::URL::page('op=listImages&gid='.$data{imageGroupId}.'&pid='.$imageGroupId)
|
.' <a href="'.WebGUI::URL::page('op=listImages&gid='.$data{imageGroupId}.'&pid='.$imageGroupId)
|
||||||
.'">'.$data{name}.'</a></td>'; # FIXME folder icon
|
.'">'.$data{name}.'</a></td>'; # FIXME folder icon
|
||||||
$row[$i] .= '<td>'.$data{description}.' </td>';
|
$row[$i] .= '<td>'.$data{description}.' </td>';
|
||||||
|
|
|
||||||
|
|
@ -67,18 +67,18 @@ sub _traversePageTree {
|
||||||
my ($a, $b, %page, %wobject, $output, $depth, $i, $spacer);
|
my ($a, $b, %page, %wobject, $output, $depth, $i, $spacer);
|
||||||
tie %page, 'Tie::CPHash';
|
tie %page, 'Tie::CPHash';
|
||||||
tie %wobject, 'Tie::CPHash';
|
tie %wobject, 'Tie::CPHash';
|
||||||
$spacer = '<img src="'.$session{setting}{lib}.'/spacer.gif" width=12>';
|
$spacer = '<img src="'.$session{config}{extras}.'/spacer.gif" width=12>';
|
||||||
for ($i=1;$i<=$_[1];$i++) {
|
for ($i=1;$i<=$_[1];$i++) {
|
||||||
$depth .= $spacer;
|
$depth .= $spacer;
|
||||||
}
|
}
|
||||||
$a = WebGUI::SQL->read("select * from page where (pageId<2 or pageId>25) and parentId='$_[0]' order by sequenceNumber");
|
$a = WebGUI::SQL->read("select * from page where (pageId<2 or pageId>25) and parentId='$_[0]' order by sequenceNumber");
|
||||||
while (%page = $a->hash) {
|
while (%page = $a->hash) {
|
||||||
$output .= $depth.'<img src="'.$session{setting}{lib}.'/page.gif" align="middle">'.
|
$output .= $depth.'<img src="'.$session{config}{extras}.'/page.gif" align="middle">'.
|
||||||
' <a href="'.WebGUI::URL::gateway($page{urlizedTitle}).'">'.$page{title}.'</a><br>';
|
' <a href="'.WebGUI::URL::gateway($page{urlizedTitle}).'">'.$page{title}.'</a><br>';
|
||||||
$b = WebGUI::SQL->read("select * from wobject where pageId=$page{pageId}");
|
$b = WebGUI::SQL->read("select * from wobject where pageId=$page{pageId}");
|
||||||
while (%wobject = $b->hash) {
|
while (%wobject = $b->hash) {
|
||||||
$output .= $depth.$spacer.
|
$output .= $depth.$spacer.
|
||||||
'<img src="'.$session{setting}{lib}.'/wobject.gif"> '.
|
'<img src="'.$session{config}{extras}.'/wobject.gif"> '.
|
||||||
$wobject{title}.'<br>';
|
$wobject{title}.'<br>';
|
||||||
}
|
}
|
||||||
$b->finish;
|
$b->finish;
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ sub www_listRoots {
|
||||||
while (%data = $sth->hash) {
|
while (%data = $sth->hash) {
|
||||||
$row[$i] = '<tr><td valign="top" class="tableData">'.
|
$row[$i] = '<tr><td valign="top" class="tableData">'.
|
||||||
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=deletePage').'">'.
|
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=deletePage').'">'.
|
||||||
'<img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>'.
|
'<img src="'.$session{config}{extras}.'/delete.gif" border=0></a>'.
|
||||||
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=cutPage').'">'.
|
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=cutPage').'">'.
|
||||||
'<img src="'.$session{setting}{lib}.'/cut.gif" border=0></a>'.
|
'<img src="'.$session{config}{extras}.'/cut.gif" border=0></a>'.
|
||||||
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=editPage').'">'.
|
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}.'?op=editPage').'">'.
|
||||||
'<img src="'.$session{setting}{lib}.'/edit.gif" border=0></a>'.
|
'<img src="'.$session{config}{extras}.'/edit.gif" border=0></a>'.
|
||||||
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}).'">'.
|
'<a href="'.WebGUI::URL::gateway($data{urlizedTitle}).'">'.
|
||||||
'<img src="'.$session{setting}{lib}.'/view.gif" border=0></a>'.
|
'<img src="'.$session{config}{extras}.'/view.gif" border=0></a>'.
|
||||||
'</td>';
|
'</td>';
|
||||||
$row[$i] .= '<td valign="top" class="tableData">'.$data{title}.'</td>';
|
$row[$i] .= '<td valign="top" class="tableData">'.$data{title}.'</td>';
|
||||||
$row[$i] .= '<td valign="top" class="tableData">'.$data{urlizedTitle}.'</td></tr>';
|
$row[$i] .= '<td valign="top" class="tableData">'.$data{urlizedTitle}.'</td></tr>';
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ use WebGUI::URL;
|
||||||
|
|
||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw(&www_editUserSettings &www_editUserSettingsSave &www_editCompanyInformation &www_editCompanyInformationSave
|
our @EXPORT = qw(&www_editUserSettings &www_editUserSettingsSave &www_editCompanyInformation &www_editCompanyInformationSave
|
||||||
&www_editFileSettings &www_editFileSettingsSave &www_editMailSettings &www_editMailSettingsSave &www_editMiscSettings
|
&www_editMailSettings &www_editMailSettingsSave &www_editMiscSettings
|
||||||
&www_editContentSettings &www_editContentSettingsSave &www_editMiscSettingsSave &www_manageSettings);
|
&www_editContentSettings &www_editContentSettingsSave &www_editMiscSettingsSave &www_manageSettings);
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -130,6 +130,9 @@ sub www_editContentSettings {
|
||||||
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
|
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
|
||||||
$f->yesNo("addEditStampToPosts",WebGUI::International::get(524),$session{setting}{addEditStampToPosts});
|
$f->yesNo("addEditStampToPosts",WebGUI::International::get(524),$session{setting}{addEditStampToPosts});
|
||||||
$f->select("filterContributedHTML",\%htmlFilter,WebGUI::International::get(418),[$session{setting}{filterContributedHTML}]);
|
$f->select("filterContributedHTML",\%htmlFilter,WebGUI::International::get(418),[$session{setting}{filterContributedHTML}]);
|
||||||
|
$f->integer("maxAttachmentSize",WebGUI::International::get(130),$session{setting}{maxAttachmentSize});
|
||||||
|
$f->integer("maxImageSize",WebGUI::International::get(583),$session{setting}{maxImageSize});
|
||||||
|
$f->integer("thumbnailSize",WebGUI::International::get(406),$session{setting}{thumbnailSize});
|
||||||
$f->integer("textAreaRows",WebGUI::International::get(463),$session{setting}{textAreaRows});
|
$f->integer("textAreaRows",WebGUI::International::get(463),$session{setting}{textAreaRows});
|
||||||
$f->integer("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols});
|
$f->integer("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols});
|
||||||
$f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize});
|
$f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize});
|
||||||
|
|
@ -154,43 +157,9 @@ sub www_editContentSettingsSave {
|
||||||
_saveSetting("textAreaCols");
|
_saveSetting("textAreaCols");
|
||||||
_saveSetting("textBoxSize");
|
_saveSetting("textBoxSize");
|
||||||
_saveSetting("richEditor");
|
_saveSetting("richEditor");
|
||||||
return www_manageSettings();
|
_saveSetting("maxImageSize");
|
||||||
} else {
|
_saveSetting("maxAttachmentSize");
|
||||||
return WebGUI::Privilege::adminOnly();
|
_saveSetting("thumbnailSize");
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_editFileSettings {
|
|
||||||
my ($output, $f);
|
|
||||||
if (WebGUI::Privilege::isInGroup(3)) {
|
|
||||||
$output .= helpIcon(11);
|
|
||||||
$output .= '<h1>'.WebGUI::International::get(128).'</h1>';
|
|
||||||
$f = WebGUI::HTMLForm->new;
|
|
||||||
$f->hidden("op","editFileSettingsSave");
|
|
||||||
$f->text("lib",WebGUI::International::get(129),$session{setting}{lib});
|
|
||||||
$f->integer("maxAttachmentSize",WebGUI::International::get(130),$session{setting}{maxAttachmentSize});
|
|
||||||
$f->integer("maxImageSize",WebGUI::International::get(583),$session{setting}{maxImageSize});
|
|
||||||
$f->integer("thumbnailSize",WebGUI::International::get(406),$session{setting}{thumbnailSize});
|
|
||||||
$f->text("attachmentDirectoryWeb",WebGUI::International::get(131),$session{setting}{attachmentDirectoryWeb});
|
|
||||||
$f->text("attachmentDirectoryLocal",WebGUI::International::get(132),$session{setting}{attachmentDirectoryLocal});
|
|
||||||
$f->submit;
|
|
||||||
$output .= $f->print;
|
|
||||||
} else {
|
|
||||||
$output = WebGUI::Privilege::adminOnly();
|
|
||||||
}
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
sub www_editFileSettingsSave {
|
|
||||||
if (WebGUI::Privilege::isInGroup(3)) {
|
|
||||||
_saveSetting("lib");
|
|
||||||
_saveSetting("maxImageSize");
|
|
||||||
_saveSetting("maxAttachmentSize");
|
|
||||||
_saveSetting("thumbnailSize");
|
|
||||||
_saveSetting("attachmentDirectoryWeb");
|
|
||||||
_saveSetting("attachmentDirectoryLocal");
|
|
||||||
return www_manageSettings();
|
return www_manageSettings();
|
||||||
} else {
|
} else {
|
||||||
return WebGUI::Privilege::adminOnly();
|
return WebGUI::Privilege::adminOnly();
|
||||||
|
|
@ -265,7 +234,6 @@ sub www_manageSettings {
|
||||||
$output .= '<ul>';
|
$output .= '<ul>';
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editCompanyInformation').'">'.WebGUI::International::get(124).'</a>';
|
$output .= '<li><a href="'.WebGUI::URL::page('op=editCompanyInformation').'">'.WebGUI::International::get(124).'</a>';
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editContentSettings').'">'.WebGUI::International::get(525).'</a>';
|
$output .= '<li><a href="'.WebGUI::URL::page('op=editContentSettings').'">'.WebGUI::International::get(525).'</a>';
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editFileSettings').'">'.WebGUI::International::get(128).'</a>';
|
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editMailSettings').'">'.WebGUI::International::get(133).'</a>';
|
$output .= '<li><a href="'.WebGUI::URL::page('op=editMailSettings').'">'.WebGUI::International::get(133).'</a>';
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editMiscSettings').'">'.WebGUI::International::get(140).'</a>';
|
$output .= '<li><a href="'.WebGUI::URL::page('op=editMiscSettings').'">'.WebGUI::International::get(140).'</a>';
|
||||||
$output .= '<li><a href="'.WebGUI::URL::page('op=editProfileSettings').'">'.WebGUI::International::get(308).'</a>';
|
$output .= '<li><a href="'.WebGUI::URL::page('op=editProfileSettings').'">'.WebGUI::International::get(308).'</a>';
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ sub www_viewActiveSessions {
|
||||||
$row[$i] .= '<td>'.epochToHuman($data{expires},"%H:%n%p %M/%D/%y").'</td>';
|
$row[$i] .= '<td>'.epochToHuman($data{expires},"%H:%n%p %M/%D/%y").'</td>';
|
||||||
$row[$i] .= '<td>'.epochToHuman($data{lastPageView},"%H:%n%p %M/%D/%y").'</td>';
|
$row[$i] .= '<td>'.epochToHuman($data{lastPageView},"%H:%n%p %M/%D/%y").'</td>';
|
||||||
$row[$i] .= '<td>'.$data{lastIP}.'</td>';
|
$row[$i] .= '<td>'.$data{lastIP}.'</td>';
|
||||||
$row[$i] .= '<td align="center"><a href="'.WebGUI::URL::page("op=killSession&sid=$data{sessionId}").'">'.'<img src="'.$session{setting}{lib}.'/delete.gif" border="0"></a></td></tr>';
|
$row[$i] .= '<td align="center">'.deleteIcon("op=killSession&sid=$data{sessionId}").'</td></tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
|
|
|
||||||
|
|
@ -291,12 +291,10 @@ sub www_editUserGroup {
|
||||||
from groupings,groups where groupings.groupId=groups.groupId and
|
from groupings,groups where groupings.groupId=groups.groupId and
|
||||||
groupings.userId=$session{form}{uid} order by groups.groupName");
|
groupings.userId=$session{form}{uid} order by groups.groupName");
|
||||||
while (%hash = $sth->hash) {
|
while (%hash = $sth->hash) {
|
||||||
$output .= '<tr><td><a href="'.WebGUI::URL::page('op=deleteGrouping&uid='.
|
$output .= '<tr><td>'
|
||||||
$session{form}{uid}.'&gid='.$hash{groupId}).'"><img src="'.
|
.deleteIcon('op=deleteGrouping&uid='.$session{form}{uid}.'&gid='.$hash{groupId})
|
||||||
$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
|
.editIcon('op=editGrouping&uid='.$session{form}{uid}.'&gid='.$hash{groupId})
|
||||||
WebGUI::URL::page('op=editGrouping&uid='.$session{form}{uid}.
|
.'</td>';
|
||||||
'&gid='.$hash{groupId}).'"><img src="'.$session{setting}{lib}.
|
|
||||||
'/edit.gif" border=0></a></td>';
|
|
||||||
$output .= '<td class="tableData">'.$hash{groupName}.'</td>';
|
$output .= '<td class="tableData">'.$hash{groupName}.'</td>';
|
||||||
$output .= '<td class="tableData">'.epochToHuman($hash{expireDate},"%z").'</td></tr>';
|
$output .= '<td class="tableData">'.epochToHuman($hash{expireDate},"%z").'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
@ -434,13 +432,10 @@ sub www_listUsers {
|
||||||
}
|
}
|
||||||
$sth = WebGUI::SQL->read("select * from users $search order by users.username");
|
$sth = WebGUI::SQL->read("select * from users $search order by users.username");
|
||||||
while (%data = $sth->hash) {
|
while (%data = $sth->hash) {
|
||||||
$row[$i] = '<tr class="tableData"><td>';
|
$row[$i] = '<tr class="tableData"><td>'
|
||||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=deleteUser&uid='.$data{userId}).
|
.deleteIcon('op=deleteUser&uid='.$data{userId})
|
||||||
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>';
|
.editIcon('op=editUser&uid='.$data{userId})
|
||||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=editUser&uid='.$data{userId}).
|
.becomeIcon('op=becomeUser&uid='.$data{userId});
|
||||||
'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a>';
|
|
||||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=becomeUser&uid='.$data{userId}).
|
|
||||||
'"><img src="'.$session{setting}{lib}.'/become.gif" border=0></a>';
|
|
||||||
$row[$i] .= '</td>';
|
$row[$i] .= '</td>';
|
||||||
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewProfile&uid='.$data{userId})
|
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewProfile&uid='.$data{userId})
|
||||||
.'">'.$data{username}.'</a></td>';
|
.'">'.$data{username}.'</a></td>';
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ sub getStyle {
|
||||||
<head>
|
<head>
|
||||||
<title>';
|
<title>';
|
||||||
$header .= $session{page}{title}.' - '.$session{setting}{companyName};
|
$header .= $session{page}{title}.' - '.$session{setting}{companyName};
|
||||||
$header .= '</title><link REL="icon" HREF="'.$session{setting}{lib}.'/favicon.png" TYPE="image/png">'
|
$header .= '</title><link REL="icon" HREF="'.$session{config}{extras}.'/favicon.png" TYPE="image/png">'
|
||||||
.$style{styleSheet}
|
.$style{styleSheet}
|
||||||
.$session{page}{metaTags};
|
.$session{page}{metaTags};
|
||||||
if ($session{var}{adminOn}) {
|
if ($session{var}{adminOn}) {
|
||||||
|
|
|
||||||
|
|
@ -69,9 +69,9 @@ sub sortByColumn {
|
||||||
$output .= '">'.$_[1].'</a>';
|
$output .= '">'.$_[1].'</a>';
|
||||||
if ($session{form}{sort} eq $_[0]) {
|
if ($session{form}{sort} eq $_[0]) {
|
||||||
if ($session{form}{sortDirection} eq "desc") {
|
if ($session{form}{sortDirection} eq "desc") {
|
||||||
$output .= ' <img src="'.$session{setting}{lib}.'/desc.gif">';
|
$output .= ' <img src="'.$session{config}{extras}.'/desc.gif">';
|
||||||
} else {
|
} else {
|
||||||
$output .= ' <img src="'.$session{setting}{lib}.'/asc.gif">';
|
$output .= ' <img src="'.$session{config}{extras}.'/asc.gif">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ sub www_view {
|
||||||
.$_[0]->get("wobjectId")." group by answer");
|
.$_[0]->get("wobjectId")." group by answer");
|
||||||
$output .= '<table cellpadding=0 cellspacing=0 border=0><tr><td width="'.
|
$output .= '<table cellpadding=0 cellspacing=0 border=0><tr><td width="'.
|
||||||
round($_[0]->get("graphWidth")*$data[0]/$totalResponses).'" class="pollColor"><img src="'.
|
round($_[0]->get("graphWidth")*$data[0]/$totalResponses).'" class="pollColor"><img src="'.
|
||||||
$session{setting}{lib}.'/spacer.gif" height="1" width="1"></td><td class="pollAnswer"> '.
|
$session{config}{extras}.'/spacer.gif" height="1" width="1"></td><td class="pollAnswer"> '.
|
||||||
round(100*$data[0]/$totalResponses).'% ('.($data[0]+0).')</td></tr></table>';
|
round(100*$data[0]/$totalResponses).'% ('.($data[0]+0).')</td></tr></table>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ sub _layoutStandard {
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sth->finish;
|
$sth->finish;
|
||||||
$seperator = '<td class="productAttributeSeperator"><img src="'.$session{setting}{lib}.'/spacer.gif" width="1" height="1"></td>';
|
$seperator = '<td class="productAttributeSeperator"><img src="'.$session{config}{extras}.'/spacer.gif" width="1" height="1"></td>';
|
||||||
$output .= join($seperator,@column);
|
$output .= join($seperator,@column);
|
||||||
$output .= '</tr>';
|
$output .= '</tr>';
|
||||||
$output .= '</table>';
|
$output .= '</table>';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue