From 8352173fc37d37ad4a99af2a4508a8b7e9600f50 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 7 Oct 2010 17:30:10 -0400 Subject: [PATCH] Use Horde_Core_Factory_TextFilter directly instead of going through an unnesessary binder --- agora/lib/Messages.php | 4 ++-- ansel/lib/Ajax/Imple/EditCaption.php | 2 +- ansel/lib/Storage.php | 2 +- ansel/lib/Tile/Image.php | 2 +- ansel/lib/View/Base.php | 2 +- ansel/templates/captions/captions.inc | 2 +- ansel/templates/image/crop_image.inc | 2 +- ansel/templates/image/edit_image.inc | 2 +- ansel/templates/image/preview_cropimage.inc | 2 +- ansel/templates/image/preview_image.inc | 2 +- ansel/templates/image/resize_image.inc | 2 +- ansel/templates/view/gallery.inc | 2 +- ansel/templates/view/gallerylightbox.inc | 2 +- ansel/templates/view/image.inc | 2 +- chora/annotate.php | 4 ++-- chora/app/views/file/pretty.html.php | 2 +- chora/browsedir.php | 4 ++-- chora/cvsgraph.php | 2 +- chora/diff.php | 2 +- chora/history.php | 2 +- chora/lib/Chora.php | 4 ++-- chora/stats.php | 2 +- chora/templates/checkout/checkout.inc | 2 +- folks/lib/Driver.php | 2 +- folks/lib/Forms/Activity.php | 2 +- folks/lib/Notification/facebook.php | 2 +- framework/Core/lib/Horde.php | 2 +- framework/Core/lib/Horde/Config.php | 4 ++-- framework/Core/lib/Horde/Core/Binder/TextFilter.php | 17 ----------------- framework/Core/lib/Horde/Core/Factory/MimeViewer.php | 2 +- framework/Core/lib/Horde/Core/Factory/TextFilter.php | 2 +- framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php | 2 +- framework/Core/lib/Horde/Registry.php | 1 - framework/Core/lib/Horde/Themes.php | 2 +- framework/Core/package.xml | 2 -- framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php | 2 +- framework/Rampage/scripts/Horde/Rampage/rampage.php | 2 +- horde/lib/Block/fortune.php | 2 +- horde/lib/Block/twitter_timeline.php | 1 - horde/services/twitter.php | 2 +- imp/lib/Compose.php | 10 +++++----- imp/lib/Compose/Stationery.php | 2 +- imp/lib/Contents.php | 2 +- imp/lib/IMP.php | 2 +- imp/lib/Prefs/Ui.php | 2 +- imp/lib/Ui/Compose.php | 2 +- imp/lib/Ui/Mailbox.php | 2 +- imp/lib/Ui/Message.php | 4 ++-- imp/mailbox.php | 2 +- imp/message-mimp.php | 2 +- imp/view.php | 2 +- ingo/lib/Ingo.php | 2 +- jonah/delivery/rss.php | 2 +- jonah/lib/Api.php | 6 +++--- jonah/lib/Block/latest.php | 2 +- jonah/lib/Block/story.php | 2 +- jonah/lib/Driver.php | 4 ++-- jonah/lib/View/StoryPdf.php | 2 +- jonah/lib/View/StoryView.php | 2 +- kronolith/templates/itip/notification.html.php | 2 +- kronolith/templates/view/view.inc | 6 +++--- luxor/lib/Lang/Generic.php | 2 +- luxor/lib/Luxor.php | 4 ++-- mnemo/lib/Ajax/Imple/EditNote.php | 2 +- mnemo/lib/Block/note.php | 2 +- mnemo/templates/view/memo.inc | 2 +- nag/lib/Task.php | 2 +- whups/lib/Renderer/Comment.php | 2 +- 68 files changed, 80 insertions(+), 101 deletions(-) delete mode 100644 framework/Core/lib/Horde/Core/Binder/TextFilter.php diff --git a/agora/lib/Messages.php b/agora/lib/Messages.php index 3fdf6ba6b..d24608487 100644 --- a/agora/lib/Messages.php +++ b/agora/lib/Messages.php @@ -1063,7 +1063,7 @@ class Agora_Messages { $filters_params[0]['parselevel'] = Horde_Text_Filter_Text2html::NOHTML; } - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($body, $filters, $filters_params); + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($body, $filters, $filters_params); } /** @@ -1148,7 +1148,7 @@ class Agora_Messages { $message['message_id'] = $id; $message['message_author'] = htmlspecialchars($message['message_author']); $message['message_subject'] = htmlspecialchars($this->convertFromDriver($message['message_subject'])); - $message['message_body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')filter($this->convertFromDriver($message['body']), 'highlightquotes'); + $message['message_body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')filter($this->convertFromDriver($message['body']), 'highlightquotes'); if ($message['attachments']) { $message['message_attachment'] = $this->getAttachmentLink($id); } diff --git a/ansel/lib/Ajax/Imple/EditCaption.php b/ansel/lib/Ajax/Imple/EditCaption.php index 0333160ad..c75af0216 100644 --- a/ansel/lib/Ajax/Imple/EditCaption.php +++ b/ansel/lib/Ajax/Imple/EditCaption.php @@ -78,7 +78,7 @@ class Ansel_Ajax_Imple_EditCaption extends Horde_Core_Ajax_Imple return ''; } } - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter( + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter( $image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); diff --git a/ansel/lib/Storage.php b/ansel/lib/Storage.php index 8ea63e201..444e484b3 100644 --- a/ansel/lib/Storage.php +++ b/ansel/lib/Storage.php @@ -900,7 +900,7 @@ class Ansel_Storage if ($galleries[$gallery_id]['perm']) { $data = array((string)Ansel::getImageUrl($image->id, $image_view, $full, $style), htmlspecialchars($image->filename), - $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)), + $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)), $image->id, 0); diff --git a/ansel/lib/Tile/Image.php b/ansel/lib/Tile/Image.php index 9187b2127..56dfae674 100644 --- a/ansel/lib/Tile/Image.php +++ b/ansel/lib/Tile/Image.php @@ -103,7 +103,7 @@ class Ansel_Tile_Image ? str_replace('%i', $image->id, $params['image_onclick']) : ''); - $imageCaption = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter( + $imageCaption = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter( $image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); diff --git a/ansel/lib/View/Base.php b/ansel/lib/View/Base.php index 85dc5334f..0ef80ef5c 100644 --- a/ansel/lib/View/Base.php +++ b/ansel/lib/View/Base.php @@ -265,7 +265,7 @@ abstract class Ansel_View_Base $data = array((string)Ansel::getImageUrl($image->id, $params['image_view'], $params['full'], $style), htmlspecialchars($image->filename), - $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)), + $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($image->caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)), $image->id, $curpage); if ($params['view_links']) { diff --git a/ansel/templates/captions/captions.inc b/ansel/templates/captions/captions.inc index 3aa7c6bbc..d4c2fb151 100644 --- a/ansel/templates/captions/captions.inc +++ b/ansel/templates/captions/captions.inc @@ -12,7 +12,7 @@ get('desc')): ?>

- getInstance('Horde_Text_Filter')->filter($gallery->get('desc'), 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> + getInstance('Horde_Core_Factory_TextFilter')->filter($gallery->get('desc'), 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>

diff --git a/ansel/templates/image/crop_image.inc b/ansel/templates/image/crop_image.inc index 49de83463..ae61f5933 100644 --- a/ansel/templates/image/crop_image.inc +++ b/ansel/templates/image/crop_image.inc @@ -120,7 +120,7 @@ echo $selfUrl->copy()->add('actionID', 'resizeedit')->link() . Horde::img('image ' ?>
- caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> + caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
diff --git a/ansel/templates/image/edit_image.inc b/ansel/templates/image/edit_image.inc index 918d33491..79cbb2561 100644 --- a/ansel/templates/image/edit_image.inc +++ b/ansel/templates/image/edit_image.inc @@ -35,5 +35,5 @@ echo $selfUrl->copy()->add('actionID', 'resizeedit')->link() . Horde::img('image
' ?>
- caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> + caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
diff --git a/ansel/templates/image/preview_cropimage.inc b/ansel/templates/image/preview_cropimage.inc index 4c9f9b0ae..175116e85 100644 --- a/ansel/templates/image/preview_cropimage.inc +++ b/ansel/templates/image/preview_cropimage.inc @@ -30,5 +30,5 @@ if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT))
'?>
-caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> +caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
diff --git a/ansel/templates/image/preview_image.inc b/ansel/templates/image/preview_image.inc index af77e34bc..045402b24 100644 --- a/ansel/templates/image/preview_image.inc +++ b/ansel/templates/image/preview_image.inc @@ -32,5 +32,5 @@ if ($gallery->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::EDIT))
' ?>
-caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> +caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
diff --git a/ansel/templates/image/resize_image.inc b/ansel/templates/image/resize_image.inc index b86303c96..28aee1b98 100644 --- a/ansel/templates/image/resize_image.inc +++ b/ansel/templates/image/resize_image.inc @@ -78,5 +78,5 @@ echo $selfUrl->copy()->add(array('actionID' => 'resizeedit'))->link() . Horde::i
' ?>
- caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?> + caption ? $image->caption : $image->filename; echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($caption, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) ?>
diff --git a/ansel/templates/view/gallery.inc b/ansel/templates/view/gallery.inc index 61c7bcc2d..16b71cb79 100644 --- a/ansel/templates/view/gallery.inc +++ b/ansel/templates/view/gallery.inc @@ -109,7 +109,7 @@ function downloadSelected()
view->gallery->get('desc')): ?> diff --git a/ansel/templates/view/gallerylightbox.inc b/ansel/templates/view/gallerylightbox.inc index 781205898..658aeb6b5 100644 --- a/ansel/templates/view/gallerylightbox.inc +++ b/ansel/templates/view/gallerylightbox.inc @@ -126,7 +126,7 @@ function downloadSelected() view->gallery->get('desc')): ?>
diff --git a/ansel/templates/view/image.inc b/ansel/templates/view/image.inc index 5a9b33d48..171d6daef 100644 --- a/ansel/templates/view/image.inc +++ b/ansel/templates/view/image.inc @@ -106,7 +106,7 @@ function arrowHandler(e) 'photodiv', 'width' => $this->_geometry['width'], 'height' => $this->_geometry['height'])) ?>
diff --git a/chora/annotate.php b/chora/annotate.php index 7256397cc..254926aa0 100644 --- a/chora/annotate.php +++ b/chora/annotate.php @@ -42,7 +42,7 @@ try { Chora::fatal($e); } -$title = sprintf(_("Source Annotation of %s (revision %s)"), $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true)), $rev); +$title = sprintf(_("Source Annotation of %s (revision %s)"), $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true)), $rev); $extraLink = sprintf('%s | %s', Chora::url('co', $where, array('r' => $rev)), _("View"), Chora::url('co', $where, array('r' => $rev, 'p' => 1)), _("Download")); @@ -72,7 +72,7 @@ while (list(,$line) = each($lines)) { } $prev = $fl->queryPreviousRevision($rev); - $line = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($line['line'], 'space2html', array('encode' => true, 'encode_all' => true)); + $line = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($line['line'], 'space2html', array('encode' => true, 'encode_all' => true)); include CHORA_TEMPLATES . '/annotate/line.inc'; } diff --git a/chora/app/views/file/pretty.html.php b/chora/app/views/file/pretty.html.php index 0f215f426..d670e2e9c 100644 --- a/chora/app/views/file/pretty.html.php +++ b/chora/app/views/file/pretty.html.php @@ -5,7 +5,7 @@ if (strpos($this->mimeType, 'text/plain') !== false) { $data = $this->pretty->render('inline'); $data = reset($data); - echo '
' . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($data['data'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . '
'; + echo '
' . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($data['data'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . '
'; } elseif (strpos($this->mimeType, 'image/') !== false) { echo Horde::img(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1), '', '', ''); } elseif ($this->pretty->canRender('inline')) { diff --git a/chora/browsedir.php b/chora/browsedir.php index 81063b977..a20190685 100644 --- a/chora/browsedir.php +++ b/chora/browsedir.php @@ -86,7 +86,7 @@ if ($dirList) { continue; } $url = Chora::url('browsedir', $where . '/' . $currentDir . '/', $branchArgs); - $currDir = $injector->getInstance('Horde_Text_Filter')->filter($currentDir, 'space2html', array('encode' => true, 'encode_all' => true)); + $currDir = $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($currentDir, 'space2html', array('encode' => true, 'encode_all' => true)); require CHORA_TEMPLATES . '/directory/dir.inc'; } echo ''; @@ -118,7 +118,7 @@ if ($fileList) { $log = $lg->queryLog(); $attic = $currFile->isDeleted(); $fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname; - $name = $injector->getInstance('Horde_Text_Filter')->filter($realname, 'space2html', array('encode' => true, 'encode_all' => true)); + $name = $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($realname, 'space2html', array('encode' => true, 'encode_all' => true)); $url = Chora::url('browsefile', $fileName, $branchArgs); $readableDate = Chora::readableTime($date); if ($log) { diff --git a/chora/cvsgraph.php b/chora/cvsgraph.php index bf0974ccd..872d6ac77 100644 --- a/chora/cvsgraph.php +++ b/chora/cvsgraph.php @@ -50,7 +50,7 @@ if (Horde_Util::getFormData('show_image')) { } // Display the wrapper page for the image. -$title = sprintf(_("Graph for %s"), $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); +$title = sprintf(_("Graph for %s"), $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); $extraLink = Chora::getFileViews($where, 'cvsgraph'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/diff.php b/chora/diff.php index bbd9318a4..c484cfb30 100644 --- a/chora/diff.php +++ b/chora/diff.php @@ -55,7 +55,7 @@ if ($type != 'colored') { $abbrev_r1 = $VC->abbrev($r1); $abbrev_r2 = $VC->abbrev($r2); $title = sprintf(_("Diff for %s between version %s and %s"), - $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true)), $abbrev_r1, $abbrev_r2); + $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true)), $abbrev_r1, $abbrev_r2); /* Format log entries. */ $log_messages = array(); diff --git a/chora/history.php b/chora/history.php index e73245303..61e04ee28 100644 --- a/chora/history.php +++ b/chora/history.php @@ -126,7 +126,7 @@ foreach ($grid as $cols) { $maxCol = max($val, $maxCol); } -$title = sprintf(_("Source Branching View for %s"), $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); +$title = sprintf(_("Source Branching View for %s"), $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); $extraLink = Chora::getFileViews($where, 'history'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index e70649b23..392d54b6b 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -60,7 +60,7 @@ class Chora if (!empty($onb)) { $url = $url->add('onb', $onb); } - $bar .= '/ ' . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($dir, 'space2html', array('encode' => true, 'encode_all' => true)) . ' '; + $bar .= '/ ' . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($dir, 'space2html', array('encode' => true, 'encode_all' => true)) . ' '; } } @@ -460,7 +460,7 @@ class Chora */ static public function formatLogMessage($log) { - $log = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $log = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($log, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); return (empty($GLOBALS['conf']['tickets']['regexp']) || empty($GLOBALS['conf']['tickets']['replacement'])) ? $log diff --git a/chora/stats.php b/chora/stats.php index a1cd819c5..a6c0dccf2 100644 --- a/chora/stats.php +++ b/chora/stats.php @@ -29,7 +29,7 @@ foreach ($fl->queryLogs() as $lg) { } arsort($stats); -$title = sprintf(_("Statistics for %s"), $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); +$title = sprintf(_("Statistics for %s"), $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); Horde::addScriptFile('tables.js', 'horde'); require CHORA_TEMPLATES . '/common-header.inc'; require CHORA_TEMPLATES . '/menu.inc'; diff --git a/chora/templates/checkout/checkout.inc b/chora/templates/checkout/checkout.inc index 9ac7a5db5..1b4695982 100644 --- a/chora/templates/checkout/checkout.inc +++ b/chora/templates/checkout/checkout.inc @@ -21,7 +21,7 @@ if (strpos($mime_type, 'text/plain') !== false) { $data = $pretty->render('inline'); $data = reset($data); - echo '
' . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($data['data'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . '
'; + echo '
' . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($data['data'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . '
'; } elseif (strpos($mime_type, 'image/') !== false) { echo Horde::img(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1), '', '', ''); } elseif ($pretty->canRender('inline')) { diff --git a/folks/lib/Driver.php b/folks/lib/Driver.php index 5e78b0f55..cb0abdc29 100644 --- a/folks/lib/Driver.php +++ b/folks/lib/Driver.php @@ -337,7 +337,7 @@ class Folks_Driver { $filters_params[0]['parselevel'] = Horde_Text_Filter_Text2html::NOHTML; } - $profile['user_description'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter(trim($profile['user_description']), $filters, $filters_params); + $profile['user_description'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(trim($profile['user_description']), $filters, $filters_params); // Get user last external data foreach ($profile as $key => $value) { diff --git a/folks/lib/Forms/Activity.php b/folks/lib/Forms/Activity.php index 863f63444..b940d456e 100644 --- a/folks/lib/Forms/Activity.php +++ b/folks/lib/Forms/Activity.php @@ -48,7 +48,7 @@ class Folks_Activity_Form extends Horde_Form { $filters_params[0]['parselevel'] = Horde_Text_Filter_Text2html::NOHTML; } - $message = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter(trim($message), $filters, $filters_params); + $message = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(trim($message), $filters, $filters_params); $result = $GLOBALS['folks_driver']->logActivity($message, 'folks:custom'); if ($result instanceof PEAR_Error) { diff --git a/folks/lib/Notification/facebook.php b/folks/lib/Notification/facebook.php index c6c8aacbe..3ec76fea8 100644 --- a/folks/lib/Notification/facebook.php +++ b/folks/lib/Notification/facebook.php @@ -162,6 +162,6 @@ class Folks_Notification_facebook extends Folks_Notification { private function _formatBody($subject, $body) { return '' . $subject . ': ' - . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($body, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)); + . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($body, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)); } } diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index d4ebb3e97..841486397 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -316,7 +316,7 @@ HTML; /* Separate JS files with a newline since some * compressors may strip trailing terminators. */ try { - $out .= $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($js_text, 'JavascriptMinify', $jsmin_params) . "\n"; + $out .= $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($js_text, 'JavascriptMinify', $jsmin_params) . "\n"; } catch (Horde_Exception $e) { $out .= $js_text . "\n"; } diff --git a/framework/Core/lib/Horde/Config.php b/framework/Core/lib/Horde/Config.php index b3320a254..b540d7564 100644 --- a/framework/Core/lib/Horde/Config.php +++ b/framework/Core/lib/Horde/Config.php @@ -418,7 +418,7 @@ class Horde_Config continue; } $name = $node->getAttribute('name'); - $desc = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($node->getAttribute('desc'), 'linkurls'); + $desc = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($node->getAttribute('desc'), 'linkurls'); $required = !($node->getAttribute('required') == 'false'); $quote = !($node->getAttribute('quote') == 'false'); @@ -434,7 +434,7 @@ class Horde_Config $conf[$name] = array( '_type' => 'description', - 'desc' => $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($this->_default($curctx, $this->_getNodeOnlyText($node)), 'linkurls') + 'desc' => $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($this->_default($curctx, $this->_getNodeOnlyText($node)), 'linkurls') ); break; diff --git a/framework/Core/lib/Horde/Core/Binder/TextFilter.php b/framework/Core/lib/Horde/Core/Binder/TextFilter.php deleted file mode 100644 index e3bcc3c02..000000000 --- a/framework/Core/lib/Horde/Core/Binder/TextFilter.php +++ /dev/null @@ -1,17 +0,0 @@ - $this->_injector->getInstance('Horde_Log_Logger'), 'temp_file' => array('Horde', 'getTempFile'), - 'text_filter' => array($this->_injector->getInstance('Horde_Text_Filter'), 'filter') + 'text_filter' => array($this->_injector->getInstance('Horde_Core_Factory_TextFilter'), 'filter') )); switch ($config['driver']) { diff --git a/framework/Core/lib/Horde/Core/Factory/TextFilter.php b/framework/Core/lib/Horde/Core/Factory/TextFilter.php index 330f119a6..1fb2f6ae6 100644 --- a/framework/Core/lib/Horde/Core/Factory/TextFilter.php +++ b/framework/Core/lib/Horde/Core/Factory/TextFilter.php @@ -55,7 +55,7 @@ class Horde_Core_Factory_TextFilter * @return Horde_Text_Filter_Base The singleton instance. * @throws Horde_Text_Filter_Exception */ - public function getFilter($driver, array $params = array()) + public function create($driver, array $params = array()) { list($driver, $params) = $this->_getDriver($driver, $params); return Horde_Text_Filter::factory($driver, $params); diff --git a/framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php b/framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php index b6afc3777..a558b3b7c 100644 --- a/framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php +++ b/framework/Core/lib/Horde/Core/Ui/VarRenderer/Html.php @@ -300,7 +300,7 @@ class Horde_Core_Ui_VarRenderer_Html extends Horde_Core_Ui_VarRenderer Horde::addScriptFile('open_html_helper.js', 'horde'); if ($var->type->hasHelper('emoticons')) { - $filter = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->getFilter('emoticons'); + $filter = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->create('emoticons'); $icon_list = array(); foreach (array_flip($filter->getIcons()) as $icon => $string) { diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 7ca2127c2..7e962ed43 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -253,7 +253,6 @@ class Horde_Registry 'Horde_Auth_Factory' => new Horde_Core_Binder_AuthFactory(), 'Horde_Core_Auth_Signup' => new Horde_Core_Binder_AuthSignup(), 'Horde_Template' => new Horde_Core_Binder_Template(), - 'Horde_Text_Filter' => new Horde_Core_Binder_TextFilter(), 'Horde_Tree' => new Horde_Core_Binder_Tree(), 'Horde_Vfs' => new Horde_Core_Binder_Vfs(), ); diff --git a/framework/Core/lib/Horde/Themes.php b/framework/Core/lib/Horde/Themes.php index bd0824111..ae3144f78 100644 --- a/framework/Core/lib/Horde/Themes.php +++ b/framework/Core/lib/Horde/Themes.php @@ -82,7 +82,7 @@ class Horde_Themes /* Use CSS tidy to clean up file. */ if ($conf['cachecssparams']['compress'] == 'php') { try { - $out = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($out, 'csstidy'); + $out = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($out, 'csstidy'); } catch (Horde_Exception $e) {} } diff --git a/framework/Core/package.xml b/framework/Core/package.xml index ac1786ac2..9d0687b99 100644 --- a/framework/Core/package.xml +++ b/framework/Core/package.xml @@ -113,7 +113,6 @@ Application Framework. - @@ -425,7 +424,6 @@ Application Framework. - diff --git a/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php b/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php index f6007753d..387f3f46d 100644 --- a/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php +++ b/framework/Model/lib/Horde/Form/VarRenderer/Xhtml.php @@ -164,7 +164,7 @@ class Horde_Form_VarRenderer_Xhtml extends Horde_Form_VarRenderer Horde::addScriptFile('open_html_helper.js', 'horde'); $imgId = $var->getVarName() . 'ehelper'; if ($var->type->hasHelper('emoticons')) { - $filter = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->getFilter('emoticons'); + $filter = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->create('emoticons'); $icon_list = array(); foreach (array_flip($filter->getIcons()) as $icon => $string) { diff --git a/framework/Rampage/scripts/Horde/Rampage/rampage.php b/framework/Rampage/scripts/Horde/Rampage/rampage.php index 8f588b8be..e8b21427b 100644 --- a/framework/Rampage/scripts/Horde/Rampage/rampage.php +++ b/framework/Rampage/scripts/Horde/Rampage/rampage.php @@ -850,7 +850,7 @@ function render_field($field) case 'mediumtext': case 'longblob': case 'longtext': - return "nl2br(Horde_Text::linkUrls(\$GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter(\$zitem['$n'], 'space2html', array('encode' => true)), false, 'text'))"; + return "nl2br(Horde_Text::linkUrls(\$GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(\$zitem['$n'], 'space2html', array('encode' => true)), false, 'text'))"; case 'bool': case 'boolean': diff --git a/horde/lib/Block/fortune.php b/horde/lib/Block/fortune.php index 2b80efa1d..e3d83bdef 100644 --- a/horde/lib/Block/fortune.php +++ b/horde/lib/Block/fortune.php @@ -123,7 +123,7 @@ class Horde_Block_Horde_fortune extends Horde_Block . $this->_params['offend'] . ' ' . implode(' ', $this->_params['fortune']); return '' - . nl2br($GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter(shell_exec($cmdLine), array('space2html'), array(array('encode' => true)))) + . nl2br($GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(shell_exec($cmdLine), array('space2html'), array(array('encode' => true)))) . ''; } else { return ''; diff --git a/horde/lib/Block/twitter_timeline.php b/horde/lib/Block/twitter_timeline.php index b3f95222c..2c55ca6ad 100644 --- a/horde/lib/Block/twitter_timeline.php +++ b/horde/lib/Block/twitter_timeline.php @@ -167,7 +167,6 @@ EOT; . Horde::img('loading.gif', '', array('id' => $instance . '_loading', 'style' => 'display:none;')); $html .= '
' . _("Latest") . ' ' . $latestStatus . ' - ' . Horde_Date_Utils::relativeDateTime(strtotime($this->_profile->status->created_at), $GLOBALS['prefs']->getValue('date_format'), ($GLOBALS['prefs']->getValue('twentyFour') ? "%H:%M" : "%I:%M %P")) . '
'; $html .= '
'; - $filter = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->getFilter('Text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); $html .= '
'; $html .= '
'; $html .= ''; diff --git a/horde/services/twitter.php b/horde/services/twitter.php index 69f459be1..92156eb22 100644 --- a/horde/services/twitter.php +++ b/horde/services/twitter.php @@ -81,7 +81,7 @@ case 'getPage': $view = new Horde_View(array('templatePath' => HORDE_TEMPLATES . '/block')); $view->addHelper('Tag'); - $filter = $injector->getInstance('Horde_Text_Filter'); + $filter = $injector->getInstance('Horde_Core_Factory_TextFilter'); /* links */ $body = $filter->filter($tweet->text, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO_LINKURL)); diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index d5ddb3f43..5fb0ee03c 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -1035,7 +1035,7 @@ class IMP_Compose implements ArrayAccess, Countable, Iterator if (!empty($options['html'])) { $body_html = $body; - $body = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($body, 'Html2text', array('wrap' => false, 'charset' => $charset)); + $body = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($body, 'Html2text', array('wrap' => false, 'charset' => $charset)); } /* Get trailer text (if any). */ @@ -1089,7 +1089,7 @@ class IMP_Compose implements ArrayAccess, Countable, Iterator ''; } - $htmlBody->setContents($GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($body_html, 'cleanhtml', array('charset' => $charset))); + $htmlBody->setContents($GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($body_html, 'cleanhtml', array('charset' => $charset))); $textBody->setDescription(Horde_String::convertCharset(_("Plaintext Message"), 'UTF-8', $charset)); @@ -2474,9 +2474,9 @@ class IMP_Compose implements ArrayAccess, Countable, Iterator } if ($mode == 'html') { - $msg = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($msg, array('Cleanhtml', 'Xss'), array(array('body_only' => true), array('strip_styles' => true, 'strip_style_attributes' => false))); + $msg = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($msg, array('Cleanhtml', 'Xss'), array(array('body_only' => true), array('strip_styles' => true, 'strip_style_attributes' => false))); } elseif ($type == 'text/html') { - $msg = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($msg, 'Html2text'); + $msg = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($msg, 'Html2text'); $type = 'text/plain'; } @@ -2635,7 +2635,7 @@ class IMP_Compose implements ArrayAccess, Countable, Iterator */ static public function text2html($msg) { - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($msg, 'Text2html', array( + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($msg, 'Text2html', array( 'always_mailto' => true, 'parselevel' => Horde_Text_Filter_Text2html::MICRO )); diff --git a/imp/lib/Compose/Stationery.php b/imp/lib/Compose/Stationery.php index 30de0508e..4dc3d51a9 100644 --- a/imp/lib/Compose/Stationery.php +++ b/imp/lib/Compose/Stationery.php @@ -59,7 +59,7 @@ class IMP_Compose_Stationery implements ArrayAccess, Countable, Iterator switch ($this[$id]['t']) { case 'html': if (!$html) { - $s_content = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($s_content, 'Html2text', array('charset' => 'UTF-8')); + $s_content = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($s_content, 'Html2text', array('charset' => 'UTF-8')); } break; diff --git a/imp/lib/Contents.php b/imp/lib/Contents.php index 8a9c458ff..88d40562f 100644 --- a/imp/lib/Contents.php +++ b/imp/lib/Contents.php @@ -537,7 +537,7 @@ class IMP_Contents $ptext = Horde_String::convertCharset($pmime->getContents(), $pmime->getCharset(), 'UTF-8'); if ($pmime->getType() == 'text/html') { - $ptext = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($ptext, 'Html2text'); + $ptext = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($ptext, 'Html2text'); } $this->_build = $oldbuild; diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index b946aad41..70765bf51 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -408,7 +408,7 @@ class IMP static public function filterText($text) { if ($GLOBALS['prefs']->getValue('filtering') && strlen($text)) { - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($text, 'words', array( + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($text, 'words', array( 'replacement' => $GLOBALS['conf']['msgsettings']['filtering']['replacement'], 'words_file' => $GLOBALS['conf']['msgsettings']['filtering']['words'] )); diff --git a/imp/lib/Prefs/Ui.php b/imp/lib/Prefs/Ui.php index bdc66e5d4..99ee3e34c 100644 --- a/imp/lib/Prefs/Ui.php +++ b/imp/lib/Prefs/Ui.php @@ -1854,7 +1854,7 @@ class IMP_Prefs_Ui if ($content && ($ui->vars->last_type != $type)) { $content = ($type == 'plain') - ? $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($content, 'Html2text') + ? $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($content, 'Html2text') : IMP_Compose::text2html($content); } } elseif ($selected == -1) { diff --git a/imp/lib/Ui/Compose.php b/imp/lib/Ui/Compose.php index 3a7f7f6ed..d9dd4dd6a 100644 --- a/imp/lib/Ui/Compose.php +++ b/imp/lib/Ui/Compose.php @@ -386,7 +386,7 @@ class IMP_Ui_Compose ? array($this, 'htmlSigCallback') : null; - $data = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($data, 'Html2text', array( + $data = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($data, 'Html2text', array( 'callback' => $callback, 'wrap' => false )); diff --git a/imp/lib/Ui/Mailbox.php b/imp/lib/Ui/Mailbox.php index 0d6cbdbb9..2d559e281 100644 --- a/imp/lib/Ui/Mailbox.php +++ b/imp/lib/Ui/Mailbox.php @@ -265,7 +265,7 @@ class IMP_Ui_Mailbox $new_subject = $subject = IMP::filterText(preg_replace("/\s+/", ' ', $subject)); if ($htmlspaces) { - $new_subject = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($subject, 'space2html', array('encode' => true)); + $new_subject = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($subject, 'space2html', array('encode' => true)); if (empty($new_subject)) { $new_subject = htmlspecialchars($subject); } diff --git a/imp/lib/Ui/Message.php b/imp/lib/Ui/Message.php index afbdc7d8e..1e6f79ff6 100644 --- a/imp/lib/Ui/Message.php +++ b/imp/lib/Ui/Message.php @@ -254,7 +254,7 @@ class IMP_Ui_Message } return $output; - } elseif ($url = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($match, 'linkurls')) { + } elseif ($url = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($match, 'linkurls')) { if (!empty($opts['raw'])) { return $match; } @@ -641,7 +641,7 @@ class IMP_Ui_Message */ public function getDisplaySubject($subject) { - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter(preg_replace("/\b\s+\b/", ' ', IMP::filterText($subject)), 'text2html', array( + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter(preg_replace("/\b\s+\b/", ' ', IMP::filterText($subject)), 'text2html', array( 'parselevel' => Horde_Text_Filter_Text2html::MICRO )); } diff --git a/imp/mailbox.php b/imp/mailbox.php index aaf27d655..4573619aa 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -777,7 +777,7 @@ while (list(,$ob) = each($mbox_info['overview'])) { } if (!$preview_tooltip) { - $ptext = $injector->getInstance('Horde_Text_Filter')->filter($ptext, 'text2html', array( + $ptext = $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($ptext, 'text2html', array( 'parselevel' => Horde_Text_Filter_Text2html::NOHTML )); } diff --git a/imp/message-mimp.php b/imp/message-mimp.php index ad74c8405..546f564dd 100644 --- a/imp/message-mimp.php +++ b/imp/message-mimp.php @@ -251,7 +251,7 @@ if ($prefs->getValue('mimp_preview_msg') && $t->set('fullmsg_link', $self_link->copy()->add('fullmsg', 1)); } -$t->set('msg', nl2br($injector->getInstance('Horde_Text_Filter')->filter($msg_text, 'space2html', array('encode' => true)))); +$t->set('msg', nl2br($injector->getInstance('Horde_Core_Factory_TextFilter')->filter($msg_text, 'space2html', array('encode' => true)))); $compose_params = array( 'identity' => $identity, diff --git a/imp/view.php b/imp/view.php index 32cf7e7d5..4a4f42c0a 100644 --- a/imp/view.php +++ b/imp/view.php @@ -274,7 +274,7 @@ case 'print_attach': } } - if ($style = $injector->getInstance('Horde_Text_Filter')->filter(Horde_Themes::loadCssFiles(Horde_Themes::getStylesheets()), 'csstidy', array('ob' => true, 'preserve_css' => false))->filterBySelector($selectors)) { + if ($style = $injector->getInstance('Horde_Core_Factory_TextFilter')->filter(Horde_Themes::loadCssFiles(Horde_Themes::getStylesheets()), 'csstidy', array('ob' => true, 'preserve_css' => false))->filterBySelector($selectors)) { $elt->setAttribute('style', ($elt->hasAttribute('style') ? rtrim($elt->getAttribute('style'), ' ;') . ';' : '') . $style); } } diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index f765ab83b..0e0d34017 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -132,7 +132,7 @@ class Ingo $label = $mbox['abbrev']; $text .= sprintf('%s%s', $disabled, $val, $sel, - $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($label, 'space2html', array('encode' => true)), "\n"); + $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($label, 'space2html', array('encode' => true)), "\n"); } return $text . ''; diff --git a/jonah/delivery/rss.php b/jonah/delivery/rss.php index 11fc7b5a6..048f1fd46 100644 --- a/jonah/delivery/rss.php +++ b/jonah/delivery/rss.php @@ -83,7 +83,7 @@ foreach ($stories as &$story) { $story['permalink'] = htmlspecialchars($story['permalink']); $story['published'] = htmlspecialchars(date('r', $story['published'])); if (!empty($story['body_type']) && $story['body_type'] == 'text') { - $story['body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } } $template->set('stories', $stories); diff --git a/jonah/lib/Api.php b/jonah/lib/Api.php index 8ed5b9b43..0a8f977fb 100644 --- a/jonah/lib/Api.php +++ b/jonah/lib/Api.php @@ -55,7 +55,7 @@ class Jonah_Api extends Horde_Registry_Api foreach (array_keys($stories) as $s) { if (empty($stories[$s]['body_type']) || $stories[$s]['body_type'] == 'text') { - $stories[$s]['body_html'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($stories[$s]['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $stories[$s]['body_html'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($stories[$s]['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } else { $stories[$s]['body_html'] = $stories[$s]['body']; } @@ -77,7 +77,7 @@ class Jonah_Api extends Horde_Registry_Api { $story = $GLOBALS['injector']->getInstance('Jonah_Driver')->getStory($channel_id, $story_id, $read); if (empty($story['body_type']) || $story['body_type'] == 'text') { - $story['body_html'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body_html'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } else { $story['body_html'] = $story['body']; } @@ -185,7 +185,7 @@ class Jonah_Api extends Horde_Registry_Api $comments = $GLOBALS['conf']['comments']['allow'] && $registry->hasMethod('forums/numMessages'); foreach ($results as $story) { if (empty($story['body_type']) || $story['body_type'] == 'text') { - $story['body_html'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body_html'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } else { $story['body_html'] = $story['body']; } diff --git a/jonah/lib/Block/latest.php b/jonah/lib/Block/latest.php index 536598752..e7778b67e 100644 --- a/jonah/lib/Block/latest.php +++ b/jonah/lib/Block/latest.php @@ -80,7 +80,7 @@ class Horde_Block_Jonah_latest extends Horde_Block } if (empty($story['body_type']) || $story['body_type'] == 'text') { - $story['body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } return '

' . htmlspecialchars($story['description']) . '

' . $story['body'] . '
'; diff --git a/jonah/lib/Block/story.php b/jonah/lib/Block/story.php index 461f08953..ee05678bc 100644 --- a/jonah/lib/Block/story.php +++ b/jonah/lib/Block/story.php @@ -80,7 +80,7 @@ class Horde_Block_Jonah_story extends Horde_Block { } if (empty($story['body_type']) || $story['body_type'] == 'text') { - $story['body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } $tag_html = array(); diff --git a/jonah/lib/Driver.php b/jonah/lib/Driver.php index f9fedb8ac..491af6ac4 100644 --- a/jonah/lib/Driver.php +++ b/jonah/lib/Driver.php @@ -398,10 +398,10 @@ class Jonah_Driver case 'richtext': /* Get a plain text version of a richtext story. */ $body_html = $story['body']; - $body_text = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($body_html, 'html2text'); + $body_text = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($body_html, 'html2text'); /* Add description. */ - $body_html = '

' . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['desc'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null)) . "

\n" . $body_html; + $body_html = '

' . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['desc'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null)) . "

\n" . $body_html; $body_text = Horde_String::wrap(' ' . $story['description'], 70) . "\n\n" . $body_text; /* Add the text version of the story to the base message. */ diff --git a/jonah/lib/View/StoryPdf.php b/jonah/lib/View/StoryPdf.php index 373d46b0c..4d25083bf 100644 --- a/jonah/lib/View/StoryPdf.php +++ b/jonah/lib/View/StoryPdf.php @@ -30,7 +30,7 @@ class Jonah_View_StoryPdf extends Jonah_View // Convert the body from HTML to text if necessary. if (!empty($story['body_type']) && $story['body_type'] == 'richtext') { - $story['body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'html2text'); + $story['body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'html2text'); } // Set up the PDF object. diff --git a/jonah/lib/View/StoryView.php b/jonah/lib/View/StoryView.php index c6f0744de..8edc8ceb0 100644 --- a/jonah/lib/View/StoryView.php +++ b/jonah/lib/View/StoryView.php @@ -55,7 +55,7 @@ class Jonah_View_StoryView extends Jonah_View_Base /* Filter and prepare story content. */ if (!empty($story['body_type']) && $story['body_type'] == 'text') { - $story['body'] = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $story['body'] = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($story['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); } // @TODO: Where is this used and what for? diff --git a/kronolith/templates/itip/notification.html.php b/kronolith/templates/itip/notification.html.php index 9f0c951c3..b0119b13b 100644 --- a/kronolith/templates/itip/notification.html.php +++ b/kronolith/templates/itip/notification.html.php @@ -22,7 +22,7 @@ event->description)): ?>
- + attendees): ?> diff --git a/kronolith/templates/view/view.inc b/kronolith/templates/view/view.inc index 500c0442b..35a4cf644 100644 --- a/kronolith/templates/view/view.inc +++ b/kronolith/templates/view/view.inc @@ -4,7 +4,7 @@ - + @@ -12,7 +12,7 @@ - + @@ -153,7 +153,7 @@ if ($this->event->initialized && $this->event->alarm > 0): - + diff --git a/luxor/lib/Lang/Generic.php b/luxor/lib/Lang/Generic.php index 2a6b7e23a..7290127ce 100644 --- a/luxor/lib/Lang/Generic.php +++ b/luxor/lib/Lang/Generic.php @@ -170,7 +170,7 @@ class Luxor_Lang_Generic extends Luxor_Lang global $index, $sourceid; // Make sure spacing is correct. - $code = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($code, 'space2html', array('encode' => true, 'encode_all' => true)); + $code = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($code, 'space2html', array('encode' => true, 'encode_all' => true)); // Split all the symbols. preg_match_all('/(^|[^\w\#&])([\w~][\w]*)\b/', $code, $match); diff --git a/luxor/lib/Luxor.php b/luxor/lib/Luxor.php index a198249f7..9fef226ff 100644 --- a/luxor/lib/Luxor.php +++ b/luxor/lib/Luxor.php @@ -193,7 +193,7 @@ class Luxor file_exists($filename = $files->toReal($path . '/README.txt'))) { $contents = file_get_contents($filename); - return $table_head . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($contents, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . $table_foot; + return $table_head . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($contents, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)) . $table_foot; } elseif ($filename = file_exists($files->toReal($path . '/README.html'))) { global $mime_drivers, $mime_drivers_map; $result = Horde::loadConfiguration('mime_drivers.php', array('mime_drivers', 'mime_drivers_map'), 'horde'); @@ -362,7 +362,7 @@ class Luxor $res = ''; foreach ($lines as $line) { $res .= !empty($res) ? "\n" : ''; - $res .= $pre . $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($line, 'space2html', array('encode' => true, 'encode_all' => true)) . $post; + $res .= $pre . $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($line, 'space2html', array('encode' => true, 'encode_all' => true)) . $post; } return $res; } diff --git a/mnemo/lib/Ajax/Imple/EditNote.php b/mnemo/lib/Ajax/Imple/EditNote.php index 81ba3e1ea..a43c6c415 100644 --- a/mnemo/lib/Ajax/Imple/EditNote.php +++ b/mnemo/lib/Ajax/Imple/EditNote.php @@ -75,7 +75,7 @@ class Mnemo_Ajax_Imple_EditNote extends Horde_Core_Ajax_Imple } $storage->modify($memo['memo_id'], $memo['desc'], $pref_value); - return $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter( + return $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter( $pref_value, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); diff --git a/mnemo/lib/Block/note.php b/mnemo/lib/Block/note.php index 769613713..5deb77567 100644 --- a/mnemo/lib/Block/note.php +++ b/mnemo/lib/Block/note.php @@ -40,7 +40,7 @@ class Horde_Block_Mnemo_note extends Horde_Block { $memo = $this->_getNote(); $html = '
'; - $body = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($memo['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $body = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($memo['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); try { $body = Horde::callHook('format_description', array($body), 'mnemo', $body); } catch (Horde_Exception_HookNotSet $e) {} diff --git a/mnemo/templates/view/memo.inc b/mnemo/templates/view/memo.inc index 91f47d932..b04505f11 100644 --- a/mnemo/templates/view/memo.inc +++ b/mnemo/templates/view/memo.inc @@ -56,7 +56,7 @@ if (!$print_view) {
- getInstance('Horde_Text_Filter')->filter($memo['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); try { $body = Horde::callHook('format_description', array($body), 'mnemo', $body); } catch (Horde_Exception_HookNotSet $e) {} echo $body; ?> + getInstance('Horde_Core_Factory_TextFilter')->filter($memo['body'], 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); try { $body = Horde::callHook('format_description', array($body), 'mnemo', $body); } catch (Horde_Exception_HookNotSet $e) {} echo $body; ?>
diff --git a/nag/lib/Task.php b/nag/lib/Task.php index f6bb6120f..5fca4eaa2 100644 --- a/nag/lib/Task.php +++ b/nag/lib/Task.php @@ -423,7 +423,7 @@ class Nag_Task { */ function getFormattedDescription() { - $desc = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter($this->desc, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); + $desc = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($this->desc, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO)); try { return Horde::callHook('format_description', array($desc), 'nag'); } catch (Horde_Exception_HookNotSet $e) { diff --git a/whups/lib/Renderer/Comment.php b/whups/lib/Renderer/Comment.php index 0e4573e28..0293cdea6 100755 --- a/whups/lib/Renderer/Comment.php +++ b/whups/lib/Renderer/Comment.php @@ -140,7 +140,7 @@ class Horde_Form_Renderer_Comment extends Horde_Form_Renderer { $flowed = new Horde_Text_Flowed($comment); $flowed->setDelSp(true); $comment = $flowed->toFlowed(false); - $comment = $GLOBALS['injector']->getInstance('Horde_Text_Filter')->filter( + $comment = $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter( $comment, array('text2html', 'simplemarkup', 'highlightquotes'), array(array('parselevel' => Horde_Text_Filter_Text2html::MICRO), array(), array())); -- 2.11.0
getInstance('Horde_Text_Filter')->filter($this->event->description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null)) ?>getInstance('Horde_Core_Factory_TextFilter')->filter($this->event->description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'callback' => null)) ?>
  getInstance('Horde_Text_Filter')->filter($location, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'class' => 'text')) ?> getInstance('Horde_Core_Factory_TextFilter')->filter($location, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'class' => 'text')) ?>
  getInstance('Horde_Text_Filter')->filter($eventurl, 'linkurls') ?>getInstance('Horde_Core_Factory_TextFilter')->filter($eventurl, 'linkurls') ?>
getInstance('Horde_Text_Filter')->filter($description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'class' => 'text')) ?>getInstance('Horde_Core_Factory_TextFilter')->filter($description, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'class' => 'text')) ?>