From 84fe0c2eaa7deb0681cfc8746434044a2fae53c6 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 27 Jun 2018 15:13:03 +0200 Subject: reapply "use safer it:: variants of file funcs", was not the culprit in jussi downtimes This reverts commit 99b7fc8dc08da090bb7f00c2882e1daeec4434ba. --- it_dbi.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 7ea446f..79a56b2 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -500,8 +500,8 @@ function query($query, $p = array()) $this->_p['server'] = $p['server'] = $p['server_update']; unset($this->_p['server_update'], $p['server_update'], $this->_link); } - else if ($p['server'] == "localhost" && $p['db'] == $GLOBALS['ULTRADB'] && preg_grep('/replicate-do/', (array)@file($GLOBALS['ULTRAHOME'] . "/etc/my.cnf"))) - if (($t = @file($GLOBALS['ULTRAHOME'] . "/doc/machines.txt")) && preg_grep("/^" . gethostname() . "/", array_slice($t, 2))) + else if ($p['server'] == "localhost" && $p['db'] == $GLOBALS['ULTRADB'] && preg_grep('/replicate-do/', (array)@it::file($GLOBALS['ULTRAHOME'] . "/etc/my.cnf"))) + if (($t = @it::file($GLOBALS['ULTRAHOME'] . "/doc/machines.txt")) && preg_grep("/^" . gethostname() . "/", array_slice($t, 2))) it::error("local mysql write on a replication slave machine?"); } -- cgit v1.2.3