From 57b0e4e12431158f5fcbc1fdffeac0353f644401 Mon Sep 17 00:00:00 2001 From: sairuk Date: Sun, 2 Oct 2016 13:24:33 +1100 Subject: [PATCH 1/2] fix php 5.3.3 compatiblity by removing DirectoryIterator::getExtension dependancy (req >=5.3.6), remove requirement for short tags --- app/check_setup.php | 5 -- app/models/database.php | 5 +- app/templates/about.php | 34 ++++----- app/templates/add.php | 34 ++++----- app/templates/api.php | 30 ++++---- app/templates/bookmark_links.php | 12 +-- app/templates/bookmarks.php | 16 ++-- app/templates/config.php | 102 +++++++++++++------------- app/templates/confirm_auto_update.php | 8 +- app/templates/confirm_flush_items.php | 8 +- app/templates/confirm_remove_feed.php | 8 +- app/templates/console.php | 10 +-- app/templates/database.php | 22 +++--- app/templates/edit_feed.php | 44 +++++------ app/templates/feed_items.php | 22 +++--- app/templates/feeds.php | 44 +++++------ app/templates/help.php | 42 +++++------ app/templates/help_layer.php | 2 +- app/templates/history.php | 20 ++--- app/templates/import.php | 16 ++-- app/templates/item.php | 74 +++++++++---------- app/templates/keyboard_shortcuts.php | 38 +++++----- app/templates/layout.php | 44 +++++------ app/templates/login.php | 22 +++--- app/templates/new_db.php | 38 +++++----- app/templates/paging.php | 4 +- app/templates/search.php | 10 +-- app/templates/search_form.php | 8 +- app/templates/services.php | 42 +++++------ app/templates/show_item.php | 62 ++++++++-------- app/templates/show_more.php | 12 +-- app/templates/status_links.php | 16 ++-- app/templates/unread_items.php | 20 ++--- 33 files changed, 435 insertions(+), 439 deletions(-) diff --git a/app/check_setup.php b/app/check_setup.php index c7ce5af..ff48662 100644 --- a/app/check_setup.php +++ b/app/check_setup.php @@ -8,11 +8,6 @@ if (version_compare(PHP_VERSION, '5.3.3', '<')) { // Checks for PHP < 5.4 if (version_compare(PHP_VERSION, '5.4.0', '<')) { - // Short tags must be enabled for PHP < 5.4 - if (! ini_get('short_open_tag')) { - die('This software require to have short tags enabled if you have PHP < 5.4 ("short_open_tag = On")'); - } - // Magic quotes are deprecated since PHP 5.4 if (get_magic_quotes_gpc()) { die('This software require to have "Magic quotes" disabled, it\'s deprecated since PHP 5.4 ("magic_quotes_gpc = Off")'); diff --git a/app/models/database.php b/app/models/database.php index c5e5b92..1f21980 100644 --- a/app/models/database.php +++ b/app/models/database.php @@ -74,8 +74,9 @@ function get_all() $dir = new DirectoryIterator(DATA_DIRECTORY); foreach ($dir as $fileinfo) { - if ($fileinfo->getExtension() === 'sqlite') { - $listing[] = $fileinfo->getFilename(); + $filename = $fileinfo->getFilename(); + if (preg_match('/sqlite$/', $filename)) { + $listing[] = $filename; } } diff --git a/app/templates/about.php b/app/templates/about.php index 84aa582..dd84381 100644 --- a/app/templates/about.php +++ b/app/templates/about.php @@ -1,39 +1,39 @@
-

+

  • - +
-

- () - +

+ () +
diff --git a/app/templates/add.php b/app/templates/add.php index 2a80d77..a8768d2 100644 --- a/app/templates/add.php +++ b/app/templates/add.php @@ -1,39 +1,39 @@
- + - -

+ +

-
-
-
+
+
+
-

+

- +
- + - +
- - + +
diff --git a/app/templates/api.php b/app/templates/api.php index fe41094..a516279 100644 --- a/app/templates/api.php +++ b/app/templates/api.php @@ -1,31 +1,31 @@
-

+

    -
  • -
  • -
  • +
  • +
  • +
-

+

    -
  • -
  • -
  • +
  • +
  • +
diff --git a/app/templates/bookmark_links.php b/app/templates/bookmark_links.php index 65a1dc6..f69d1b0 100644 --- a/app/templates/bookmark_links.php +++ b/app/templates/bookmark_links.php @@ -2,16 +2,16 @@ + data-reverse-label="" + > + data-reverse-label="" + > \ No newline at end of file diff --git a/app/templates/bookmarks.php b/app/templates/bookmarks.php index 6dbfd96..02fe84a 100644 --- a/app/templates/bookmarks.php +++ b/app/templates/bookmarks.php @@ -1,15 +1,15 @@ -

+

- + -

+

- $item, 'menu' => $menu, 'offset' => $offset, @@ -36,6 +36,6 @@ )) ?> - $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?> + $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
diff --git a/app/templates/config.php b/app/templates/config.php index c8f5132..78a7d58 100644 --- a/app/templates/config.php +++ b/app/templates/config.php @@ -1,99 +1,99 @@
-

