|
@@ 56-60 (lines=5) @@
|
| 53 |
|
$button = ( filter_input(INPUT_GET, 'network') === '1' ? \PodloveSubscribeButton\Model\NetworkButton::find_by_id( filter_input(INPUT_GET, 'button') ) : \PodloveSubscribeButton\Model\Button::find_by_id( filter_input(INPUT_GET, 'button') ) ); |
| 54 |
|
$button->update_attributes( $post['podlove_button'] ); |
| 55 |
|
|
| 56 |
|
if ( isset($post['submit_and_stay']) ) { |
| 57 |
|
self::redirect( 'edit', $button->id, array( 'network' => filter_input(INPUT_GET, 'network') ), ( filter_input(INPUT_GET, 'network') === '1' ? TRUE : FALSE ) ); |
| 58 |
|
} else { |
| 59 |
|
self::redirect( 'index', $button->id, array(), ( filter_input(INPUT_GET, 'network') === '1' ? TRUE : FALSE ) ); |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
/** |
| 63 |
|
* Process form: create a format |
|
@@ 73-77 (lines=5) @@
|
| 70 |
|
$button = ( filter_input(INPUT_GET, 'network') === '1' ? new \PodloveSubscribeButton\Model\NetworkButton : new \PodloveSubscribeButton\Model\Button ); |
| 71 |
|
$button->update_attributes( $post['podlove_button'] ); |
| 72 |
|
|
| 73 |
|
if ( isset($post['submit_and_stay']) ) { |
| 74 |
|
self::redirect( 'edit', $button->id, array( 'network' => filter_input(INPUT_GET, 'network') ), ( filter_input(INPUT_GET, 'network') === '1' ? TRUE : FALSE ) ); |
| 75 |
|
} else { |
| 76 |
|
self::redirect( 'index', $button->id, array(), ( filter_input(INPUT_GET, 'network') === '1' ? TRUE : FALSE ) ); |
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
/** |