Skip to content

Commit

Permalink
Revert "Promote developer preview multi-edit options"
Browse files Browse the repository at this point in the history
This reverts commit a62b728.
  • Loading branch information
Bloke committed Jan 21, 2020
1 parent 5fd8466 commit 3d586f4
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions textpattern/include/txp_section.php
Expand Up @@ -393,7 +393,7 @@ function sec_section_list($message = '')
);
}

$disabled = $dev_set ? array() : array('livetodev', 'devtolive');
$disabled = $dev_set ? array() : array('switchdevlive');

$contentBlock .= n.tag_end('tbody').
n.tag_end('table').
Expand Down Expand Up @@ -884,8 +884,13 @@ function section_multiedit_form($page, $sort, $dir, $crit, $search_method, $disa
)
) . $themeSelect . $pageSelect . $styleSelect
),
'livetodev' => gTxt('live_to_dev'),
'devtolive' => gTxt('dev_to_live'),
'switchdevlive' => array(
'label' => gTxt('switch_dev_live'),
'html' => radioSet(array(
0 => gTxt('live_to_dev'),
1 => gTxt('dev_to_live'),
), 'switch_dev_live', 0),
),
'permlinkmode' => array(
'label' => gTxt('permlink_mode'),
'html' => permlinkmodes('permlink_mode', '', array('' => gTxt('default'))),
Expand Down Expand Up @@ -949,7 +954,6 @@ function section_multi_edit()
}

$nameVal = array();
$deployOpts = array('livetodev', 'devtolive');

switch ($edit_method) {
case 'delete':
Expand All @@ -973,11 +977,8 @@ function section_multi_edit()
}

break;
case 'devtolive':
$nameVal['switch_dev_live'] = 1;
break;
case 'livetodev':
$nameVal['switch_dev_live'] = 0;
case 'switchdevlive':
$nameVal['switch_dev_live'] = (int) ps('switch_dev_live');
break;
case 'permlinkmode':
$nameVal['permlink_mode'] = (string) ps('permlink_mode');
Expand Down Expand Up @@ -1014,7 +1015,7 @@ function section_multi_edit()
'0' :
"css IN (".join(',', quote_list($all_styles[$skin])).")";
}
} elseif (in_array($edit_method, $deployOpts) && empty($nameVal['switch_dev_live'])) {
} elseif ($edit_method === 'switchdevlive' && empty($nameVal['switch_dev_live'])) {
$skinset = array();

foreach ($all_skins as $skin => $title) {
Expand All @@ -1039,8 +1040,8 @@ function section_multi_edit()
);

if ($nameVal && $sections) {
if (in_array($edit_method, $deployOpts)) {
$set = ($edit_method == 'devtolive' ? '' :
if ($edit_method == 'switchdevlive') {
$set = ($nameVal['switch_dev_live'] ? '' :
"skin = $setskin,
page = $setpage,
css = $setcss, "
Expand Down

0 comments on commit 3d586f4

Please sign in to comment.