Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-24235 bennu: Converted to old style of textlib strlen

  • Loading branch information...
commit 0080f86fb74f4b36ba0bde3f0d40e90c3e850b50 1 parent fc69741
Sam Hemelryk samhemelryk authored

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 4 lib/bennu/iCalendar_rfc2445.php
9 lib/bennu/iCalendar_rfc2445.php
@@ -56,7 +56,8 @@
56 56
57 57
58 58 function rfc2445_fold($string) {
59   - if(textlib::strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
  59 + $textlib = textlib_get_instance();
  60 + if($textlib->strlen($string, 'utf-8') <= RFC2445_FOLDED_LINE_LENGTH) {
60 61 return $string;
61 62 }
62 63
@@ -66,15 +67,15 @@ function rfc2445_fold($string) {
66 67 $len_count=0;
67 68
68 69 //multi-byte string, get the correct length
69   - $section_len = textlib::strlen($string, 'utf-8');
  70 + $section_len = $textlib->strlen($string, 'utf-8');
70 71
71 72 while($len_count<$section_len) {
72 73
73 74 //get the current portion of the line
74   - $section = textlib::substr($string, ($i * RFC2445_FOLDED_LINE_LENGTH), (RFC2445_FOLDED_LINE_LENGTH), 'utf-8');
  75 + $section = $textlib->substr($string, ($i * RFC2445_FOLDED_LINE_LENGTH), (RFC2445_FOLDED_LINE_LENGTH), 'utf-8');
75 76
76 77 //increment the length we've processed by the length of the new portion
77   - $len_count += textlib::strlen($section, 'utf-8');
  78 + $len_count += $textlib->strlen($section, 'utf-8');
78 79
79 80 /* Add the portion to the return value, terminating with CRLF.HTAB
80 81 As per RFC 2445, CRLF.HTAB will be replaced by the processor of the

0 comments on commit 0080f86

Please sign in to comment.
Something went wrong with that request. Please try again.