Skip to content

Commit 694e065

Browse files
committed
Update 100-monitor_hd_quota.inc.php
1 parent 1b440ab commit 694e065

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

server/lib/classes/cron.d/100-monitor_hd_quota.inc.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function onRunJob() {
7070
//* The state of the harddisk_quota.
7171
$state = 'ok';
7272

73-
<<<<<<< server/lib/classes/cron.d/100-monitor_hd_quota.inc.php
7473
if(!$app->system->is_installed('setquota')) {
7574
//* No Quota on this System ...
7675

@@ -89,7 +88,7 @@ public function onRunJob() {
8988

9089
//* ignore the first 5 lines, process the rest
9190
for ($i = 0; $i <= sizeof($df); $i++) {
92-
if ($df[$i] != '') {
91+
if (isset($df[$i]) && $df[$i] != '') {
9392
//* Make a array of the data
9493
$s1 = preg_split('/[\s]+/', $df[$i]);
9594
$s2 = preg_split('/\//', $s1[1]);
@@ -157,7 +156,6 @@ public function onRunJob() {
157156
$data['user'][$username]['hard'] = $s[4];
158157
$data['user'][$username]['files'] = $s[5];
159158
}
160-
=======
161159
//* Fetch the data for all users
162160
$dfData = shell_exec('repquota -au 2>/dev/null');
163161

@@ -181,12 +179,10 @@ public function onRunJob() {
181179
$data['user'][$username]['soft'] = $s[3];
182180
$data['user'][$username]['hard'] = $s[4];
183181
$data['user'][$username]['files'] = $s[5];
184-
>>>>>>> server/lib/classes/cron.d/100-monitor_hd_quota.inc.php
185182
}
186183
}
187184
}
188185

189-
<<<<<<< server/lib/classes/cron.d/100-monitor_hd_quota.inc.php
190186
//** Fetch the data for all users
191187
$dfData = shell_exec('repquota -ag 2>/dev/null');
192188

@@ -195,7 +191,7 @@ public function onRunJob() {
195191

196192
//* ignore the first 5 lines, process the rest
197193
for ($i = 5; $i <= sizeof($df); $i++) {
198-
if ($df[$i] != '') {
194+
if (isset($df[$i]) && $df[$i] != '') {
199195
//* Make a array of the data
200196
$s = preg_split('/[\s]+/', $df[$i]);
201197
$groupname = $s[0];
@@ -209,7 +205,6 @@ public function onRunJob() {
209205
$data['group'][$groupname]['soft'] = $s[3];
210206
$data['group'][$groupname]['hard'] = $s[4];
211207
}
212-
=======
213208
//** Fetch the data for all users
214209
$dfData = shell_exec('repquota -ag 2>/dev/null');
215210

@@ -231,7 +226,6 @@ public function onRunJob() {
231226
$data['group'][$groupname]['used'] = $s[2];
232227
$data['group'][$groupname]['soft'] = $s[3];
233228
$data['group'][$groupname]['hard'] = $s[4];
234-
>>>>>>> server/lib/classes/cron.d/100-monitor_hd_quota.inc.php
235229
}
236230
}
237231
}

0 commit comments

Comments
 (0)