From e9ebbb321ff525fa486f92ecbf68d85790caeefc Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 9 Jun 2009 22:44:35 -0600 Subject: [PATCH] Text -> Horde_Text --- chora/annotate.php | 4 ++-- chora/browsedir.php | 4 ++-- chora/cvsgraph.php | 2 +- chora/diff.php | 2 +- chora/history.php | 2 +- chora/lib/Chora.php | 2 +- chora/lib/base.php | 1 - chora/stats.php | 2 +- imp/lib/IMP.php | 10 ++++------ imp/lib/UI/Mailbox.php | 5 ++--- imp/lib/UI/Message.php | 2 -- ingo/lib/Ingo.php | 4 +--- kronolith/lib/Views/Event.php | 1 - 13 files changed, 16 insertions(+), 25 deletions(-) diff --git a/chora/annotate.php b/chora/annotate.php index 16435821f..ab5a68911 100644 --- a/chora/annotate.php +++ b/chora/annotate.php @@ -41,7 +41,7 @@ try { Chora::fatal($e); } -$title = sprintf(_("Source Annotation of %s (revision %s)"), Text::htmlAllSpaces($where), $rev); +$title = sprintf(_("Source Annotation of %s (revision %s)"), Horde_Text::htmlAllSpaces($where), $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 = Text::htmlAllSpaces($line['line']); + $line = Horde_Text::htmlAllSpaces($line['line']); include CHORA_TEMPLATES . '/annotate/line.inc'; } diff --git a/chora/browsedir.php b/chora/browsedir.php index 2cafa4197..2160a2cd9 100644 --- a/chora/browsedir.php +++ b/chora/browsedir.php @@ -84,7 +84,7 @@ if ($dirList) { continue; } $url = Chora::url('browsedir', $where . '/' . $currentDir . '/'); - $currDir = Text::htmlAllSpaces($currentDir); + $currDir = Horde_Text::htmlAllSpaces($currentDir); require CHORA_TEMPLATES . '/directory/dir.inc'; } echo ''; @@ -111,7 +111,7 @@ if ($fileList) { $log = $lg->queryLog(); $attic = $currFile->isDeleted(); $fileName = $where . ($attic ? '/' . 'Attic' : '') . '/' . $realname; - $name = Text::htmlAllSpaces($realname); + $name = Horde_Text::htmlAllSpaces($realname); $url = Chora::url('browsefile', $fileName); $readableDate = Chora::readableTime($date); if ($log) { diff --git a/chora/cvsgraph.php b/chora/cvsgraph.php index 662251568..bad9af3cf 100644 --- a/chora/cvsgraph.php +++ b/chora/cvsgraph.php @@ -48,7 +48,7 @@ if (Horde_Util::getFormData('show_image')) { passthru($conf['paths']['cvsgraph'] . ' ' . $argstr . ' ' . $file); } else { // Display the wrapper page for the image. - $title = sprintf(_("Graph for %s"), Text::htmlAllSpaces($where)); + $title = sprintf(_("Graph for %s"), Horde_Text::htmlAllSpaces($where)); $extraLink = Chora::getFileViews($where, 'cvsgraph'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/diff.php b/chora/diff.php index eb6810949..71a7b281a 100644 --- a/chora/diff.php +++ b/chora/diff.php @@ -54,7 +54,7 @@ if ($type != 'colored') { $abbrev_r1 = $VC->abbrev($r1); $abbrev_r2 = $VC->abbrev($r2); $title = sprintf(_("Diff for %s between version %s and %s"), - Text::htmlallspaces($where), $abbrev_r1, $abbrev_r2); + Horde_Text::htmlallspaces($where), $abbrev_r1, $abbrev_r2); /* Format log entries. */ $log_messages = array(); diff --git a/chora/history.php b/chora/history.php index 481ad5750..deb529a6a 100644 --- a/chora/history.php +++ b/chora/history.php @@ -124,7 +124,7 @@ foreach ($grid as $cols) { $maxCol = max($val, $maxCol); } -$title = sprintf(_("Source Branching View for %s"), Text::htmlallspaces($where)); +$title = sprintf(_("Source Branching View for %s"), Horde_Text::htmlallspaces($where)); $extraLink = Chora::getFileViews($where, 'history'); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/chora/lib/Chora.php b/chora/lib/Chora.php index 31519c7ce..21ecfb85b 100644 --- a/chora/lib/Chora.php +++ b/chora/lib/Chora.php @@ -200,7 +200,7 @@ class Chora } $path .= $dir; if (!empty($dir)) { - $bar .= '/ '. Text::htmlallspaces($dir) . ' '; + $bar .= '/ '. Horde_Text::htmlallspaces($dir) . ' '; } } diff --git a/chora/lib/base.php b/chora/lib/base.php index 206cbc4e2..333272856 100644 --- a/chora/lib/base.php +++ b/chora/lib/base.php @@ -45,7 +45,6 @@ $notification = &Notification::singleton(); $notification->attach('status'); // Horde base libraries. -require_once 'Horde/Text.php'; require_once 'Horde/Help.php'; // Chora base library. diff --git a/chora/stats.php b/chora/stats.php index 486ebffeb..533744d9d 100644 --- a/chora/stats.php +++ b/chora/stats.php @@ -28,7 +28,7 @@ foreach ($fl->queryLogs() as $lg) { } arsort($stats); -$title = sprintf(_("Statistics for %s"), Text::htmlallspaces($where)); +$title = sprintf(_("Statistics for %s"), Horde_Text::htmlallspaces($where)); Horde::addScriptFile('prototype.js', 'horde', true); Horde::addScriptFile('tables.js', 'horde', true); require CHORA_TEMPLATES . '/common-header.inc'; diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index 68358172d..321f6faf0 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -211,8 +211,6 @@ class IMP */ static public function flistSelect($options = array()) { - require_once 'Horde/Text.php'; - $imp_folder = IMP_Folder::singleton(); /* Don't filter here - since we are going to parse through every @@ -247,7 +245,7 @@ class IMP $val = isset($filter[$mbox['val']]) ? '' : htmlspecialchars($mbox['val']); $sel = ($mbox['val'] && !empty($options['selected']) && ($mbox['val'] === $options['selected'])) ? ' selected="selected"' : ''; $label = empty($options['abbrev']) ? $mbox['label'] : $mbox['abbrev']; - $text .= sprintf('%s', $val, $sel, Text::htmlSpaces($label), "\n"); + $text .= sprintf('%s', $val, $sel, Horde_Text::htmlSpaces($label), "\n"); } /* Add the list of virtual folders to the list. */ @@ -257,7 +255,7 @@ class IMP $vfolder_sel = $GLOBALS['imp_search']->searchMboxID(); $text .= '' . "\n"; foreach ($vfolders as $id => $val) { - $text .= sprintf('%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Text::htmlSpaces($val), "\n"); + $text .= sprintf('%s', $GLOBALS['imp_search']->createSearchID($id), ($vfolder_sel == $id) ? ' selected="selected"' : '', Horde_Text::htmlSpaces($val), "\n"); } } } @@ -274,7 +272,7 @@ class IMP foreach ($tasklists as $id => $tasklist) { $text .= sprintf('%s', '_tasklist_' . $id, - Text::htmlSpaces($tasklist->get('name')), + Horde_Text::htmlSpaces($tasklist->get('name')), "\n"); } } @@ -292,7 +290,7 @@ class IMP foreach ($notepads as $id => $notepad) { $text .= sprintf('%s', '_notepad_' . $id, - Text::htmlSpaces($notepad->get('name')), + Horde_Text::htmlSpaces($notepad->get('name')), "\n"); } } diff --git a/imp/lib/UI/Mailbox.php b/imp/lib/UI/Mailbox.php index 5532765ba..ae9b86641 100644 --- a/imp/lib/UI/Mailbox.php +++ b/imp/lib/UI/Mailbox.php @@ -233,7 +233,7 @@ class IMP_UI_Mailbox * Formats the subject header. * * @param string $subject The MIME encoded subject header. - * @param string $htmlspaces Run through Text::htmlSpaces()? + * @param string $htmlspaces Run through Horde_Text::htmlSpaces()? * * @return string The formatted subject header. */ @@ -247,8 +247,7 @@ class IMP_UI_Mailbox $new_subject = $subject = IMP::filterText(preg_replace("/\s+/", ' ', $subject)); if ($htmlspaces) { - require_once 'Horde/Text.php'; - $new_subject = Text::htmlSpaces($subject); + $new_subject = Horde_Text::htmlSpaces($subject); if (empty($new_subject)) { $new_subject = htmlspecialchars($subject); } diff --git a/imp/lib/UI/Message.php b/imp/lib/UI/Message.php index 4b25361ad..b73b6096c 100644 --- a/imp/lib/UI/Message.php +++ b/imp/lib/UI/Message.php @@ -202,8 +202,6 @@ class IMP_UI_Message { $output = ''; - require_once 'Horde/Text.php'; - /* Split the incoming data by the ',' character. */ foreach (preg_split("/,/", $data) as $entry) { /* Get the data inside of the brackets. If there is no brackets, diff --git a/ingo/lib/Ingo.php b/ingo/lib/Ingo.php index dca159433..30582fe7f 100644 --- a/ingo/lib/Ingo.php +++ b/ingo/lib/Ingo.php @@ -66,8 +66,6 @@ class Ingo $text .= '\n"; } - require_once 'Horde/Text.php'; - foreach ($mailboxes as $mbox) { $sel = ($mbox['val'] && ($mbox['val'] === $value)) ? ' selected="selected"' : ''; $disabled = empty($mbox['val']) ? ' disabled="disabled"' : ''; @@ -75,7 +73,7 @@ class Ingo $label = $mbox['abbrev']; $text .= sprintf('%s%s', $disabled, $val, $sel, - Text::htmlSpaces($label), "\n"); + Horde_Text::htmlSpaces($label), "\n"); } $text .= ''; diff --git a/kronolith/lib/Views/Event.php b/kronolith/lib/Views/Event.php index 093142324..d493ea710 100644 --- a/kronolith/lib/Views/Event.php +++ b/kronolith/lib/Views/Event.php @@ -39,7 +39,6 @@ class Kronolith_View_Event { return; } - require_once 'Horde/Text.php'; require_once 'Horde/Text/Filter.php'; $createdby = ''; -- 2.11.0