Changeset a63e10e in github


Ignore:
Timestamp:
Apr 14, 2008 6:11:50 AM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
9950110
Parents:
a901aa5
Message:
  • removed strrstr() definition as it was needed only for php4
Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_shared.inc

    r3f5cef86 ra63e10e  
    660660 
    661661/** 
    662  * Return the last occurence of a string in another string 
    663  * 
    664  * @param haystack string string in which to search 
    665  * @param needle string string for which to search 
    666  * @return index of needle within haystack, or false if not found 
    667  */ 
    668 function strrstr($haystack, $needle) 
    669 { 
    670   $pver = phpversion(); 
    671   if ($pver[0] >= 5) 
    672       return strrpos($haystack, $needle); 
    673   else 
    674   { 
    675     $index = strpos(strrev($haystack), strrev($needle)); 
    676     if($index === false) 
    677         return false; 
    678      
    679     $index = strlen($haystack) - strlen($needle) - $index; 
    680     return $index; 
    681   } 
    682 } 
    683  
    684 /** 
    685662 * A method to guess the mime_type of an attachment. 
    686663 * 
  • program/steps/mail/compose.inc

    r47124c22 ra63e10e  
    500500 
    501501    // try to remove the signature 
    502     if ($sp = strrstr($body, '-- ')) 
     502    if ($sp = strrpos($body, '-- ')) 
    503503      { 
    504504      if ($body{$sp+3}==' ' || $body{$sp+3}=="\n" || $body{$sp+3}=="\r") 
Note: See TracChangeset for help on using the changeset viewer.