Skip to content

Commit

Permalink
Sick of it
Browse files Browse the repository at this point in the history
  • Loading branch information
bloatware committed Dec 20, 2019
1 parent d078d3c commit cf6ac39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions textpattern/include/txp_section.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@
'section_multi_edit' => true,
'section_set_default' => true,
'section_set_theme' => true,
'section_select_skin' => false,
'section_toggle_option' => true,
);

if ($step && bouncer($step, $available_steps)) {
if ($step && is_callable($step) && bouncer($step, $available_steps)) {
$step();
} else {
sec_section_list();
Expand All @@ -71,7 +72,7 @@

function sec_section_list($message = '')
{
global $event, $all_pages, $all_styles;
global $event, $step, $all_pages, $all_styles;

pagetop(gTxt('tab_sections'), $message);

Expand Down Expand Up @@ -206,7 +207,7 @@ function sec_section_list($message = '')
}

$paginator = new \Textpattern\Admin\Paginator();
$limit = gps('skin') ? PHP_INT_MAX : $paginator->getLimit();
$limit = $step == 'section_select_skin' ? PHP_INT_MAX : $paginator->getLimit();

list($page, $offset, $numPages) = pager($total, $limit, $page);

Expand Down Expand Up @@ -912,7 +913,7 @@ function section_multiedit_form($page, $sort, $dir, $crit, $search_method, $disa
var style_sel = '';
EOJS;

if (gps('skin')) {
if ($step == 'section_select_skin') {
$script .= <<<EOJS
$(function() {
$('#select_all').click();
Expand Down
2 changes: 1 addition & 1 deletion textpattern/vendors/Textpattern/Skin/Skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ protected function getContentBlock($data)
.hCell(
href(txpspecialchars($skin_name), $editUrl, array('title' => gTxt('edit'))).
' | '.
href(gTxt('assign_sections'), 'index.php?event=section&skin='.urlencode($skin_name)).
href(gTxt('assign_sections'), 'index.php?event=section&step=section_select_skin&skin='.urlencode($skin_name)).
(${$event.'_section_count'} > 0 ? sp.tag(gTxt('status_in_use'), 'small', array('class' => 'alert-block alert-pill success')) : '')
, '', array(
'scope' => 'row',
Expand Down

0 comments on commit cf6ac39

Please sign in to comment.