From 7fd88adeb081e2996cad48225bf0c74cfe8b90ef Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 14 Aug 2019 22:19:24 +0200 Subject: Add hooks to ExtensionManager (#2482) Hooks allow to: - add items in menus - perform new actions at the end of FreshRSS initialization --- app/layout/header.phtml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/layout/header.phtml') diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 410ac1ff0..380575254 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -66,6 +66,8 @@ if (FreshRSS_Auth::accessNeedsAction()) {
  • + +
  • @@ -76,11 +78,15 @@ if (FreshRSS_Auth::accessNeedsAction()) { disable_update) { ?>
  • + +
  • + +
  • Date: Wed, 23 Oct 2019 11:18:20 +0200 Subject: Take advantage of PHP 5.4+ short echo (#2585) * Take advantage of PHP 5.4+ short echo https://php.net/migration54.new-features thanks to https://github.com/FreshRSS/FreshRSS/pull/2495 Use `` instead of `` 10kB of code saved :-) Done with regular expression: ``` <\?php echo (.+?);? *\?> ``` * Try Travis fix https://github.com/squizlabs/PHP_CodeSniffer/issues/2045#issuecomment-395238272 --- app/install.php | 190 +++++++++++----------- app/layout/aside_configure.phtml | 52 +++--- app/layout/aside_feed.phtml | 68 ++++---- app/layout/aside_stats.phtml | 14 +- app/layout/aside_subscription.phtml | 14 +- app/layout/header.phtml | 72 ++++---- app/layout/layout.phtml | 28 ++-- app/layout/nav_entries.phtml | 6 +- app/layout/nav_menu.phtml | 80 ++++----- app/layout/simple.phtml | 34 ++-- app/views/auth/formLogin.phtml | 22 +-- app/views/auth/index.phtml | 40 ++--- app/views/auth/register.phtml | 28 ++-- app/views/configure/archiving.phtml | 46 +++--- app/views/configure/display.phtml | 104 ++++++------ app/views/configure/queries.phtml | 60 +++---- app/views/configure/reading.phtml | 126 +++++++------- app/views/configure/sharing.phtml | 50 +++--- app/views/configure/shortcut.phtml | 114 ++++++------- app/views/configure/system.phtml | 46 +++--- app/views/error/index.phtml | 6 +- app/views/extension/index.phtml | 38 ++--- app/views/feed/add.phtml | 58 +++---- app/views/helpers/category/update.phtml | 32 ++-- app/views/helpers/extension/configure.phtml | 8 +- app/views/helpers/extension/details.phtml | 12 +- app/views/helpers/feed/update.phtml | 160 +++++++++--------- app/views/helpers/index/normal/entry_bottom.phtml | 38 ++--- app/views/helpers/index/normal/entry_header.phtml | 12 +- app/views/helpers/logs_pagination.phtml | 12 +- app/views/helpers/pagination.phtml | 16 +- app/views/importExport/index.phtml | 36 ++-- app/views/index/about.phtml | 26 +-- app/views/index/global.phtml | 16 +- app/views/index/logs.phtml | 14 +- app/views/index/normal.phtml | 24 +-- app/views/index/reader.phtml | 28 ++-- app/views/index/rss.phtml | 22 +-- app/views/index/tos.phtml | 10 +- app/views/stats/idle.phtml | 18 +- app/views/stats/index.phtml | 60 +++---- app/views/stats/repartition.phtml | 34 ++-- app/views/subscription/bookmarklet.phtml | 20 +-- app/views/subscription/feed.phtml | 4 +- app/views/subscription/index.phtml | 70 ++++---- app/views/update/apply.phtml | 4 +- app/views/update/checkInstall.phtml | 18 +- app/views/update/index.phtml | 18 +- app/views/user/manage.phtml | 66 ++++---- app/views/user/profile.phtml | 68 ++++---- app/views/user/validateEmail.phtml | 12 +- app/views/user_mailer/email_need_validation.txt | 6 +- docs/en/developers/03_Backend/05_Extensions.md | 6 +- docs/fr/developers/03_Backend/05_Extensions.md | 6 +- phpcs.xml | 4 +- 55 files changed, 1089 insertions(+), 1087 deletions(-) (limited to 'app/layout/header.phtml') diff --git a/app/install.php b/app/install.php index f8bc6dd4e..96bee34a1 100644 --- a/app/install.php +++ b/app/install.php @@ -334,18 +334,18 @@ function printStep0() { $languages = Minz_Translate::availableLanguages(); ?> -

    +

    - +
    - +
    @@ -354,10 +354,10 @@ function printStep0() { @@ -369,118 +369,118 @@ function printStep0() { function printStep1() { $res = checkRequirements(); ?> - + -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    -

    +

    - - + + - + -

    +

    -

    +

    -

    +

    - +
    - +
    +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - +
    - - + + - +
    @@ -576,23 +576,23 @@ function printStep3() { $user_default_config = Minz_Configuration::get('default_user'); ?> -

    +

    -

    +

    - +
    - +
    - +
    - +
    - +
    - tabindex="5" /> - + tabindex="5" /> +
    - - + +
    - - + + - +
    @@ -635,14 +635,14 @@ function printStep3() { function printStep4() { ?> -

    - +

    + -

    +

    - <?php echo _t('install.title'); ?> - - + <?= _t('install.title') ?> + +
    -

    -

    +

    +

    @@ -729,6 +729,6 @@ case 5: ?>
    - + diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 747858f4e..1267f747c 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,54 +1,54 @@ diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 637acf4a4..4d5682001 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -8,30 +8,30 @@ } ?> -
    - +
    +
    - - + +
    - + - +
    - - + +
    diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml index b90950510..4233f7fd4 100644 --- a/app/views/auth/register.phtml +++ b/app/views/auth/register.phtml @@ -1,36 +1,36 @@
    -

    +

    -
    - + +
    - - + +
    show_email_field) { ?>
    - +
    - +
    - +
    show_tos_checkbox) { ?>
    @@ -42,11 +42,11 @@ 'php', true )); ?> - - - + + +
    -

    +

    diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml index 0387a2b96..7d76e4dcc 100644 --- a/app/views/configure/archiving.phtml +++ b/app/views/configure/archiving.phtml @@ -1,17 +1,17 @@ partial('aside_configure'); ?>
    - + -
    - - -

    + + + +

    - +
    - () + ?> ()
    @@ -94,7 +94,7 @@
    -
    @@ -102,46 +102,46 @@
    - - + +
    - -
    - + + +
    - +
    - nb_total), format_bytes($this->size_user)); ?> + nb_total), format_bytes($this->size_user)) ?>
    - +
    -
    - + +
    - - + +
    - +
    - size_total); ?> + size_total) ?>
    diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 60b7748c5..c1cfecc2a 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -1,47 +1,47 @@ partial('aside_configure'); ?>
    - + -
    - - + + +
    - +
    - - +
    - +
      themes); $i = 1; ?> themes as $theme) { ?> - theme === $theme['id']) {echo "checked";}?> value="" data-leave-validation="theme === $theme['id']) ? 1 : 0; ?>"/> + theme === $theme['id']) {echo "checked";}?> value="" data-leave-validation="theme === $theme['id']) ? 1 : 0 ?>"/>
    • - +
      -
      -
      -
      +
      +
      +
    • @@ -52,84 +52,84 @@ content_width; ?>
      - +
      - + - - -
      - + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - + +
       
      topline_read ? ' checked="checked"' : ''; ?> data-leave-validation="topline_read; ?>"/>topline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="topline_favorite; ?>"/>topline_read ? ' checked="checked"' : '' ?> data-leave-validation="topline_read ?>"/>topline_favorite ? ' checked="checked"' : '' ?> data-leave-validation="topline_favorite ?>"/> topline_display_authors ? ' checked="checked"' : ''; ?> data-leave-validation="topline_display_authors; ?>"/>topline_date ? ' checked="checked"' : ''; ?> data-leave-validation="topline_date; ?>"/>topline_link ? ' checked="checked"' : ''; ?> data-leave-validation="topline_link; ?>"/>topline_display_authors ? ' checked="checked"' : '' ?> data-leave-validation="topline_display_authors ?>"/>topline_date ? ' checked="checked"' : '' ?> data-leave-validation="topline_date ?>"/>topline_link ? ' checked="checked"' : '' ?> data-leave-validation="topline_link ?>"/>
      bottomline_read ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_read; ?>"/>bottomline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_favorite; ?>"/>bottomline_tags ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_tags; ?>"/>bottomline_sharing ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_sharing; ?>"/>bottomline_read ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_read ?>"/>bottomline_favorite ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_favorite ?>"/>bottomline_tags ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_tags ?>"/>bottomline_sharing ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_sharing ?>"/> bottomline_date ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_date; ?>"/>bottomline_link ? ' checked="checked"' : ''; ?> data-leave-validation="bottomline_link; ?>"/>bottomline_date ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_date ?>"/>bottomline_link ? ' checked="checked"' : '' ?> data-leave-validation="bottomline_link ?>"/>

      - +
      - +
      - - + +
      diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml index baaf74954..a0f600b5d 100644 --- a/app/views/configure/queries.phtml +++ b/app/views/configure/queries.phtml @@ -1,70 +1,70 @@ partial('aside_configure'); ?>
      - + -
      - - + + + queries as $key => $query) { ?> -
      -
      '> - - + + sharing as $key => $share_options) { $share = FreshRSS_Share::get($share_options['type']); $share->update($share_options); ?> -
      +
      - - - + + +
      - + formType() === 'advanced') { ?> - + - + - +
      formType() === 'advanced') { ?> - +
      @@ -52,19 +52,19 @@
      - +
      - - + +
      diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index 412ea676d..4412266cc 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -1,181 +1,181 @@ partial('aside_configure'); ?>
      - + list_keys as $key) { ?> - shortcuts; ?> -
      - - + + + - + - +
      - +
      - +
      - +
      - +
      - +
      - +
      - +
      - +
      - + -

      +

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

      +

      - +
      - +
      - +
      - +
      - +
      - +
      - - + +
      - +
      - +
      - +
      - +
      - +
      - - + +
      - +
      - +
      - +
      - +
      - +
      - +
      - +
      - +
      - - + +
      - +
      - +
      - +
      - +
      - - + +
      diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml index eb0e68dfc..1a718e20f 100644 --- a/app/views/configure/system.phtml +++ b/app/views/configure/system.phtml @@ -1,31 +1,31 @@ partial('aside_configure'); ?>
      - + -
      - - + + +
      - +
      - +
      - +
      - +
      - +
      - - + +
      @@ -47,41 +47,41 @@ name="force-email-validation" id="force-email-validation" value="1" - force_email_validation ? 'checked="checked"' : ''; ?> - data-leave-validation="force_email_validation; ?>" + force_email_validation ? 'checked="checked"' : '' ?> + data-leave-validation="force_email_validation ?>" /> - +
      - +
      - +
      - +
      - +
      - +
      - - + +
      - - + +
      diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml index 8fd74e8bf..d5618d54c 100644 --- a/app/views/error/index.phtml +++ b/app/views/error/index.phtml @@ -1,9 +1,9 @@
      -

      code; ?>

      +

      code ?>

      - errorMessage, ENT_NOQUOTES, 'UTF-8'); ?>
      - + errorMessage, ENT_NOQUOTES, 'UTF-8') ?>
      +

      diff --git a/app/views/extension/index.phtml b/app/views/extension/index.phtml index 6439a0333..f5c5bf032 100644 --- a/app/views/extension/index.phtml +++ b/app/views/extension/index.phtml @@ -1,14 +1,14 @@ partial('aside_configure'); ?>
      - + -

      +

      - + extension_list['system'])) { ?> -

      +

      extension_list['system'] as $ext) { $this->ext_details = $ext; @@ -18,7 +18,7 @@ extension_list['user'])) { ?> -

      +

      extension_list['user'] as $ext) { $this->ext_details = $ext; @@ -30,34 +30,34 @@ if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) { ?> -

      +

      available_extensions)) { ?> -

      +

      - - - - + + + + available_extensions as $ext) { ?> - - - + + +
      - + extensions_installed[$ext['name']])) { ?> extensions_installed[$ext['name']], $ext['version']) >= 0) { ?> - + extensions_installed[$ext['name']] != $ext['version']) { ?> - + @@ -69,8 +69,8 @@ extension) ? ' class="active"' : ''; ?> -> -
      > +> +
      > extension)) { $this->renderHelper('extension/configure'); diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index 340970b25..e39f45a86 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -1,90 +1,90 @@ feed) { ?>
      -

      +

      load_ok) { ?> -

      +

      -
      - - + + + load_ok) { ?>
      - +
      - +
      feed->description(); if ($desc != '') { ?>
      - +
      - +
      - +
      - feed->website(); ?> - + feed->website() ?> +
      - +
      - - + +
      - +
      - +
      - + feed->httpAuth(false); ?>
      - +
      - +
      - +
      - +
      - +
      - - + +
      diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml index 31482f163..6a4c041ba 100644 --- a/app/views/helpers/category/update.phtml +++ b/app/views/helpers/category/update.phtml @@ -1,17 +1,17 @@
      -

      category->name(); ?>

      +

      category->name() ?>

      - +
      -
      - - + + +
      - +
      - category->id() == FreshRSS_CategoryDAO::DEFAULTCATEGORYID ? 'disabled="disabled"' : ''; ?> /> @@ -20,21 +20,21 @@
      - + + data-str-confirm="" + formaction="category->id()) ?>" + formmethod="post"> category->isDefault()): ?> + data-str-confirm="" + formaction="category->id()) ?>" + formmethod="post">
      - + category->attributes('archiving'); if (empty($archiving)) { @@ -138,7 +138,7 @@