From 37b52b7361d3ac15273ca19a0b96ef74299e759e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 1 Oct 2019 18:12:21 +0200 Subject: Trim whitespace (#2544) --- docs/fr/developers/03_Backend/05_Extensions.md | 78 +++++++++++++------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'docs/fr/developers/03_Backend/05_Extensions.md') diff --git a/docs/fr/developers/03_Backend/05_Extensions.md b/docs/fr/developers/03_Backend/05_Extensions.md index 2ee81b781..3a23e0c5a 100644 --- a/docs/fr/developers/03_Backend/05_Extensions.md +++ b/docs/fr/developers/03_Backend/05_Extensions.md @@ -49,13 +49,13 @@ Exemple de code : view->a_variable = 'FooBar'; - } + public function indexAction() { + $this->view->a_variable = 'FooBar'; + } - public function worldAction() { - $this->view->a_variable = 'Hello World!'; - } + public function worldAction() { + $this->view->a_variable = 'Hello World!'; + } } ?> @@ -75,7 +75,7 @@ Comme expliqué plus haut, les vues sont du code HTML mixé à du PHP. Exemple d ```html

- Phrase passée en paramètre : a_variable; ?> + Phrase passée en paramètre : a_variable; ?>

``` @@ -119,7 +119,7 @@ Pour profiter pleinement du système de routage de Minz, il est fortement décon ```html

- Accéder à la page Hello world! + Accéder à la page Hello world!

``` @@ -130,13 +130,13 @@ Préférez donc l'utilisation de la classe `Minz_Url` et de sa méthode `display ```php 'hello', - 'a' => 'world', - 'params' => array( - 'foo' => 'bar', - ) -); +$url_array = [ + 'c' => 'hello', + 'a' => 'world', + 'params' => [ + 'foo' => 'bar', + ], +]; // Affichera quelque chose comme .?c=hello&a=world&foo=bar echo Minz_Url::display($url_array); @@ -166,10 +166,10 @@ Exemple de code : ```php 'hello', - 'a' => 'world' -); +$url_array = [ + 'c' => 'hello', + 'a' => 'world', +]; // Indique à Minz de rediriger l'utilisateur vers la page hello/world. // Notez qu'il s'agit d'une redirection au sens Minz du terme, pas d'une redirection que le navigateur va avoir à gérer (code HTTP 301 ou 302) @@ -188,10 +188,10 @@ Il est très fréquent de vouloir effectuer une redirection tout en affichant un ```php 'hello', - 'a' => 'world' -); +$url_array = [ + 'c' => 'hello', + 'a' => 'world', +]; $feedback_good = 'Tout s\'est bien passé !'; $feedback_bad = 'Oups, quelque chose n\'a pas marché.'; @@ -225,19 +225,19 @@ Les fichiers de traduction sont assez simples : il s'agit seulement de retourne ```php array( - 'actualize' => 'Actualiser', - 'back_to_rss_feeds' => '← Retour à vos flux RSS', - 'cancel' => 'Annuler', - 'create' => 'Créer', - 'disable' => 'Désactiver', - ), - 'freshrss' => array( - '_' => 'FreshRSS', - 'about' => 'À propos de FreshRSS', - ), -); +return [ + 'action' => [ + 'actualize' => 'Actualiser', + 'back_to_rss_feeds' => '← Retour à vos flux RSS', + 'cancel' => 'Annuler', + 'create' => 'Créer', + 'disable' => 'Désactiver', + ], + 'freshrss' => [ + '_' => 'FreshRSS', + 'about' => 'À propos de FreshRSS', + ], +]; ?> ``` @@ -246,9 +246,9 @@ Pour accéder à ces traductions, `Minz_Translate` va nous aider à l'aide de sa ```html

- - - + + +

``` -- cgit v1.2.3 From 7a5236de3f13f08b8c51eb183c0dcf1c8c85beca Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite 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 'docs/fr/developers/03_Backend/05_Extensions.md') 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 @@