Skip to content

Commit

Permalink
All sections editting
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAker committed Nov 9, 2002
1 parent 38f742c commit 8672160
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Slash/DB/MySQL/MySQL.pm
Expand Up @@ -2082,7 +2082,7 @@ sub saveBlock {
$self->sqlInsert('blocks', { bid => $bid, seclev => 500 });
}

my($portal, $retrieve) = (0, 0);
my($portal, $retrieve, $all_sections) = (0, 0, 0);

# If someone marks a block as a portald block then potald is a portald
# something tell me I may regret this... -Brian
Expand All @@ -2091,6 +2091,7 @@ sub saveBlock {
# this is to make sure that a static block doesn't get
# saved with retrieve set to true
$form->{retrieve} = 0 if $form->{type} ne 'portald';
$form->{all_sections} = 0 if $form->{type} ne 'all_sections';

# If a block is a portald block then portal=1. type
# is done so poorly -Brian
Expand All @@ -2113,6 +2114,7 @@ sub saveBlock {
items => $form->{items},
section => $form->{section},
retrieve => $form->{retrieve},
all_sections => $form->{all_sections},
autosubmit => $form->{autosubmit},
portal => $form->{portal},
}, 'bid=' . $self->sqlQuote($bid));
Expand Down
4 changes: 3 additions & 1 deletion plugins/Admin/admin.pl
Expand Up @@ -487,7 +487,7 @@ sub blockEdit {
print getData('blockDelete-message', { bid => $form->{deletebid} });
}

my($blockref, $saveflag, $block_select, $retrieve_checked,
my($blockref, $saveflag, $block_select, $retrieve_checked, $all_sections_checked,
$portal_checked, $block_select1, $block_select2);
my($blockedit_flag, $blockdelete_flag, $blockform_flag) = (0, 0, 0);
$blockref = {};
Expand Down Expand Up @@ -535,6 +535,7 @@ sub blockEdit {
$blockedit_flag = 1;
$blockref->{ordernum} = "NA" if $blockref->{ordernum} eq '';
$retrieve_checked = "CHECKED" if $blockref->{retrieve} == 1;
$all_sections_checked = "CHECKED" if $blockref->{all_sections} == 1;
$portal_checked = "CHECKED" if $blockref->{portal} == 1;
}
}
Expand All @@ -555,6 +556,7 @@ sub blockEdit {
blockform_flag => $blockform_flag,
portal_checked => $portal_checked,
retrieve_checked => $retrieve_checked,
all_sections_checked => $all_sections_checked,
blocktype_select => $blocktype_select,
sectionbid => $sectionbid,
autosubmit_select => $autosubmit_select,
Expand Down
4 changes: 4 additions & 0 deletions plugins/Admin/templates/blockEdit;admin;default
Expand Up @@ -94,6 +94,10 @@ __template__
<TD><B>Retrieve</B></TD>
<TD COLSPAN="2"><INPUT TYPE="CHECKBOX" VALUE="1" NAME="retrieve" [% retrieve_checked %]></TD>
</TR>
<TR>
<TD><B>All Sections</B></TD>
<TD COLSPAN="2"><INPUT TYPE="CHECKBOX" VALUE="1" NAME="all_sections" [% all_sections_checked %]></TD>
</TR>
<TR>
<TD><B>URL</B></TD>
<TD COLSPAN="2"><INPUT TYPE="TEXT" SIZE="70" NAME="url" VALUE="[% blockref.url %]"><BR></TD>
Expand Down

0 comments on commit 8672160

Please sign in to comment.