diff options
| author | 2014-10-01 13:37:10 +0200 | |
|---|---|---|
| committer | 2014-10-01 13:37:10 +0200 | |
| commit | f400621f44c2aac0b1bb4204e95e4c35a8a35f8f (patch) | |
| tree | 91455d2056c097b14af8e62605e178e83e341369 /app/views/subscription | |
| parent | a7bf7ced369a046b487ab1cd8b3819acc5ebdafe (diff) | |
Fix problem when deleting default category
This is not allowed!
See https://github.com/marienfressinaud/FreshRSS/issues/646
Diffstat (limited to 'app/views/subscription')
| -rw-r--r-- | app/views/subscription/index.phtml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index bce9eacf1..2d55890f7 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -82,9 +82,14 @@ <li class="item"><a href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id()); ?>"><?php echo _t('filter'); ?></a></li> - <li class="separator"></li> + <?php + $no_feed = empty($feeds); + $is_default = ($cat->id() === $this->default_category->id()); - <?php if (!empty($feeds)) { ?> + if (!$no_feed || !$is_default) { + ?> + <li class="separator"></li> + <?php } if (!$no_feed) { ?> <li class="item"> <button class="as-link confirm" data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" @@ -93,7 +98,7 @@ formaction="<?php echo _url('category', 'empty', 'id', $cat->id()); ?>"> <?php echo _t('ask_empty'); ?></button> </li> - <?php } ?> + <?php } if (!$is_default) { ?> <li class="item"> <button class="as-link confirm" data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>" @@ -102,6 +107,7 @@ formaction="<?php echo _url('category', 'delete', 'id', $cat->id()); ?>"> <?php echo _t('delete'); ?></button> </li> + <?php } ?> </ul> </div> </form> |