+

- - -
+ + +
- -
+ +
- -
+ +
-

+

- -
+ +
- -
+ +
- -
+ +
- -
+ +
-
+
- -
+ +
-

+

- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
-
-
-
+
+
+
- +
-

+

diff --git a/app/templates/confirm_auto_update.php b/app/templates/confirm_auto_update.php index 7051125..4974745 100644 --- a/app/templates/confirm_auto_update.php +++ b/app/templates/confirm_auto_update.php @@ -1,10 +1,10 @@ -

+

- - + +
\ No newline at end of file diff --git a/app/templates/confirm_flush_items.php b/app/templates/confirm_flush_items.php index f165989..d45560b 100644 --- a/app/templates/confirm_flush_items.php +++ b/app/templates/confirm_flush_items.php @@ -1,10 +1,10 @@ -

+

- - + +
\ No newline at end of file diff --git a/app/templates/confirm_remove_feed.php b/app/templates/confirm_remove_feed.php index 6426b19..3105532 100644 --- a/app/templates/confirm_remove_feed.php +++ b/app/templates/confirm_remove_feed.php @@ -1,10 +1,10 @@ -

+

- - + +
diff --git a/app/templates/console.php b/app/templates/console.php index 0271797..2ef3235 100644 --- a/app/templates/console.php +++ b/app/templates/console.php @@ -1,13 +1,13 @@ -

+

-
+
diff --git a/app/templates/database.php b/app/templates/database.php index 74b7cb8..06e4a69 100644 --- a/app/templates/database.php +++ b/app/templates/database.php @@ -1,25 +1,25 @@
    -
  • -
  • -
  • +
  • +
  • +
  • - +
diff --git a/app/templates/edit_feed.php b/app/templates/edit_feed.php index d1d7896..672c6fa 100644 --- a/app/templates/edit_feed.php +++ b/app/templates/edit_feed.php @@ -1,48 +1,48 @@
- + - - + + - - + + - - + + -
+
-
+
-
+
-
+
- +
- + - +
- - + +
- +
diff --git a/app/templates/feed_items.php b/app/templates/feed_items.php index 1cccc60..0d075a3 100644 --- a/app/templates/feed_items.php +++ b/app/templates/feed_items.php @@ -1,36 +1,36 @@

- ','') ?> + ','') ?>

- ','') ?> + ','') ?>

-
+
- $feed, 'item' => $item, 'menu' => $menu, @@ -44,10 +44,10 @@
- +
- $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'feed_id' => $feed['id'])) ?> + $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'feed_id' => $feed['id'])) ?>
diff --git a/app/templates/feeds.php b/app/templates/feeds.php index 8dd2464..2171afe 100644 --- a/app/templates/feeds.php +++ b/app/templates/feeds.php @@ -1,73 +1,73 @@ -

+

0): ?> -

', '') ?>

+

', '') ?>

-

','') ?>

+

','') ?>

-
> +
>

- + - + - - ‎ + + ‎
-

  • - +
  • - +
  • -
  • +
diff --git a/app/templates/help.php b/app/templates/help.php index c2d89af..bd39b92 100644 --- a/app/templates/help.php +++ b/app/templates/help.php @@ -1,35 +1,35 @@
- +
-

+

    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
