Skip to content

Commit 14276c0

Browse files
committed
updated
the formatting
1 parent 486dbdf commit 14276c0

File tree

5 files changed

+27
-18
lines changed

5 files changed

+27
-18
lines changed

bin/monitord.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ function sig_handler($signo)
295295
$tstatus = 'Down';
296296
}
297297
if ($changed > 0 || ($status == 0 && $unchanged_depth < 3)) {
298-
$query = make_insert_query('monitoring_history', [
298+
$query = make_insert_query(
299+
'monitoring_history',
300+
[
299301
'history_id' => null,
300302
'history_timestamp' => mysql_now(),
301303
'history_section' => 'monitoring_'.$service,

src/Plugin.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public static function getMenu(GenericEvent $event)
4343
$menu = $event->getSubject();
4444
if ($GLOBALS['tf']->ima == 'admin') {
4545
function_requirements('has_acl');
46-
if (has_acl('client_billing')) {
47-
}
46+
if (has_acl('client_billing')) {
47+
}
4848
}
4949
}
5050

@@ -53,10 +53,10 @@ function_requirements('has_acl');
5353
*/
5454
public static function getRequirements(GenericEvent $event)
5555
{
56-
/**
57-
* @var \MyAdmin\Plugins\Loader $this->loader
58-
*/
59-
$loader = $event->getSubject();
56+
/**
57+
* @var \MyAdmin\Plugins\Loader $this->loader
58+
*/
59+
$loader = $event->getSubject();
6060
$loader->add_page_requirement('monitoring_stats', '/../vendor/detain/myadmin-monitoring-plugin/src/monitoring_stats.php');
6161
$loader->add_requirement('get_umonitored_server_table', '/../vendor/detain/myadmin-monitoring-plugin/src/monitoring.functions.inc.php');
6262
$loader->add_requirement('get_monitoring_data', '/../vendor/detain/myadmin-monitoring-plugin/src/monitoring.functions.inc.php');
@@ -69,12 +69,12 @@ public static function getRequirements(GenericEvent $event)
6969
/**
7070
* @param \Symfony\Component\EventDispatcher\GenericEvent $event
7171
*/
72-
public static function getSettings(GenericEvent $event)
73-
{
74-
/**
75-
* @var \MyAdmin\Settings $settings
76-
**/
77-
$settings = $event->getSubject();
72+
public static function getSettings(GenericEvent $event)
73+
{
74+
/**
75+
* @var \MyAdmin\Settings $settings
76+
**/
77+
$settings = $event->getSubject();
7878
$settings->add_radio_setting(_('Billing'), _('Monitoring'), 'paypal_enable', _('Enable Monitoring'), _('Enable Monitoring'), PAYPAL_ENABLE, [true, false], ['Enabled', 'Disabled']);
7979
$settings->add_radio_setting(_('Billing'), _('Monitoring'), 'paypal_digitalgoods_enable', _('Enable Digital Goods'), _('Enable Digital Goods'), PAYPAL_DIGITALGOODS_ENABLE, [true, false], ['Enabled', 'Disabled']);
8080
$settings->add_text_setting(_('Billing'), _('Monitoring'), 'paypal_email', _('Login Email'), _('Login Email'), (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : ''));

src/monitoring.functions.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ function get_umonitored_server_table()
251251
$table->add_field();
252252
$table->add_field($values['title'], 'r');
253253
$table->add_field();
254-
$table->add_field($table->make_link('choice=none.monitoring&amp;hostname='.$values['title'].'&amp;ip='.$values['ip'].'&amp;comment='.$values['module'].'&amp;custid='.$values['custid'],
255-
'Add To Monitoring'));
254+
$table->add_field($table->make_link(
255+
'choice=none.monitoring&amp;hostname='.$values['title'].'&amp;ip='.$values['ip'].'&amp;comment='.$values['module'].'&amp;custid='.$values['custid'],
256+
'Add To Monitoring'
257+
));
256258
$table->add_row();
257259
}
258260
return $table->get_table();

src/monitoring.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ function monitoring()
4545
$comment = strip_tags($GLOBALS['tf']->variables->request['newcomment']);
4646
$extra = [];
4747
$extra = $db->real_escape(myadmin_stringify($extra));
48-
$db->query(make_insert_query('monitoring', [
48+
$db->query(make_insert_query(
49+
'monitoring',
50+
[
4951
'monitoring_id' => null,
5052
'monitoring_hostname' => $hostname,
5153
'monitoring_ip' => $ip,

src/monitoring_setup.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ function_requirements('get_monitoring_services');
7272
$table->add_row();
7373
$services = get_monitoring_services();
7474
foreach ($services as $service) {
75-
$db2->query("select * from monitoring_history where history_type='" . $db->real_escape($db->Record['monitoring_ip']) . "' and history_section='monitoring_$service' order by history_id desc limit 1",
76-
__LINE__, __FILE__);
75+
$db2->query(
76+
"select * from monitoring_history where history_type='" . $db->real_escape($db->Record['monitoring_ip']) . "' and history_section='monitoring_$service' order by history_id desc limit 1",
77+
__LINE__,
78+
__FILE__
79+
);
7780
$table->add_field($service, 'r');
7881
//$table->add_field('<select name="'.$service.'"><option value=0>No</option><option '.(isset($extra[$service]) && $extra[$service] == '1' ? 'selected' : '').' value=1>Yes</option></select>');
7982
$table->add_field('<input type="radio" name="'.$service.'" value="0" '.(!isset($extra[$service]) || $extra[$service] != '1' ? 'checked' : '').'>No <input type="radio" name="'.$service .

0 commit comments

Comments
 (0)