diff options
author | Erich Eckner <git@eckner.net> | 2019-11-07 15:10:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-11-07 15:10:44 +0100 |
commit | bdfe6c442f526ebc0c975886c0f5d346620e3501 (patch) | |
tree | 5fec6dafaa5e47f3a53afaf56cf1896c5054f098 /lib | |
parent | e50fe76394d3d35f75587795af220682ffbe74f9 (diff) | |
download | archweb32-bdfe6c442f526ebc0c975886c0f5d346620e3501.tar.xz |
lib/mysql.php: show_warning_on_offline_slave(): buildmaster.archlinux32.org does *not* need to have a running mysql replication slave
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mysql.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/mysql.php b/lib/mysql.php index 66fe82f..f7ca3ed 100644 --- a/lib/mysql.php +++ b/lib/mysql.php @@ -53,10 +53,12 @@ function mysql_prepare_query($query) { } function show_warning_on_offline_slave() { - $result = mysql_run_query("SHOW STATUS LIKE \"Slave_running\""); - if (($result -> num_rows == 0) || - ($result -> fetch_assoc() ["Value"] != "ON")) { - print "<div><font color=\"ff0000\">The replication slave is currently not running. The database might be outdated.</font></div>\n"; + if (gethostname() != 'buildmaster.archlinux32.org') { + $result = mysql_run_query("SHOW STATUS LIKE \"Slave_running\""); + if (($result -> num_rows == 0) || + ($result -> fetch_assoc() ["Value"] != "ON")) { + print "<div><font color=\"ff0000\">The replication slave is currently not running. The database might be outdated.</font></div>\n"; + } } } |