diff --git a/app/templates/help_layer.php b/app/templates/help_layer.php index c045890..8b62bc3 100644 --- a/app/templates/help_layer.php +++ b/app/templates/help_layer.php @@ -1,6 +1,6 @@
×
- +
diff --git a/app/templates/history.php b/app/templates/history.php index 5890071..b5abb2f 100644 --- a/app/templates/history.php +++ b/app/templates/history.php @@ -1,15 +1,15 @@ -

+

- + -

+

- $item, 'menu' => $menu, 'offset' => $offset, @@ -42,7 +42,7 @@ )) ?> - $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?> + $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
diff --git a/app/templates/import.php b/app/templates/import.php index 314af0b..5829b20 100644 --- a/app/templates/import.php +++ b/app/templates/import.php @@ -1,20 +1,20 @@
- +
- - + +
\ No newline at end of file diff --git a/app/templates/item.php b/app/templates/item.php index a457090..c57639b 100644 --- a/app/templates/item.php +++ b/app/templates/item.php @@ -1,42 +1,42 @@
+ id="item-" + class="feed-" + data-item-id="" + data-item-status="" + data-item-bookmark="" + > -

> +

> - + - title="" - > + href="" + + title="" + > + title="" + >

@@ -44,51 +44,51 @@
  • - + - +
  • - +
  • - +
  • + >
  • - > + >
  • - + - + - + - +
  • - $item, 'menu' => $menu, 'offset' => $offset)) ?> - $item, 'menu' => $menu, 'offset' => $offset)) ?> + $item, 'menu' => $menu, 'offset' => $offset)) ?> + $item, 'menu' => $menu, 'offset' => $offset)) ?> -
    >
    +
    >
    -

    >

    +

    >

    diff --git a/app/templates/keyboard_shortcuts.php b/app/templates/keyboard_shortcuts.php index 87e4293..51a4a38 100644 --- a/app/templates/keyboard_shortcuts.php +++ b/app/templates/keyboard_shortcuts.php @@ -1,23 +1,23 @@
    -

    +

      -
    • = gu
    • -
    • = gb
    • -
    • = gh
    • -
    • = gs
    • -
    • = gp
    • -
    • = r
    • -
    • = d
    • -
    • = p j
    • -
    • = n k
    • -
    • = m
    • -
    • = v
    • -
    • = o
    • -
    • = f
    • -
    • = h
    • -
    • = l
    • -
    • = z
    • -
    • = ?
    • -
    • = q
    • +
    • = gu
    • +
    • = gb
    • +
    • = gh
    • +
    • = gs
    • +
    • = gp
    • +
    • = r
    • +
    • = d
    • +
    • = p j
    • +
    • = n k
    • +
    • = m
    • +
    • = v
    • +
    • = o
    • +
    • = f
    • +
    • = h
    • +
    • = l
    • +
    • = z
    • +
    • = ?
    • +
    • = q
    diff --git a/app/templates/layout.php b/app/templates/layout.php index 88d7ee3..3ebce9a 100644 --- a/app/templates/layout.php +++ b/app/templates/layout.php @@ -12,7 +12,7 @@ - <?= isset($title) ? Miniflux\Helper\escape($title) : t('Miniflux') ?> + <?php echo isset($title) ? Miniflux\Helper\escape($title) : t('Miniflux') ?> @@ -21,43 +21,43 @@ - - + +
    -
    - %s
    ') ?> - %s') ?> - +
    + %s') ?> + %s') ?> +
    - + diff --git a/app/templates/login.php b/app/templates/login.php index e173bc7..feb4baf 100644 --- a/app/templates/login.php +++ b/app/templates/login.php @@ -19,38 +19,38 @@ Miniflux - +
    -

    +

    - + - -
    + +
    - - + + -
    +
    1): ?>
    -

    +

    $dbname): ?> - +
    - +
    diff --git a/app/templates/new_db.php b/app/templates/new_db.php index 244d35f..be771ce 100644 --- a/app/templates/new_db.php +++ b/app/templates/new_db.php @@ -1,36 +1,36 @@
    - + - - -

    + + +

    - -
    + +
    - - + + - -
    + +
    - - + +
    diff --git a/app/templates/paging.php b/app/templates/paging.php index 5a1e085..34a4f24 100644 --- a/app/templates/paging.php +++ b/app/templates/paging.php @@ -22,10 +22,10 @@ ?>
    0): ?> - « + «   $items_per_page): ?> - » + »
    diff --git a/app/templates/search.php b/app/templates/search.php index 6c7f3cc..7f0f992 100644 --- a/app/templates/search.php +++ b/app/templates/search.php @@ -1,14 +1,14 @@ - $text, 'opened' => true)) ?> + $text, 'opened' => true)) ?> -

    +

    - $item, 'menu' => $menu, 'offset' => $offset, @@ -20,7 +20,7 @@ )) ?> - $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'text' => $text)) ?> + $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'text' => $text)) ?>
    diff --git a/app/templates/search_form.php b/app/templates/search_form.php index ba23768..fa9b0c6 100644 --- a/app/templates/search_form.php +++ b/app/templates/search_form.php @@ -1,7 +1,7 @@ diff --git a/app/templates/services.php b/app/templates/services.php index dacf213..a6f298f 100644 --- a/app/templates/services.php +++ b/app/templates/services.php @@ -1,13 +1,13 @@ @@ -15,33 +15,33 @@
    - + -

    +

    -
    +
    - -
    + +
    - - + +
    -

    +

    -
    +
    - -
    + +
    - -
    + +
    - +
    diff --git a/app/templates/show_item.php b/app/templates/show_item.php index 12739b4..3efa9a9 100644 --- a/app/templates/show_item.php +++ b/app/templates/show_item.php @@ -1,119 +1,119 @@ -

    +

    -

    $feed['rtl'])) ? 'dir="rtl"' : 'dir="ltr"' ?>> - +

    $feed['rtl'])) ? 'dir="rtl"' : 'dir="ltr"' ?>> +

    • - +
    • - +
    • - +
    • - +
    • - + data-failure-message="" + data-before-message="" + data-after-message=""> +
    • - +
    -
    $feed['rtl'])) ? 'dir="rtl"' : 'dir="ltr"' ?>> +
    $feed['rtl'])) ? 'dir="rtl"' : 'dir="ltr"' ?>>
    - enclosure + enclosure
    - +
    diff --git a/app/templates/show_more.php b/app/templates/show_more.php index aac686b..6b8c18e 100644 --- a/app/templates/show_more.php +++ b/app/templates/show_more.php @@ -1,22 +1,22 @@ \ No newline at end of file diff --git a/app/templates/status_links.php b/app/templates/status_links.php index 6dc4f60..002576e 100644 --- a/app/templates/status_links.php +++ b/app/templates/status_links.php @@ -1,24 +1,24 @@
  • + >
  • + data-reverse-label="" + > + data-reverse-label="" + >
  • \ No newline at end of file diff --git a/app/templates/unread_items.php b/app/templates/unread_items.php index f57e946..c416bd5 100644 --- a/app/templates/unread_items.php +++ b/app/templates/unread_items.php @@ -1,13 +1,13 @@ - +
    -

    +

    - $item, 'menu' => $menu, 'offset' => $offset, @@ -43,9 +43,9 @@
    - +
    - $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?> + $menu, 'nb_items' => $nb_items, 'items_per_page' => $items_per_page, 'offset' => $offset, 'order' => $order, 'direction' => $direction, 'group_id' => $group_id)) ?>
    From 477f59c43b85e960dda8a2bb955c7e454bc4799b Mon Sep 17 00:00:00 2001 From: sairuk Date: Sat, 8 Oct 2016 12:05:14 +1100 Subject: [PATCH 2/2] Add titles only option to unread listing --- app/models/config.php | 1 + app/templates/item.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/config.php b/app/models/config.php index 4048e95..87a13e9 100644 --- a/app/models/config.php +++ b/app/models/config.php @@ -142,6 +142,7 @@ function get_sorting_directions() function get_display_mode() { return array( + 'titles' => t('Titles'), 'summaries' => t('Summaries'), 'full' => t('Full contents') ); diff --git a/app/templates/item.php b/app/templates/item.php index c57639b..1534761 100644 --- a/app/templates/item.php +++ b/app/templates/item.php @@ -88,7 +88,9 @@
    >
    - +

    >

    + +