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
|
|
@ -142,11 +142,10 @@ sub www_listGroups {
|
|||
$sth = WebGUI::SQL->read("select groupId,groupName,description from groups
|
||||
where groupId<>1 and groupId<>2 and groupId<>7 order by groupName");
|
||||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData"><a href="'.
|
||||
WebGUI::URL::page('op=deleteGroup&gid='.$data[0]).
|
||||
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
|
||||
WebGUI::URL::page('op=editGroup&gid='.$data[0]).
|
||||
'"><img src="'.$session{setting}{lib}.'/edit.gif" border=0></a></td>';
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||
.deleteIcon('op=deleteGroup&gid='.$data[0])
|
||||
.editIcon('op=editGroup&gid='.$data[0])
|
||||
.'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[1].'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[2].'</td></tr>';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ sub www_listImages {
|
|||
if($imageGroupId > 0) { # show previous link
|
||||
$row[$i] = '<tr class="tableData">';
|
||||
$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)
|
||||
.'">'.WebGUI::International::get(542).'</a></td>'; # FIXME folder icon
|
||||
$row[$i] .= '</tr>';
|
||||
|
|
@ -203,7 +203,7 @@ sub www_listImages {
|
|||
$row[$i] .= viewIcon('op=viewImageGroup&gid='.$data{imageGroupId}.'&pid='.$imageGroupId);
|
||||
$row[$i] .= '</td>';
|
||||
$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)
|
||||
.'">'.$data{name}.'</a></td>'; # FIXME folder icon
|
||||
$row[$i] .= '<td>'.$data{description}.' </td>';
|
||||
|
|
|
|||
|
|
@ -67,18 +67,18 @@ sub _traversePageTree {
|
|||
my ($a, $b, %page, %wobject, $output, $depth, $i, $spacer);
|
||||
tie %page, '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++) {
|
||||
$depth .= $spacer;
|
||||
}
|
||||
$a = WebGUI::SQL->read("select * from page where (pageId<2 or pageId>25) and parentId='$_[0]' order by sequenceNumber");
|
||||
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>';
|
||||
$b = WebGUI::SQL->read("select * from wobject where pageId=$page{pageId}");
|
||||
while (%wobject = $b->hash) {
|
||||
$output .= $depth.$spacer.
|
||||
'<img src="'.$session{setting}{lib}.'/wobject.gif"> '.
|
||||
'<img src="'.$session{config}{extras}.'/wobject.gif"> '.
|
||||
$wobject{title}.'<br>';
|
||||
}
|
||||
$b->finish;
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ sub www_listRoots {
|
|||
while (%data = $sth->hash) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'.
|
||||
'<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').'">'.
|
||||
'<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').'">'.
|
||||
'<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}).'">'.
|
||||
'<img src="'.$session{setting}{lib}.'/view.gif" border=0></a>'.
|
||||
'<img src="'.$session{config}{extras}.'/view.gif" border=0></a>'.
|
||||
'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data{title}.'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data{urlizedTitle}.'</td></tr>';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use WebGUI::URL;
|
|||
|
||||
our @ISA = qw(Exporter);
|
||||
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);
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -130,6 +130,9 @@ sub www_editContentSettings {
|
|||
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
|
||||
$f->yesNo("addEditStampToPosts",WebGUI::International::get(524),$session{setting}{addEditStampToPosts});
|
||||
$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("textAreaCols",WebGUI::International::get(464),$session{setting}{textAreaCols});
|
||||
$f->integer("textBoxSize",WebGUI::International::get(465),$session{setting}{textBoxSize});
|
||||
|
|
@ -154,43 +157,9 @@ sub www_editContentSettingsSave {
|
|||
_saveSetting("textAreaCols");
|
||||
_saveSetting("textBoxSize");
|
||||
_saveSetting("richEditor");
|
||||
return www_manageSettings();
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
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");
|
||||
_saveSetting("maxImageSize");
|
||||
_saveSetting("maxAttachmentSize");
|
||||
_saveSetting("thumbnailSize");
|
||||
return www_manageSettings();
|
||||
} else {
|
||||
return WebGUI::Privilege::adminOnly();
|
||||
|
|
@ -265,7 +234,6 @@ sub www_manageSettings {
|
|||
$output .= '<ul>';
|
||||
$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=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=editMiscSettings').'">'.WebGUI::International::get(140).'</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{lastPageView},"%H:%n%p %M/%D/%y").'</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++;
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -291,12 +291,10 @@ sub www_editUserGroup {
|
|||
from groupings,groups where groupings.groupId=groups.groupId and
|
||||
groupings.userId=$session{form}{uid} order by groups.groupName");
|
||||
while (%hash = $sth->hash) {
|
||||
$output .= '<tr><td><a href="'.WebGUI::URL::page('op=deleteGrouping&uid='.
|
||||
$session{form}{uid}.'&gid='.$hash{groupId}).'"><img src="'.
|
||||
$session{setting}{lib}.'/delete.gif" border=0></a><a href="'.
|
||||
WebGUI::URL::page('op=editGrouping&uid='.$session{form}{uid}.
|
||||
'&gid='.$hash{groupId}).'"><img src="'.$session{setting}{lib}.
|
||||
'/edit.gif" border=0></a></td>';
|
||||
$output .= '<tr><td>'
|
||||
.deleteIcon('op=deleteGrouping&uid='.$session{form}{uid}.'&gid='.$hash{groupId})
|
||||
.editIcon('op=editGrouping&uid='.$session{form}{uid}.'&gid='.$hash{groupId})
|
||||
.'</td>';
|
||||
$output .= '<td class="tableData">'.$hash{groupName}.'</td>';
|
||||
$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");
|
||||
while (%data = $sth->hash) {
|
||||
$row[$i] = '<tr class="tableData"><td>';
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=deleteUser&uid='.$data{userId}).
|
||||
'"><img src="'.$session{setting}{lib}.'/delete.gif" border=0></a>';
|
||||
$row[$i] .= '<a href="'.WebGUI::URL::page('op=editUser&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] = '<tr class="tableData"><td>'
|
||||
.deleteIcon('op=deleteUser&uid='.$data{userId})
|
||||
.editIcon('op=editUser&uid='.$data{userId})
|
||||
.becomeIcon('op=becomeUser&uid='.$data{userId});
|
||||
$row[$i] .= '</td>';
|
||||
$row[$i] .= '<td><a href="'.WebGUI::URL::page('op=viewProfile&uid='.$data{userId})
|
||||
.'">'.$data{username}.'</a></td>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue