From 61e9aed4beef09cc764485e4e50d08770cfe7848 Mon Sep 17 00:00:00 2001 From: inpos Date: Sun, 10 Dec 2017 16:46:25 +0300 Subject: [PATCH] roundcube 1.3 support --- defense.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/defense.php b/defense.php index 1b1e496..715d954 100644 --- a/defense.php +++ b/defense.php @@ -46,7 +46,7 @@ class defense extends rcube_plugin { */ private function debug($string) { if (!$this->debugEnabled) { return; } - write_log($this->logfile, $this->ipaddr . " # " . $string); + rcube::write_log($this->logfile, $this->ipaddr . " # " . $string); } /** * Check if IP is matched against all IPs in array, @@ -148,7 +148,7 @@ class defense extends rcube_plugin { // I can't seem to try/catch database entries so I have no details regarding error $string = "Error communicating with database."; $this->debug($string); - write_log('error', 'plugin::defense: ' . $string); + rcube::write_log('error', 'plugin::defense: ' . $string); } /** * Return true if IP matches config whitelist @@ -258,7 +258,7 @@ class defense extends rcube_plugin { $this->debugEnabled = $this->rc->config->get('defense_debug_enabled', false); // set client ip - $this->ipaddr = rcmail_remote_ip(); + $this->ipaddr = rcube_utils::remote_ip(); // Roundcube event hooks $this->add_hook('template_object_loginform', array($this, 'hookLoginForm'));