Index: mod/ouwiki/locallib.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- mod/ouwiki/locallib.php (revision ) +++ mod/ouwiki/locallib.php (revision ) @@ -589,9 +589,10 @@ global $DB; $params = array($subwiki->id); - $tl = textlib_get_instance(); + //$tl = textlib_get_instance(); + $textlib = new textlib(); $pagename_s = 'UPPER(p.title) = ?'; - $params[] = $tl->strtoupper($pagename); + $params[] = $textlib::strtoupper($pagename); $jointype = $option == OUWIKI_GETPAGE_REQUIREVERSION ? 'JOIN' : 'LEFT JOIN'; @@ -622,7 +623,7 @@ } // Update any missing link records that might exist - $uppertitle = $tl->strtoupper($pagename); + $uppertitle = $textlib::strtoupper($pagename); try { $DB->execute("UPDATE {ouwiki_links} SET tomissingpage = NULL, topageid = ? @@ -708,8 +709,9 @@ LEFT JOIN {user} u ON v.userid = u.id WHERE p.subwikiid = ? AND v.id = ? AND UPPER(p.title) = ?"; - $tl = textlib_get_instance(); - $pagename = $tl->strtoupper($pagename); + //$tl = textlib_get_instance(); + $textlib = new textlib(); + $pagename = $textlib::strtoupper($pagename); $pageversion = $DB->get_record_sql($sql, array($subwiki->id, $versionid, $pagename)); $pageversion->recentversions = false; @@ -1760,11 +1762,12 @@ } $link->topageid = null; $link->tomissingpage = null; - $tl = textlib_get_instance(); + //$tl = textlib_get_instance(); + $textlib = new textlib(); foreach ($externallinks as $url) { // Restrict length of URL - if ($tl->strlen($url) > 255) { - $url = $tl->substr($url, 0, 255); + if ($textlib::strlen($url) > 255) { + $url = $textlib::substr($url, 0, 255); } $link->tourl = $url; try { @@ -1824,12 +1827,13 @@ // Trim to 200 characters or less (note: because we don't want to cut it off // in the middle of a character, we use proper UTF-8 functions) - $tl = textlib_get_instance(); - if ($tl->strlen($wikilink) > 200) { - $wikilink = $tl->substr($wikilink, 0, 200); - $space = $tl->strrpos($wikilink, ' '); + //$tl = textlib_get_instance(); + $textlib = new textlib(); + if ($textlib::strlen($wikilink) > 200) { + $wikilink = $textlib::substr($wikilink, 0, 200); + $space = $textlib::strrpos($wikilink, ' '); if ($space > 150) { - $wikilink = $tl->substr($wikilink, 0, $space); + $wikilink = $textlib::substr($wikilink, 0, $space); } }