diff options
author | Urban Müller | 2018-06-21 16:12:20 +0200 |
---|---|---|
committer | Urban Müller | 2018-06-21 16:12:20 +0200 |
commit | 05e7ceefa1f0a29c665381b54ac882f260ae6c22 (patch) | |
tree | d9107f13ce76a21d77e8be2670f0b2e8d96f19e7 /it_dbi.class | |
parent | c8319c784267f81e2884a076365b8ca36f4ce0b2 (diff) | |
download | itools-05e7ceefa1f0a29c665381b54ac882f260ae6c22.tar.gz itools-05e7ceefa1f0a29c665381b54ac882f260ae6c22.tar.bz2 itools-05e7ceefa1f0a29c665381b54ac882f260ae6c22.zip |
use safer it:: variants of file funcs
Diffstat (limited to 'it_dbi.class')
-rw-r--r-- | it_dbi.class | 4 |
1 files changed, 2 insertions, 2 deletions
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?"); } |