From a63f14ec4045e82f47b237663bcf09939a0eadc5 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 29 Aug 2015 01:52:57 -0400
Subject: [PATCH] Emoticons-related code refactoring

---
 program/include/bc.php |   23 ++++++++++++++---------
 1 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/program/include/bc.php b/program/include/bc.php
index d835633..259ebc3 100644
--- a/program/include/bc.php
+++ b/program/include/bc.php
@@ -1,6 +1,6 @@
 <?php
 
-/*
+/**
  +-----------------------------------------------------------------------+
  | program/include/bc.php                                                |
  |                                                                       |
@@ -22,7 +22,7 @@
 /**
  * Roundcube Webmail deprecated functions
  *
- * @package Core
+ * @package Webmail
  * @subpackage Legacy
  * @author Thomas Bruederli <roundcube@gmail.com>
  */
@@ -62,7 +62,7 @@
 
 function rcmail_temp_gc()
 {
-  $rcmail = rcmail::get_instance()->temp_gc();
+  rcmail::get_instance()->gc_temp();
 }
 
 function rcube_charset_convert($str, $from, $to=NULL)
@@ -220,11 +220,6 @@
     rcmail::get_instance()->html_editor($mode);
 }
 
-function rcmail_replace_emoticons($html)
-{
-    return rcmail::get_instance()->replace_emoticons($html);
-}
-
 function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_file=null, $smtp_opts=null)
 {
     return rcmail::get_instance()->deliver_message($message, $from, $mailto, $smtp_error, $body_file, $smtp_opts);
@@ -287,7 +282,7 @@
 
 function rcube_check_referer()
 {
-    return rcmail::check_referer();
+    return rcube_utils::check_referer();
 }
 
 function rcube_timer()
@@ -405,6 +400,16 @@
     return rcube_enriched::to_html($data);
 }
 
+function strip_quotes($str)
+{
+    return str_replace(array("'", '"'), '', $str);
+}
+
+function strip_newlines($str)
+{
+    return preg_replace('/[\r\n]/', '', $str);
+}
+
 class rcube_html_page extends rcmail_html_page
 {
 }

--
Gitblit v1.9.1