<?
+
//*************************************************************************
// Count the number of occurances of $needle are in $haystack.
//*************************************************************************
// of the $haystack is reached.
//*************************************************************************
function readShortMailboxName($haystack, $needle) {
- $len = strlen($haystack);
- for ($i = $len - 1; ($i >= 0) && (!$found);$i--) {
- $char = $haystack[$i];
- if ($char == $needle)
- $found = 1;
- else
- $data .= $char;
+ if (strpos($haystack, $needle)) {
+ $pos = strrpos($haystack, $needle) + 1;
+ $data = substr($haystack, $pos, strlen($haystack));
+ } else {
+ $data = $haystack;
}
- return strrev($data);
+ return $data;
}
// Wraps text at $wrap characters
/** Returns an array of email addresses **/
function parseAddrs($text) {
+ if (trim($text) == "") {
+ return;
+ }
$text = str_replace(" ", "", $text);
$text = str_replace(",", ";", $text);
$array = explode(";", $text);
}
return $to_line;
}
+
+ function translateText($body) {
+ $body = ereg_replace(" ", " ", $body);
+ return $body;
+ }
+
+ /* SquirrelMail version number -- DO NOT CHANGE */
+ $version = "0.3pre1";
?>