alecpl
2008-04-29 257782150db70dbe852d1c71fe6fd8abda0229f0
program/include/rcube_shared.inc
@@ -92,7 +92,8 @@
function rcube_label($attrib)
{
  global $sess_user_lang, $OUTPUT;
  static $sa_text_data, $s_language, $utf8_decode;
  static $sa_text_data = false;
  static $s_language, $utf8_decode;
  // extract attributes
  if (is_string($attrib))
@@ -106,7 +107,7 @@
  // load localized texts
  if (!$sa_text_data || $s_language != $sess_user_lang)
  if ($sa_text_data===false || $s_language != $sess_user_lang)
    {
    $sa_text_data = array();
    
@@ -657,29 +658,6 @@
  return $ts;
}
/**
 * Return the last occurence of a string in another string
 *
 * @param haystack string string in which to search
 * @param needle string string for which to search
 * @return index of needle within haystack, or false if not found
 */
function strrstr($haystack, $needle)
{
  $pver = phpversion();
  if ($pver[0] >= 5)
      return strrpos($haystack, $needle);
  else
  {
    $index = strpos(strrev($haystack), strrev($needle));
    if($index === false)
        return false;
    $index = strlen($haystack) - strlen($needle) - $index;
    return $index;
  }
}
/**
 * A method to guess the mime_type of an attachment.