Changed so that new additions are added to the top of the list.
This commit is contained in:
parent
d762f9eb9d
commit
ea23644278
2 changed files with 5 additions and 6 deletions
|
|
@ -278,13 +278,13 @@ sub www_editDownload {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editDownloadSave {
|
||||
my ($file, $alt1, $alt2, $sqlAdd, $seq);
|
||||
my ($file, $alt1, $alt2, $sqlAdd);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
if ($session{form}{did} eq "new") {
|
||||
$session{form}{did} = getNextId("downloadId");
|
||||
($seq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from DownloadManager_file where wobjectId=".$_[0]->get("wobjectId"));
|
||||
WebGUI::SQL->write("insert into DownloadManager_file (wobjectId,downloadId,sequenceNumber)
|
||||
values (".$_[0]->get("wobjectId").",$session{form}{did},".($seq+1).")");
|
||||
values (".$_[0]->get("wobjectId").",$session{form}{did},-1)");
|
||||
_reorderDownloads($_[0]->get("wobjectId"));
|
||||
}
|
||||
$file = WebGUI::Attachment->new("",$session{form}{wid},$session{form}{did});
|
||||
$file->save("downloadFile");
|
||||
|
|
|
|||
|
|
@ -192,13 +192,12 @@ sub www_editLink {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editLinkSave {
|
||||
my ($seq);
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
if ($session{form}{lid} eq "new") {
|
||||
($seq) = WebGUI::SQL->quickArray("select max(sequenceNumber) from LinkList_link where wobjectId=".$_[0]->get("wobjectId"));
|
||||
$session{form}{lid} = getNextId("linkId");
|
||||
WebGUI::SQL->write("insert into LinkList_link (wobjectId,linkId,sequenceNumber) values (".$_[0]->get("wobjectId")
|
||||
.",$session{form}{lid},".($seq+1).")");
|
||||
.",$session{form}{lid},-1)");
|
||||
_reorderLinks($_[0]->get("wobjectId"));
|
||||
}
|
||||
WebGUI::SQL->write("update LinkList_link set name=".quote($session{form}{name}).",
|
||||
url=".quote($session{form}{url}).",description=".quote($session{form}{description}).",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue