Skip to content

Commit cf29111

Browse files
committed
Rename running_on_master to running_on_masterserver
1 parent 1b4c1f3 commit cf29111

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

server/lib/app.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ function error($msg) {
360360
*
361361
* @return boolean
362362
*/
363-
function running_on_master() {
363+
function running_on_masterserver() {
364364

365365
return $this->dbmaster == $this->db;
366366
}

server/lib/classes/aps_installer.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ public function installHandler($instanceid, $type)
693693
{
694694
$app->db->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']);
695695
$app->db->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']);
696-
if (!$app->running_on_master()) {
696+
if (!$app->running_on_masterserver()) {
697697
$app->dbmaster->query('DELETE FROM aps_instances WHERE id = ?', $task['instance_id']);
698698
$app->dbmaster->query('DELETE FROM aps_instances_settings WHERE instance_id = ?', $task['instance_id']);
699699
}

server/lib/classes/cron.d/200-logfiles.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function onRunJob() {
226226
// Cleanup logs in master database (only the "master-server")
227227
//######################################################################################################
228228

229-
if ($app->running_on_master()) {
229+
if ($app->running_on_masterserver()) {
230230
/** 7 days */
231231

232232

server/lib/classes/cron.d/300-quota_notify.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function onRunJob() {
7575
// enforce traffic quota (run only on the "master-server")
7676
//######################################################################################################
7777

78-
if ($app->running_on_master()) {
78+
if ($app->running_on_masterserver()) {
7979

8080
$global_config = $app->getconf->get_global_config('mail');
8181

@@ -159,7 +159,7 @@ public function onRunJob() {
159159
// send website quota warnings by email
160160
//######################################################################################################
161161

162-
if ($app->running_on_master()) {
162+
if ($app->running_on_masterserver()) {
163163

164164
$global_config = $app->getconf->get_global_config('mail');
165165

@@ -315,7 +315,7 @@ public function onRunJob() {
315315
// send mail quota warnings by email
316316
//######################################################################################################
317317

318-
if ($app->running_on_master()) {
318+
if ($app->running_on_masterserver()) {
319319

320320
$global_config = $app->getconf->get_global_config('mail');
321321
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
@@ -453,7 +453,7 @@ public function onRunJob() {
453453
// send database quota warnings by email
454454
//######################################################################################################
455455

456-
if ($app->running_on_master()) {
456+
if ($app->running_on_masterserver()) {
457457

458458
$global_config = $app->getconf->get_global_config('mail');
459459

server/lib/classes/cron.d/400-openvz.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function onRunJob() {
5454
// deactivate virtual servers (run only on the "master-server")
5555
//######################################################################################################
5656

57-
if ($app->running_on_master()) {
57+
if ($app->running_on_masterserver()) {
5858
//* Check which virtual machines have to be deactivated
5959
$sql = "SELECT * FROM openvz_vm WHERE active = 'y' AND active_until_date IS NOT NULL AND active_until_date < CURDATE()";
6060
$records = $app->db->queryAllRecords($sql);

server/lib/classes/modules.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function processDatalog() {
100100
global $app, $conf;
101101

102102
//* If its a multiserver setup
103-
if($app->running_on_slaveserver() || ($app->running_on_master() && $app->db->dbName != $app->dbmaster->dbName)) {
103+
if($app->running_on_slaveserver() || ($app->running_on_masterserver() && $app->db->dbName != $app->dbmaster->dbName)) {
104104
if($conf['mirror_server_id'] > 0) {
105105
$sql = "SELECT * FROM sys_datalog WHERE datalog_id > ? AND (server_id = ? OR server_id = ? OR server_id = 0) ORDER BY datalog_id LIMIT 0,1000";
106106
} else {

0 commit comments

Comments
 (0)