Completed
Pull Request — master (#532)
06:37
created
app/admin/groups/index.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -5,24 +5,24 @@  discard block
 block discarded – undo
5 5
  *************************************************/
6 6
 
7 7
 # verify that user is logged in
8
-$User->check_user_session();
8
+$User->check_user_session ();
9 9
 
10 10
 # fetch all APIs
11
-$groups = $Admin->fetch_all_objects("userGroups", "g_name");
11
+$groups = $Admin->fetch_all_objects ("userGroups", "g_name");
12 12
 
13 13
 # fetch all admin users
14
-$admins = $Admin->fetch_multiple_objects("users", "role", "Administrator");
14
+$admins = $Admin->fetch_multiple_objects ("users", "role", "Administrator");
15 15
 
16 16
 # fetch all auth methods
17 17
 $auth_methods = $Admin->fetch_all_objects ("usersAuthMethod");
18
-if ($auth_methods!==false) {
18
+if ($auth_methods !== false) {
19 19
 	foreach ($auth_methods as $k=>$m) {
20
-		if (!($m->type=="AD" || $m->type=="LDAP")) {
20
+		if (!($m->type == "AD" || $m->type == "LDAP")) {
21 21
 			unset($auth_methods[$k]);
22 22
 		}
23 23
 	}
24 24
 	// none
25
-	if (sizeof($auth_methods)==0) {
25
+	if (sizeof ($auth_methods) == 0) {
26 26
 		$auth_methods = false;
27 27
 	}
28 28
 }
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
 
32 32
 <!-- display existing groups -->
33
-<h4><?php print _('Group management'); ?></h4>
33
+<h4><?php print _ ('Group management'); ?></h4>
34 34
 <hr><br>
35 35
 
36 36
 <!-- Add new -->
37 37
 <div class="btn-group">
38
-	<button class='btn btn-sm btn-default editGroup' style="margin-bottom:10px;" data-action='add'><i class='fa fa-plus'></i> <?php print _('Create group'); ?></button>
39
-	<?php if($auth_methods!==false) { ?>
40
-	<button class='btn btn-sm btn-default adLookup'><i class='fa fa-search'> <?php print _('Search domain groups'); ?></i></button>
38
+	<button class='btn btn-sm btn-default editGroup' style="margin-bottom:10px;" data-action='add'><i class='fa fa-plus'></i> <?php print _ ('Create group'); ?></button>
39
+	<?php if ($auth_methods !== false) { ?>
40
+	<button class='btn btn-sm btn-default adLookup'><i class='fa fa-search'> <?php print _ ('Search domain groups'); ?></i></button>
41 41
 	<?php } ?>
42 42
 </div>
43 43
 
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 <!-- Headers -->
48 48
 <thead>
49 49
 <tr>
50
-    <th><?php print _('Group name'); ?></th>
51
-    <th><?php print _('Group description'); ?></th>
52
-    <th><?php print _('Belonging users'); ?></th>
53
-    <th><?php print _('Section permissions'); ?></th>
50
+    <th><?php print _ ('Group name'); ?></th>
51
+    <th><?php print _ ('Group description'); ?></th>
52
+    <th><?php print _ ('Belonging users'); ?></th>
53
+    <th><?php print _ ('Section permissions'); ?></th>
54 54
     <th colspan="2"></th>
55 55
 </tr>
56 56
 </thead>
@@ -58,50 +58,50 @@  discard block
 block discarded – undo
58 58
 <tbody>
59 59
 <!-- admins -->
60 60
 <tr>
61
-	<td><strong><?php print _('Administrators'); ?></strong></td>
62
-	<td><?php print _('Administrator level users'); ?></td>
61
+	<td><strong><?php print _ ('Administrators'); ?></strong></td>
62
+	<td><?php print _ ('Administrator level users'); ?></td>
63 63
 	<td>
64 64
 	<?php
65
-	foreach($admins as $a) {
65
+	foreach ($admins as $a) {
66 66
 		print $a->real_name."<br>";
67 67
 	}
68 68
 	?>
69 69
 	</td>
70
-	<td><?php print _('All sections :'); ?> <span class="badge badge1 badge5">Read / Write</span></td>
70
+	<td><?php print _ ('All sections :'); ?> <span class="badge badge1 badge5">Read / Write</span></td>
71 71
 	<td colspan="2"></td>
72 72
 </tr>
73 73
 
74 74
 <?php
75 75
 /* print existing sections */
76
-if($groups) {
76
+if ($groups) {
77 77
 	foreach ($groups as $g) {
78 78
 		//cast
79 79
 		$g = (array) $g;
80 80
 
81
-		print '<tr>' . "\n";
82
-		print '	<td><strong>' . $g['g_name'] . '</strong></td>'. "\n";
83
-		print '	<td>' . $g['g_desc'] . '</td>'. "\n";
81
+		print '<tr>'."\n";
82
+		print '	<td><strong>'.$g['g_name'].'</strong></td>'."\n";
83
+		print '	<td>'.$g['g_desc'].'</td>'."\n";
84 84
 		# users in group
85 85
 		print "	<td>";
86
-		$u = $Admin->group_fetch_users($g['g_id']);
87
-		if(sizeof($u)>0) {
88
-			foreach($u as $name) {
86
+		$u = $Admin->group_fetch_users ($g['g_id']);
87
+		if (sizeof ($u) > 0) {
88
+			foreach ($u as $name) {
89 89
 				# get details
90
-				$user = $Admin->fetch_object("users", "id", $name);
90
+				$user = $Admin->fetch_object ("users", "id", $name);
91 91
 				print $user->real_name."<br>";
92 92
 			}
93 93
 		} else {
94
-			print "<span class='text-muted'>"._("No users")."</span>";
94
+			print "<span class='text-muted'>"._ ("No users")."</span>";
95 95
 		}
96 96
 		print "</td>";
97 97
 
98 98
 		# section permissions
99 99
 		print "	<td>";
100 100
 		$permissions = $Sections->get_group_section_permissions ($g['g_id']);
101
-		if(sizeof($permissions)>0) {
102
-			foreach($permissions as $sec=>$perm) {
101
+		if (sizeof ($permissions) > 0) {
102
+			foreach ($permissions as $sec=>$perm) {
103 103
 				# reformat permissions
104
-				$perm = $Subnets->parse_permissions($perm);
104
+				$perm = $Subnets->parse_permissions ($perm);
105 105
 				print $sec." : <span class='badge badge1 badge5'>".$perm."</span><br>";
106 106
 			}
107 107
 		}
@@ -111,20 +111,20 @@  discard block
 block discarded – undo
111 111
 		# add/remove users
112 112
 		print "	<td class='actions'>";
113 113
 		print "	<div class='btn-group'>";
114
-		print "		<button class='btn btn-xs btn-default addToGroup' 		data-groupid='$g[g_id]' data-action='add'    rel='tooltip' data-container='body'  title='"._('add users to this group')."'>   	<i class='fa fa-plus'></i></button>";
115
-		print "		<button class='btn btn-xs btn-default removeFromGroup' 	data-groupid='$g[g_id]' data-action='remove' rel='tooltip' data-container='body'  title='"._('remove users from this group')."'><i class='fa fa-minus'></i></button>";
114
+		print "		<button class='btn btn-xs btn-default addToGroup' 		data-groupid='$g[g_id]' data-action='add'    rel='tooltip' data-container='body'  title='"._ ('add users to this group')."'>   	<i class='fa fa-plus'></i></button>";
115
+		print "		<button class='btn btn-xs btn-default removeFromGroup' 	data-groupid='$g[g_id]' data-action='remove' rel='tooltip' data-container='body'  title='"._ ('remove users from this group')."'><i class='fa fa-minus'></i></button>";
116 116
 		print "	</div>";
117 117
 		print "</td>";
118 118
 
119 119
 		# edit, delete
120 120
 		print "<td class='actions'>";
121 121
 		print "	<div class='btn-group'>";
122
-		print "		<button class='btn btn-xs btn-default editGroup'  		data-groupid='$g[g_id]' data-action='edit'   rel='tooltip' data-container='body'  title='"._('edit group details')."'>	<i class='fa fa-pencil'></i></button>";
123
-		print "		<button class='btn btn-xs btn-default editGroup'  		data-groupid='$g[g_id]' data-action='delete' rel='tooltip' data-container='body'  title='"._('remove group')."'>		<i class='fa fa-times'></i></button>";
122
+		print "		<button class='btn btn-xs btn-default editGroup'  		data-groupid='$g[g_id]' data-action='edit'   rel='tooltip' data-container='body'  title='"._ ('edit group details')."'>	<i class='fa fa-pencil'></i></button>";
123
+		print "		<button class='btn btn-xs btn-default editGroup'  		data-groupid='$g[g_id]' data-action='delete' rel='tooltip' data-container='body'  title='"._ ('remove group')."'>		<i class='fa fa-times'></i></button>";
124 124
 		print "	</div>";
125 125
 		print "</td>";
126 126
 
127
-		print '</tr>' . "\n";
127
+		print '</tr>'."\n";
128 128
 	}
129 129
 }
130 130
 
Please login to merge, or discard this patch.
app/admin/groups/ad-search-group-result.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -5,119 +5,119 @@
 block discarded – undo
5 5
  *************************************/
6 6
 
7 7
 /* functions */
8
-require( dirname(__FILE__) . '/../../../functions/functions.php');
9
-require( dirname(__FILE__) . "/../../../functions/adLDAP/src/adLDAP.php");
8
+require(dirname (__FILE__).'/../../../functions/functions.php');
9
+require(dirname (__FILE__)."/../../../functions/adLDAP/src/adLDAP.php");
10 10
 
11 11
 # initialize user object
12
-$Database 	= new Database_PDO;
13
-$User 		= new User ($Database);
12
+$Database = new Database_PDO;
13
+$User = new User ($Database);
14 14
 $Admin	 	= new Admin ($Database);
15 15
 $Result 	= new Result ();
16 16
 
17 17
 # verify that user is logged in
18
-$User->check_user_session();
18
+$User->check_user_session ();
19 19
 
20 20
 # fetch server
21
-$server = $Admin->fetch_object("usersAuthMethod", "id", $_POST['server']);
22
-$server!==false ? : $Result->show("danger", _("Invalid server ID"), true);
21
+$server = $Admin->fetch_object ("usersAuthMethod", "id", $_POST['server']);
22
+$server !== false ? : $Result->show ("danger", _ ("Invalid server ID"), true);
23 23
 
24 24
 # create csrf token
25 25
 $csrf = $User->csrf_cookie ("create", "group");
26 26
 
27 27
 //parse parameters
28
-$params = json_decode($server->params);
28
+$params = json_decode ($server->params);
29 29
 
30 30
 if ($server->type == "LDAP") {
31 31
 
32 32
 	// Just discovered that adLDAP flat out won't work for normal ldap groups. Stop LDAP here.
33
-	$Result->show("danger", _("Only AD group search is supported right now. Sorry."), true);
33
+	$Result->show ("danger", _ ("Only AD group search is supported right now. Sorry."), true);
34 34
 	return;
35 35
 
36 36
 }
37 37
 
38 38
 //no login parameters
39
-if(strlen(@$params->adminUsername)==0 || strlen(@$params->adminPassword)==0)	{ $Result->show("danger", _("Missing credentials"), true); }
39
+if (strlen (@$params->adminUsername) == 0 || strlen (@$params->adminPassword) == 0) { $Result->show ("danger", _ ("Missing credentials"), true); }
40 40
 //at least 2 chars
41
-if(strlen($_POST['dfilter'])<2) 												{ $Result->show("danger", _('Please enter at least 2 characters'), true); }
41
+if (strlen ($_POST['dfilter']) < 2) { $Result->show ("danger", _ ('Please enter at least 2 characters'), true); }
42 42
 
43 43
 
44 44
 //open connection
45 45
 try {
46
-	if($server->type == "NetIQ" || $server->type == "LDAP") { $params->account_suffix = ""; }
46
+	if ($server->type == "NetIQ" || $server->type == "LDAP") { $params->account_suffix = ""; }
47 47
 	//set options
48
-	$options = array(
48
+	$options = array (
49 49
 			'base_dn'=>$params->base_dn,
50 50
 			'account_suffix'=>$params->account_suffix,
51
-			'domain_controllers'=>explode(";",$params->domain_controllers),
51
+			'domain_controllers'=>explode (";", $params->domain_controllers),
52 52
 			'use_ssl'=>$params->use_ssl,
53 53
 			'use_tls'=>$params->use_tls,
54 54
 			'ad_port'=>$params->ad_port
55 55
 			);
56 56
 	//AD
57
-	$adldap = new adLDAP($options);
57
+	$adldap = new adLDAP ($options);
58 58
 
59 59
 	// Use credentials if they've been provided
60 60
 	if (isset($params->adminUsername) && isset($params->adminPassword)) {
61
-		$authUser = $adldap->authenticate($params->adminUsername, $params->adminPassword);
61
+		$authUser = $adldap->authenticate ($params->adminUsername, $params->adminPassword);
62 62
 		if ($authUser == false) {
63
-			$Result->show("danger", _("Invalid credentials"), true);
63
+			$Result->show ("danger", _ ("Invalid credentials"), true);
64 64
 		}
65 65
 	}
66 66
 
67 67
 	//search groups
68
-	$groups = $adldap->group()->search(adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP,true,"*$_POST[dfilter]*");
68
+	$groups = $adldap->group ()->search (adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, true, "*$_POST[dfilter]*");
69 69
 
70 70
 	//echo $adldap->getLastError();
71 71
 }
72 72
 catch (adLDAPException $e) {
73
-	$Result->show("danger", $adldap->getLastError(), false);
74
-	$Result->show("danger", $e->getMessage(), true);
73
+	$Result->show ("danger", $adldap->getLastError (), false);
74
+	$Result->show ("danger", $e->getMessage (), true);
75 75
 }
76 76
 
77 77
 
78 78
 //check for found
79
-if(sizeof($groups)==0) {
79
+if (sizeof ($groups) == 0) {
80 80
 	print "<div class='alert alert-info'>";
81
-	print _('No groups found')."!<hr>";
82
-	print _('Possible reasons').":";
81
+	print _ ('No groups found')."!<hr>";
82
+	print _ ('Possible reasons').":";
83 83
 	print "<ul>";
84
-	print "<li>"._('Invalid baseDN setting for ' . $server->type)."</li>";
85
-	print "<li>"._($server->type . ' account does not have enough privileges for search')."</li>";
84
+	print "<li>"._ ('Invalid baseDN setting for '.$server->type)."</li>";
85
+	print "<li>"._ ($server->type.' account does not have enough privileges for search')."</li>";
86 86
 	print "</div>";
87 87
 } else {
88
-	print _(" Following groups were found").": (".sizeof($groups)."):<hr>";
88
+	print _ (" Following groups were found").": (".sizeof ($groups)."):<hr>";
89 89
 
90 90
 	print "<table class='table table-top table-td-top  table-striped'>";
91 91
 
92 92
 	// loop
93
- 	foreach($groups as $k=>$g) {
93
+ 	foreach ($groups as $k=>$g) {
94 94
 		print "<tr>";
95 95
 		print "	<td>$k</td>";
96 96
 		print "	<td>$g</td>";
97 97
 		//actions
98 98
 		print " <td style='width:10px;'>";
99
-		print "		<a href='' class='btn btn-sm btn-default btn-success groupselect' data-gname='$k' data-gdescription='$g' data-members='$members' data-gid='$k' data-csrf_cookie='$csrf'>"._('Add group')."</a>";
99
+		print "		<a href='' class='btn btn-sm btn-default btn-success groupselect' data-gname='$k' data-gdescription='$g' data-members='$members' data-gid='$k' data-csrf_cookie='$csrf'>"._ ('Add group')."</a>";
100 100
 		print "	</td>";
101 101
 		print "</tr>";
102 102
 
103 103
 		print "<tr>";
104
-		print "	<td>"._("Members:")."</td>";
104
+		print "	<td>"._ ("Members:")."</td>";
105 105
 		print "<td colspan='2'>";
106 106
 		print "	<div class='adgroup-$k'></div>";
107 107
 		// search members
108
-		$groupMembers = $adldap->group()->members($k);
108
+		$groupMembers = $adldap->group ()->members ($k);
109 109
 		unset($members);
110
-		if($groupMembers!==false) {
111
-			foreach($groupMembers as $m) {
110
+		if ($groupMembers !== false) {
111
+			foreach ($groupMembers as $m) {
112 112
 				print "<span class='muted'>$m</span><br>";
113 113
 				$members[] = $m;
114 114
 			}
115
-			if(isset($members))
116
-			$members = implode(";", $members);
115
+			if (isset($members))
116
+			$members = implode (";", $members);
117 117
 		}
118 118
 		else {
119 119
 			$members = "";
120
-			print "<span class='muted'>"._("No members")."</span>";
120
+			print "<span class='muted'>"._ ("No members")."</span>";
121 121
 		}
122 122
 		print "	</td>";
123 123
 		print "	</tr>";
Please login to merge, or discard this patch.
app/admin/groups/add-users-result.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,59 +5,59 @@
 block discarded – undo
5 5
  *************************************/
6 6
 
7 7
 /* functions */
8
-require( dirname(__FILE__) . '/../../../functions/functions.php');
8
+require(dirname (__FILE__).'/../../../functions/functions.php');
9 9
 
10 10
 # initialize user object
11
-$Database 	= new Database_PDO;
12
-$User 		= new User ($Database);
11
+$Database = new Database_PDO;
12
+$User = new User ($Database);
13 13
 $Admin	 	= new Admin ($Database);
14 14
 $Result 	= new Result ();
15 15
 
16 16
 # verify that user is logged in
17
-$User->check_user_session();
17
+$User->check_user_session ();
18 18
 
19 19
 
20 20
 # id must be numeric
21
-if(!is_numeric($_POST['gid']))		{ $Result->show("danger", _("Invalid ID"), true); }
21
+if (!is_numeric ($_POST['gid'])) { $Result->show ("danger", _ ("Invalid ID"), true); }
22 22
 
23 23
 # parse result
24
-foreach($_POST as $k=>$p) {
25
-	if(substr($k, 0,4) == "user") {
26
-		$users[substr($k, 4)] = substr($k, 4);
24
+foreach ($_POST as $k=>$p) {
25
+	if (substr ($k, 0, 4) == "user") {
26
+		$users[substr ($k, 4)] = substr ($k, 4);
27 27
 	}
28 28
 }
29 29
 
30 30
 
31 31
 # verify that description is present if action != delete
32
-if(strlen($_POST['gid']==0))		{ $Result->show("danger", _('Error - no group ID'), true); }
32
+if (strlen ($_POST['gid'] == 0)) { $Result->show ("danger", _ ('Error - no group ID'), true); }
33 33
 
34 34
 # add each user to group
35
-if(sizeof($users)>0) {
36
-	foreach($users as $key=>$u) {
37
-		if(!$Admin->add_group_to_user($_POST['gid'], $u)) {
35
+if (sizeof ($users) > 0) {
36
+	foreach ($users as $key=>$u) {
37
+		if (!$Admin->add_group_to_user ($_POST['gid'], $u)) {
38 38
 			# get user details
39
-			$user = $Admin->fetch_object("users", "id", $u);
39
+			$user = $Admin->fetch_object ("users", "id", $u);
40 40
 			$errors[] = $user->real_name;
41 41
 		}
42 42
 	}
43 43
 }
44 44
 else {
45
-	$errors[] = _("Please select user(s) to add to selected group!");
45
+	$errors[] = _ ("Please select user(s) to add to selected group!");
46 46
 }
47 47
 
48 48
 # print result
49
-if(isset($errors)) {
49
+if (isset($errors)) {
50 50
 	print "<div class='alert alert alert-danger'>";
51
-	print _("Failed to add users").":<hr>";
51
+	print _ ("Failed to add users").":<hr>";
52 52
 	print "<ul>";
53
-	foreach($errors as $e) {
53
+	foreach ($errors as $e) {
54 54
 		print "<li>$e</li>";
55 55
 	}
56 56
 	print "</ul>";
57 57
 	print "</div>";
58 58
 }
59 59
 else {
60
-	$Result->show("success", _('Users added to group'), true);
60
+	$Result->show ("success", _ ('Users added to group'), true);
61 61
 }
62 62
 
63 63
 ?>
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
app/admin/groups/ad-search-group-form.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,32 +5,32 @@  discard block
 block discarded – undo
5 5
  *************************************/
6 6
 
7 7
 /* functions */
8
-require( dirname(__FILE__) . '/../../../functions/functions.php');
8
+require(dirname (__FILE__).'/../../../functions/functions.php');
9 9
 
10 10
 # initialize user object
11
-$Database 	= new Database_PDO;
12
-$User 		= new User ($Database);
11
+$Database = new Database_PDO;
12
+$User = new User ($Database);
13 13
 $Admin	 	= new Admin ($Database);
14 14
 $Result 	= new Result ();
15 15
 
16 16
 # verify that user is logged in
17
-$User->check_user_session();
17
+$User->check_user_session ();
18 18
 
19 19
 # fetch all available LDAP servers
20 20
 $servers = $Admin->fetch_all_objects ("usersAuthMethod");
21
-foreach($servers as $k=>$s) {
22
-	if($s->type!="AD" && $s->type!="LDAP" && $s->type!="NetIQ") {
21
+foreach ($servers as $k=>$s) {
22
+	if ($s->type != "AD" && $s->type != "LDAP" && $s->type != "NetIQ") {
23 23
 		unset($servers[$k]);
24 24
 	}
25 25
 }
26 26
 
27 27
 # die if no servers
28
-if(sizeof($servers)==0) 	{ $Result->show("danger", _("No servers available"), true, true); }
28
+if (sizeof ($servers) == 0) { $Result->show ("danger", _ ("No servers available"), true, true); }
29 29
 ?>
30 30
 
31 31
 
32 32
 <!-- header -->
33
-<div class="pHeader"><?php print _('Search domains in AD'); ?></div>
33
+<div class="pHeader"><?php print _ ('Search domains in AD'); ?></div>
34 34
 
35 35
 <!-- content -->
36 36
 <div class="pContent">
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		<td>
43 43
 			<select name="server" id="adserver" class="form-control input-w-auto">
44 44
 			<?php
45
-			foreach($servers as $s) {
45
+			foreach ($servers as $s) {
46 46
 				print "<option value='$s->id'>$s->description</option>";
47 47
 			}
48 48
 			?>
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 	<tr>
54 54
 		<td style="width:150px;">Filter</td>
55
-		<td><input type="text" class="form-control input-sm" id='dfilter' name="dfilter" placeholder="<?php print _('Enter search filter'); ?>"></td>
55
+		<td><input type="text" class="form-control input-sm" id='dfilter' name="dfilter" placeholder="<?php print _ ('Enter search filter'); ?>"></td>
56 56
 	</tr>
57 57
 
58 58
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 	<tr>
64 64
 		<td></td>
65
-		<td><button class='btn btn-sm btn-default pull-right' class="form-control input-sm" id="adsearchgroupsubmit"><?php print _('Search'); ?></button></td>
65
+		<td><button class='btn btn-sm btn-default pull-right' class="form-control input-sm" id="adsearchgroupsubmit"><?php print _ ('Search'); ?></button></td>
66 66
 	</tr>
67 67
 
68 68
 	</table>
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
 <!-- footer -->
74 74
 <div class="pFooter">
75 75
 	<div class="btn-group">
76
-		<button class="btn btn-sm btn-default hidePopupsReload"><?php print _('Cancel'); ?></button>
76
+		<button class="btn btn-sm btn-default hidePopupsReload"><?php print _ ('Cancel'); ?></button>
77 77
 	</div>
78 78
 </div>
79 79
\ No newline at end of file
Please login to merge, or discard this patch.
app/admin/groups/edit-group-result.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,58 +6,58 @@
 block discarded – undo
6 6
 
7 7
 
8 8
 /* functions */
9
-require( dirname(__FILE__) . '/../../../functions/functions.php');
9
+require(dirname (__FILE__).'/../../../functions/functions.php');
10 10
 
11 11
 # initialize user object
12
-$Database 	= new Database_PDO;
13
-$User 		= new User ($Database);
12
+$Database = new Database_PDO;
13
+$User = new User ($Database);
14 14
 $Admin	 	= new Admin ($Database);
15 15
 $Result 	= new Result ();
16 16
 
17 17
 # verify that user is logged in
18
-$User->check_user_session();
18
+$User->check_user_session ();
19 19
 
20 20
 # strip input tags
21
-$_POST = $Admin->strip_input_tags($_POST);
21
+$_POST = $Admin->strip_input_tags ($_POST);
22 22
 
23 23
 # validate csrf cookie
24
-$User->csrf_cookie ("validate", "group", $_POST['csrf_cookie']) === false ? $Result->show("danger", _("Invalid CSRF cookie"), true) : "";
24
+$User->csrf_cookie ("validate", "group", $_POST['csrf_cookie']) === false ? $Result->show ("danger", _ ("Invalid CSRF cookie"), true) : "";
25 25
 
26 26
 
27 27
 # remove users from this group if delete and remove group from sections
28
-if($_POST['action'] == "delete") {
29
-	$Admin->remove_group_from_users($_POST['g_id']);
30
-	$Admin->remove_group_from_sections($_POST['g_id']);
28
+if ($_POST['action'] == "delete") {
29
+	$Admin->remove_group_from_users ($_POST['g_id']);
30
+	$Admin->remove_group_from_sections ($_POST['g_id']);
31 31
 }
32 32
 else {
33
-	if(strlen($_POST['g_name']) < 2)										{ $Result->show("danger", _('Name must be at least 2 characters long')."!", true); }
33
+	if (strlen ($_POST['g_name']) < 2) { $Result->show ("danger", _ ('Name must be at least 2 characters long')."!", true); }
34 34
 }
35 35
 
36 36
 # unique name
37
-if($_POST['action']=="add") {
38
-if($Admin->fetch_object("userGroups", "g_name", $_POST['g_name'])!==false)	{ $Result->show("danger", _('Group already exists')."!", true); }
37
+if ($_POST['action'] == "add") {
38
+if ($Admin->fetch_object ("userGroups", "g_name", $_POST['g_name']) !== false) { $Result->show ("danger", _ ('Group already exists')."!", true); }
39 39
 }
40 40
 
41 41
 # create array of values for modification
42
-$values = array("g_id"=>@$_POST['g_id'],
42
+$values = array ("g_id"=>@$_POST['g_id'],
43 43
 				"g_name"=>$_POST['g_name'],
44 44
 				"g_desc"=>@$_POST['g_desc']);
45 45
 
46 46
 /* try to execute */
47
-if(!$Admin->object_modify("userGroups", $_POST['action'], "g_id", $values)) { $Result->show("danger",  _("Group $_POST[action] error")."!", false); }
48
-else 					 													{ $Result->show("success", _("Group $_POST[action] success")."!", false); }
47
+if (!$Admin->object_modify ("userGroups", $_POST['action'], "g_id", $values)) { $Result->show ("danger", _ ("Group $_POST[action] error")."!", false); }
48
+else { $Result->show ("success", _ ("Group $_POST[action] success")."!", false); }
49 49
 
50 50
 # from list of usernames provided from AD result if some user matches add him to group
51
-if (strlen($_POST['gmembers'])>0) {
51
+if (strlen ($_POST['gmembers']) > 0) {
52 52
 	// save id
53 53
 	$gid = $Admin->lastId;
54 54
 	// to array
55
-	$gmembers = explode(";", $_POST['gmembers']);
55
+	$gmembers = explode (";", $_POST['gmembers']);
56 56
 	// check
57 57
 	foreach ($gmembers as $gm) {
58 58
 		// check if user exists
59
-		$user=$Admin->fetch_object("users","username",$gm);
60
-		if ($user!==false) {
59
+		$user = $Admin->fetch_object ("users", "username", $gm);
60
+		if ($user !== false) {
61 61
 			// add to group
62 62
 			$Admin->add_group_to_user ($gid, $user->id);
63 63
 		}
Please login to merge, or discard this patch.
app/admin/groups/remove-users.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -5,36 +5,36 @@  discard block
 block discarded – undo
5 5
  *************************************************/
6 6
 
7 7
 /* functions */
8
-require( dirname(__FILE__) . '/../../../functions/functions.php');
8
+require(dirname (__FILE__).'/../../../functions/functions.php');
9 9
 
10 10
 # initialize user object
11
-$Database 	= new Database_PDO;
12
-$User 		= new User ($Database);
11
+$Database = new Database_PDO;
12
+$User = new User ($Database);
13 13
 $Admin	 	= new Admin ($Database);
14 14
 $Result 	= new Result ();
15 15
 
16 16
 # verify that user is logged in
17
-$User->check_user_session();
17
+$User->check_user_session ();
18 18
 
19 19
 
20 20
 # id must be numeric
21
-if(!is_numeric($_POST['g_id']))		{ $Result->show("danger", _("Invalid ID"), true, true); }
21
+if (!is_numeric ($_POST['g_id'])) { $Result->show ("danger", _ ("Invalid ID"), true, true); }
22 22
 
23 23
 # get group details
24
-$group   = $Admin->fetch_object("userGroups", "g_id", $_POST['g_id']);
24
+$group = $Admin->fetch_object ("userGroups", "g_id", $_POST['g_id']);
25 25
 # users in group - array of ids
26 26
 $existing = $Admin->group_fetch_users ($_POST['g_id']);
27 27
 ?>
28 28
 
29 29
 
30 30
 <!-- header -->
31
-<div class="pHeader"><?php print _('Remove users from group'); ?> <?php print $group->g_name; ?></div>
31
+<div class="pHeader"><?php print _ ('Remove users from group'); ?> <?php print $group->g_name; ?></div>
32 32
 
33 33
 
34 34
 <!-- content -->
35 35
 <div class="pContent">
36 36
 
37
-	<?php if(sizeof($existing) > 0) { ?>
37
+	<?php if (sizeof ($existing) > 0) { ?>
38 38
 
39 39
 	<form id="groupRemoveUsers" name="groupRemoveUsers">
40 40
 	<table class="groupEdit table table-condensed table-top">
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 		<th>
44 44
 			<input type="hidden" name="gid" value="<?php print $_POST['g_id']; ?>">
45 45
 		</th>
46
-		<th><?php print _('Name'); ?></th>
47
-		<th><?php print _('Username'); ?></th>
48
-		<th><?php print _('Email'); ?></th>
46
+		<th><?php print _ ('Name'); ?></th>
47
+		<th><?php print _ ('Username'); ?></th>
48
+		<th><?php print _ ('Email'); ?></th>
49 49
 	</tr>
50 50
 
51 51
 	<?php
52 52
 	# show existing
53
-	foreach($existing as $m) {
53
+	foreach ($existing as $m) {
54 54
 		# get user details
55
-		$u = (array) $Admin->fetch_object("users", "id", $m);
55
+		$u = (array) $Admin->fetch_object ("users", "id", $m);
56 56
 
57 57
 		print "<tr>";
58 58
 
@@ -71,16 +71,16 @@  discard block
 block discarded – undo
71 71
     </table>
72 72
     </form>
73 73
 
74
-    <?php } else { $Result->show("info", _('No users in this group'), false);  } ?>
74
+    <?php } else { $Result->show ("info", _ ('No users in this group'), false); } ?>
75 75
 </div>
76 76
 
77 77
 
78 78
 <!-- footer -->
79 79
 <div class="pFooter">
80 80
 	<div class="btn-group">
81
-		<button class="btn btn-sm btn-default hidePopups"><?php print _('Cancel'); ?></button>
82
-		<?php if(sizeof($existing) > 0) { ?>
83
-		<button class="btn btn-sm btn-default btn-success" id="groupRemoveUsersSubmit"><i class="fa fa-minus"></i> <?php print _('Remove selected users'); ?></button>
81
+		<button class="btn btn-sm btn-default hidePopups"><?php print _ ('Cancel'); ?></button>
82
+		<?php if (sizeof ($existing) > 0) { ?>
83
+		<button class="btn btn-sm btn-default btn-success" id="groupRemoveUsersSubmit"><i class="fa fa-minus"></i> <?php print _ ('Remove selected users'); ?></button>
84 84
 		<?php } ?>
85 85
 	</div>
86 86
 
Please login to merge, or discard this patch.
app/admin/filter-fields/index.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@  discard block
 block discarded – undo
5 5
  ****************************************/
6 6
 
7 7
 # verify that user is logged in
8
-$User->check_user_session();
8
+$User->check_user_session ();
9 9
 
10 10
 
11 11
 # get all fields in IP table
12
-foreach($Tools->fetch_standard_fields("ipaddresses") as $s) {
12
+foreach ($Tools->fetch_standard_fields ("ipaddresses") as $s) {
13 13
 	$standard_fields[$s] = $s;
14 14
 }
15 15
 
16 16
 # get all selected fields and put them to array
17
-$selected_fields = explode(";", $User->settings->IPfilter);
17
+$selected_fields = explode (";", $User->settings->IPfilter);
18 18
 
19 19
 /* unset mandatory fields -> id,subnetid,ip_addr */
20 20
 unset($standard_fields['id'], $standard_fields['state'], $standard_fields['subnetId'],
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 ?>
26 26
 
27 27
 
28
-<h4><?php print _('Filter which fields to display in IP list'); ?></h4>
28
+<h4><?php print _ ('Filter which fields to display in IP list'); ?></h4>
29 29
 <hr>
30 30
 
31
-<div class="alert alert-info alert-absolute"><?php print _('You can select which fields are actually being used for IP management, so you dont show any overhead if not used. IP, hostname and description are mandatory'); ?>.</div>
31
+<div class="alert alert-info alert-absolute"><?php print _ ('You can select which fields are actually being used for IP management, so you dont show any overhead if not used. IP, hostname and description are mandatory'); ?>.</div>
32 32
 
33 33
 
34 34
 <form id="filterIP" style="margin-top:50px;clear:both;">
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
 
37 37
 <!-- headers -->
38 38
 <tr>
39
-	<th colspan="2"><?php print _('Check which fields to use for IP addresses'); ?>:</th>
39
+	<th colspan="2"><?php print _ ('Check which fields to use for IP addresses'); ?>:</th>
40 40
 </tr>
41 41
 
42 42
 <!-- fields -->
43 43
 <?php
44
-foreach($standard_fields as $field) {
44
+foreach ($standard_fields as $field) {
45 45
 	# set active
46
-	$checked = in_array($field, $selected_fields) ? "checked" : "";
46
+	$checked = in_array ($field, $selected_fields) ? "checked" : "";
47 47
 
48 48
 	# replace switch
49
-	$field_print = $field=="switch" ? "device" : $field;
49
+	$field_print = $field == "switch" ? "device" : $field;
50 50
 
51
-	print '<tr>'. "\n";
52
-	print '	<td style="width:10px;padding-left:10px;"><input type="checkbox" class="input-switch" name="'. $field .'" value="'. $field .'" '. $checked .'></td>';
53
-	print '	<td>'. ucfirst($field_print) .'</td>';
51
+	print '<tr>'."\n";
52
+	print '	<td style="width:10px;padding-left:10px;"><input type="checkbox" class="input-switch" name="'.$field.'" value="'.$field.'" '.$checked.'></td>';
53
+	print '	<td>'.ucfirst ($field_print).'</td>';
54 54
 	print '</tr>';
55 55
 }
56 56
 ?>
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 <tr>
60 60
 	<td></td>
61 61
 	<td>
62
-		<button class="btn btn-sm btn-default" id="filterIPSave"><i class="fa fa-check"></i> <?php print _('Save'); ?></button>
62
+		<button class="btn btn-sm btn-default" id="filterIPSave"><i class="fa fa-check"></i> <?php print _ ('Save'); ?></button>
63 63
 	</td>
64 64
 </tr>
65 65
 
Please login to merge, or discard this patch.
app/admin/filter-fields/filter-result.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,23 +6,23 @@
 block discarded – undo
6 6
 
7 7
 
8 8
 /* functions */
9
-require( dirname(__FILE__) . '/../../../functions/functions.php');
9
+require(dirname (__FILE__).'/../../../functions/functions.php');
10 10
 
11 11
 # initialize user object
12
-$Database 	= new Database_PDO;
13
-$User 		= new User ($Database);
12
+$Database = new Database_PDO;
13
+$User = new User ($Database);
14 14
 $Admin	 	= new Admin ($Database);
15 15
 $Result 	= new Result ();
16 16
 
17 17
 # verify that user is logged in
18
-$User->check_user_session();
18
+$User->check_user_session ();
19 19
 
20 20
 # set fields to update
21
-$values = array("id"=>1,
22
-				"IPfilter"=>implode(';', $_POST));
21
+$values = array ("id"=>1,
22
+				"IPfilter"=>implode (';', $_POST));
23 23
 
24 24
 # update
25
-if(!$Admin->object_modify("settings", "edit", "id", $values))   { $Result->show("danger alert-absolute",  _("Update failed"), true); }
26
-else															{ $Result->show("success alert-absolute", _('Update successfull'), true); }
25
+if (!$Admin->object_modify ("settings", "edit", "id", $values)) { $Result->show ("danger alert-absolute", _ ("Update failed"), true); }
26
+else { $Result->show ("success alert-absolute", _ ('Update successfull'), true); }
27 27
 
28 28
 ?>
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
app/admin/powerDNS/domain-edit.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
  ************************************************/
6 6
 
7 7
 /* functions */
8
-require( dirname(__FILE__) . '/../../../functions/functions.php');
8
+require(dirname (__FILE__).'/../../../functions/functions.php');
9 9
 
10 10
 # initialize user object
11
-$Database 	= new Database_PDO;
12
-$User 		= new User ($Database);
11
+$Database = new Database_PDO;
12
+$User = new User ($Database);
13 13
 $Admin	 	= new Admin ($Database);
14 14
 $Tools	 	= new Tools ($Database);
15 15
 $Result 	= new Result ();
16
-$PowerDNS 	= new PowerDNS ($Database);
16
+$PowerDNS = new PowerDNS ($Database);
17 17
 
18 18
 # verify that user is logged in
19
-$User->check_user_session();
19
+$User->check_user_session ();
20 20
 
21 21
 # create csrf token
22 22
 $csrf = $User->csrf_cookie ("create", "domain");
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
 $pdns = $PowerDNS->db_settings;
26 26
 
27 27
 # get VRF
28
-if($_POST['action']!="add") {
28
+if ($_POST['action'] != "add") {
29 29
 	$domain = $PowerDNS->fetch_domain ($_POST['id']);
30
-	$domain!==false ? : $Result->show("danger", _("Invalid ID"), true, true);
30
+	$domain !== false ? : $Result->show ("danger", _ ("Invalid ID"), true, true);
31 31
 }
32 32
 
33 33
 # disable edit on delete
34
-$readonly = $_POST['action']=="delete" ? "readonly" : "";
34
+$readonly = $_POST['action'] == "delete" ? "readonly" : "";
35 35
 ?>
36 36
 
37 37
 
38 38
 <!-- header -->
39
-<div class="pHeader"><?php print ucwords(_("$_POST[action]")); ?> <?php print _('domain'); ?></div>
39
+<div class="pHeader"><?php print ucwords (_ ("$_POST[action]")); ?> <?php print _ ('domain'); ?></div>
40 40
 
41 41
 <!-- content -->
42 42
 <div class="pContent">
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
 	<!-- name  -->
48 48
 	<tr>
49
-		<td style="width:150px;"><?php print _('Name'); ?></td>
49
+		<td style="width:150px;"><?php print _ ('Name'); ?></td>
50 50
 		<td>
51
-			<input type="text" class="name form-control input-sm" name="name" placeholder="<?php print _('FQDN domain name'); ?>" value="<?php print $domain->name; ?>" <?php print $readonly; ?> <?php if($_POST['action']!="add") { print "disabled='disabled'"; } ?>>
51
+			<input type="text" class="name form-control input-sm" name="name" placeholder="<?php print _ ('FQDN domain name'); ?>" value="<?php print $domain->name; ?>" <?php print $readonly; ?> <?php if ($_POST['action'] != "add") { print "disabled='disabled'"; } ?>>
52 52
 			<input type="hidden" name="action" value="<?php print $_POST['action']; ?>">
53 53
 			<input type="hidden" name="id" value="<?php print @$_POST['id']; ?>">
54 54
             <input type="hidden" name="csrf_cookie" value="<?php print $csrf; ?>">
@@ -57,23 +57,23 @@  discard block
 block discarded – undo
57 57
 
58 58
 	<!-- master -->
59 59
 	<tr>
60
-		<td><?php print _('Master NS'); ?></td>
60
+		<td><?php print _ ('Master NS'); ?></td>
61 61
 		<td>
62
-			<input type="text" class="name form-control input-sm" name="master" placeholder="<?php print _('NULL'); ?>" value="<?php print $domain->master; ?>" <?php print $readonly; ?>>
62
+			<input type="text" class="name form-control input-sm" name="master" placeholder="<?php print _ ('NULL'); ?>" value="<?php print $domain->master; ?>" <?php print $readonly; ?>>
63 63
 		</td>
64 64
 	</tr>
65 65
 
66 66
 	<!-- type -->
67 67
 	<tr>
68
-		<td><?php print _('Domain type'); ?></td>
68
+		<td><?php print _ ('Domain type'); ?></td>
69 69
 		<td>
70 70
 			<select name="type" class="form-control input-w-auto" <?php print $readonly; ?>>
71 71
 			<?php
72 72
 			// loop
73
-			foreach($PowerDNS->domain_types as $type) {
73
+			foreach ($PowerDNS->domain_types as $type) {
74 74
 				// active
75
-				if ($type == @$domain->type)	{ $selected = "selected"; }
76
-				else							{ $selected = ""; }
75
+				if ($type == @$domain->type) { $selected = "selected"; }
76
+				else { $selected = ""; }
77 77
 				// print
78 78
 				print "<option value='$type' $selected>$type</option>";
79 79
 			}
@@ -84,43 +84,43 @@  discard block
 block discarded – undo
84 84
 
85 85
 	<?php
86 86
 	// we need default parameters only if we create new domain !
87
-	if($_POST['action']=="add") {
87
+	if ($_POST['action'] == "add") {
88 88
 	?>
89 89
 
90 90
 	<tbody class="defaults">
91 91
 
92 92
 	<!-- hr -->
93 93
 	<tr>
94
-		<td colspan="2"><hr><strong><?php print _("Default record values (SOA, NS)"); ?></strong><br><br></td>
94
+		<td colspan="2"><hr><strong><?php print _ ("Default record values (SOA, NS)"); ?></strong><br><br></td>
95 95
 	</tr>
96 96
 
97 97
 	<!-- defualt values for SOA and NS records -->
98 98
 
99 99
 	<!-- ns -->
100 100
 	<tr>
101
-		<td><?php print _('Name servers'); ?></th>
101
+		<td><?php print _ ('Name servers'); ?></th>
102 102
 		<td>
103 103
 			<input type="text" class="form-control input-sm" name="ns" value="<?php print $pdns->ns; ?>">
104 104
 		</td>
105 105
 	</tr>
106 106
 	<!-- mail -->
107 107
 	<tr>
108
-		<td><?php print _('Hostmaster'); ?></th>
108
+		<td><?php print _ ('Hostmaster'); ?></th>
109 109
 		<td>
110 110
 			<input type="text" class="form-control input-sm" name="hostmaster" value="<?php print $pdns->hostmaster; ?>">
111 111
 		</td>
112 112
 	</tr>
113 113
 	<!-- ttl -->
114 114
 	<tr>
115
-		<td><?php print _('TTL'); ?></th>
115
+		<td><?php print _ ('TTL'); ?></th>
116 116
 		<td>
117 117
 		<select name="ttl" class="form-control input-w-auto input-sm" <?php print $readonly; ?>>
118 118
 		<?php
119 119
 		// loop
120
-		foreach($PowerDNS->ttl as $k=>$ttl) {
120
+		foreach ($PowerDNS->ttl as $k=>$ttl) {
121 121
 			// active
122
-			if ($k == @$pdns->ttl)	{ $selected = "selected"; }
123
-			else					{ $selected = ""; }
122
+			if ($k == @$pdns->ttl) { $selected = "selected"; }
123
+			else { $selected = ""; }
124 124
 			// print
125 125
 			print "<option value='$k' $selected>$ttl ($k)</option>";
126 126
 		}
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
 	</tr>
131 131
 	<!-- refresh -->
132 132
 	<tr>
133
-		<td><?php print _('Refresh'); ?></th>
133
+		<td><?php print _ ('Refresh'); ?></th>
134 134
 		<td>
135 135
 		<select name="refresh" class="form-control input-w-auto input-sm" <?php print $readonly; ?>>
136 136
 		<?php
137 137
 		// loop
138
-		foreach($PowerDNS->ttl as $k=>$ttl) {
138
+		foreach ($PowerDNS->ttl as $k=>$ttl) {
139 139
 			// active
140
-			if ($k == @$pdns->refresh)	{ $selected = "selected"; }
141
-			else						{ $selected = ""; }
140
+			if ($k == @$pdns->refresh) { $selected = "selected"; }
141
+			else { $selected = ""; }
142 142
 			// print
143 143
 			print "<option value='$k' $selected>$ttl ($k)</option>";
144 144
 		}
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
 	</tr>
149 149
 	<!-- ttl -->
150 150
 	<tr>
151
-		<td><?php print _('Retry'); ?></th>
151
+		<td><?php print _ ('Retry'); ?></th>
152 152
 		<td>
153 153
 		<select name="retry" class="form-control input-w-auto input-sm" <?php print $readonly; ?>>
154 154
 		<?php
155 155
 		// loop
156
-		foreach($PowerDNS->ttl as $k=>$ttl) {
156
+		foreach ($PowerDNS->ttl as $k=>$ttl) {
157 157
 			// active
158
-			if ($k == @$pdns->retry)	{ $selected = "selected"; }
159
-			else						{ $selected = ""; }
158
+			if ($k == @$pdns->retry) { $selected = "selected"; }
159
+			else { $selected = ""; }
160 160
 			// print
161 161
 			print "<option value='$k' $selected>$ttl ($k)</option>";
162 162
 		}
@@ -165,15 +165,15 @@  discard block
 block discarded – undo
165 165
 	</tr>
166 166
 	<!-- ttl -->
167 167
 	<tr>
168
-		<td><?php print _('NXDOMAIN ttl'); ?></th>
168
+		<td><?php print _ ('NXDOMAIN ttl'); ?></th>
169 169
 		<td>
170 170
 		<select name="nxdomain_ttl" class="form-control input-w-auto input-sm" <?php print $readonly; ?>>
171 171
 		<?php
172 172
 		// loop
173
-		foreach($PowerDNS->ttl as $k=>$ttl) {
173
+		foreach ($PowerDNS->ttl as $k=>$ttl) {
174 174
 			// active
175
-			if ($k == @$pdns->nxdomain_ttl)	{ $selected = "selected"; }
176
-			else							{ $selected = ""; }
175
+			if ($k == @$pdns->nxdomain_ttl) { $selected = "selected"; }
176
+			else { $selected = ""; }
177 177
 			// print
178 178
 			print "<option value='$k' $selected>$ttl ($k)</option>";
179 179
 		}
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	<tr>
187 187
 		<td></td>
188 188
 		<td>
189
-			<input type="checkbox" class="hideDefaults" value="1" name="manual"> <?php print _("Dont create default records (SOA, NS)"); ?>
189
+			<input type="checkbox" class="hideDefaults" value="1" name="manual"> <?php print _ ("Dont create default records (SOA, NS)"); ?>
190 190
 		</td>
191 191
 	</tr>
192 192
 	<?php } ?>
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
 	<?php
198 198
 	//print delete warning
199
-	if($_POST['action'] == "delete")	{ $Result->show("warning", "<strong>"._('Warning').":</strong> "._("removing Domain will also remove all referenced entries!"), false);}
199
+	if ($_POST['action'] == "delete") { $Result->show ("warning", "<strong>"._ ('Warning').":</strong> "._ ("removing Domain will also remove all referenced entries!"), false); }
200 200
 	?>
201 201
 </div>
202 202
 
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 <!-- footer -->
205 205
 <div class="pFooter">
206 206
 	<div class="btn-group">
207
-		<button class="btn btn-sm btn-default <?php if(@$_POST['secondary']=="true") { print "hidePopup2"; } else { print "hidePopups"; } ?>"><?php print _('Cancel'); ?></button>
208
-		<button class="btn btn-sm btn-default <?php if($_POST['action']=="delete") { print "btn-danger"; } else { print "btn-success"; } ?> <?php if(@$_POST['secondary']=="true") { print "editDomainSubmit2"; } ?>" id="editDomainSubmit"><i class="fa <?php if($_POST['action']=="add") { print "fa-plus"; } else if ($_POST['action']=="delete") { print "fa-trash-o"; } else { print "fa-check"; } ?>"></i> <?php print ucwords(_($_POST['action'])); ?></button>
207
+		<button class="btn btn-sm btn-default <?php if (@$_POST['secondary'] == "true") { print "hidePopup2"; } else { print "hidePopups"; } ?>"><?php print _ ('Cancel'); ?></button>
208
+		<button class="btn btn-sm btn-default <?php if ($_POST['action'] == "delete") { print "btn-danger"; } else { print "btn-success"; } ?> <?php if (@$_POST['secondary'] == "true") { print "editDomainSubmit2"; } ?>" id="editDomainSubmit"><i class="fa <?php if ($_POST['action'] == "add") { print "fa-plus"; } else if ($_POST['action'] == "delete") { print "fa-trash-o"; } else { print "fa-check"; } ?>"></i> <?php print ucwords (_ ($_POST['action'])); ?></button>
209 209
 	</div>
210 210
 	<!-- result -->
211 211
 	<div class="domain-edit-result"></div>
Please login to merge, or discard this patch.