Updating the import for members short_descr
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 30 Aug 2017 19:46:15 +0000 (15:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 30 Aug 2017 19:47:02 +0000 (15:47 -0400)
Updating how it is getting short_descr. Removing part where it explodes
and implodes based on space.

models/admin/management/import/members.php

index a98c0e2..29e18f7 100644 (file)
@@ -805,7 +805,8 @@ if (!$failure) {
 
         // Create truncated short_descr from descriptions - Less tags, html encoded characters, newlines, tabs, etc.
         $stripped = str_replace(PHP_EOL, '', preg_replace('/\t+/', '', preg_replace("/&#?[a-z0-9]{2,8};/i", "", strip_tags($val['description']))));
-        $short_descr = substr(implode(' ', array_slice(explode(' ', $stripped), 0, 30)), 0, $short_desc_char_limit - strlen($ellipsis));
+        //$short_descr = substr(implode(' ', array_slice(explode(' ', $stripped), 0, 30)), 0, $short_desc_char_limit - strlen($ellipsis));
+        $short_descr = substr( $stripped, 0, $short_desc_char_limit - strlen( $ellipsis ) );
 
         if (strlen($short_descr) < strlen($stripped)) {
             $short_descr .= $ellipsis;