]> git.agnieray.net Git - galette.git/commitdiff
Remove tidy, this is not used from a while
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 26 Nov 2021 21:42:54 +0000 (22:42 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 26 Nov 2021 21:56:23 +0000 (22:56 +0100)
.composer-require-checker.config.json
galette/lib/Galette/Core/CheckModules.php
galette/lib/Galette/Core/MailingHistory.php
tests/Galette/Core/tests/units/CheckModules.php

index 83459ec64340342688d65d0b83f83676767f8e7e..4f3e69d71085b7feea21b068bc4d4caf65e9ec1d 100644 (file)
@@ -4,7 +4,7 @@
 
     "ctype", "date", "fileinfo", "filter", "iconv", "json", "pcre", "reflection", "session", "simplexml", "spl", "xml",
 
-    "curl", "gd", "intl", "mbstring", "mysqli", "zlib", "pdo", "pgsql", "gettext", "tidy",
+    "curl", "gd", "intl", "mbstring", "mysqli", "zlib", "pdo", "pgsql", "gettext",
 
     "exif", "pcntl"
   ],
index 86e8173e34b3e26572429c50dabd1170a5a03f43..91da44615f52ff581fb06d8f2d811b196b5e1095 100644 (file)
@@ -60,7 +60,6 @@ class CheckModules
         'gd'        => true,
         'pdo'       => true,
         'curl'      => false,
-        'tidy'      => false,
         'gettext'   => false,
         'mbstring'  => true,
         'openssl'   => false,
index 6b8ffab7c7a58799cd307cd53297d82b4f201024..299c971be1b63855ad04f9fe02e32dd0aeefb606 100644 (file)
@@ -121,25 +121,6 @@ class MailingHistory extends History
                     $r['mailing_sender_name']
                         = Adherent::getSName($this->zdb, $r['mailing_sender']);
                 }
-                $body_resume = $r['mailing_body'];
-                if (strlen($body_resume) > 150) {
-                    $body_resume = substr($body_resume, 0, 150);
-                    $body_resume .= '[...]';
-                }
-                if (function_exists('tidy_parse_string')) {
-                    //if tidy extension is present, we use it to clean a bit
-                    $tidy_config = array(
-                        'clean'             => true,
-                        'show-body-only'    => true,
-                        'wrap' => 0,
-                    );
-                    $tidy = tidy_parse_string($body_resume, $tidy_config, 'UTF8');
-                    $tidy->cleanRepair();
-                    $r['mailing_body_resume'] = tidy_get_output($tidy);
-                } else {
-                    //if it is not... Well, let's serve the text as it.
-                    $r['mailing_body_resume'] = $body_resume;
-                }
 
                 $attachments = 0;
                 if (file_exists(GALETTE_ATTACHMENTS_PATH . $r[self::PK])) {
index 3d97aedea7b0dd72d6586e574f00f581e29c94a5..daa528b4fb78447af84e9f68c6dcb5d3984e6dd2 100644 (file)
@@ -104,12 +104,12 @@ class CheckModules extends atoum
                         ->array($checks->getGoods())
                             ->hasSize(0)
                         ->array($checks->getShoulds())
-                            ->hasSize(4)
+                            ->hasSize(3)
                         ->array($checks->getMissings())
                             ->hasSize(6)
                         ->string($checks->toHtml())
                             ->notContains('icon-valid.png')
-                            ->hasLength(1141);
+                            ->hasLength(1032);
     }
 
     /**