Completed
Pull Request — master (#532)
06:37
created
index.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	# make upgrade and php build checks
46 46
 	include('functions/checks/check_db_upgrade.php'); 	# check if database needs upgrade
47 47
 	include('functions/checks/check_php_build.php');	# check for support for PHP modules and database connection
48
-	if($_GET['switch'] && $_SESSION['realipamusername'] && $_GET['switch'] == "back"){
48
+	if($_GET['switch'] && $_SESSION['realipamusername'] && $_GET['switch'] == "back") {
49 49
 		$_SESSION['ipamusername'] = $_SESSION['realipamusername'];
50 50
 		unset($_SESSION['realipamusername']);
51 51
 		print	'<script>window.location.href = "'.create_link(null).'";</script>';
@@ -158,7 +158,10 @@  discard block
 block discarded – undo
158 158
 <!-- page sections / menu -->
159 159
 <div class="content">
160 160
 <div id="sections_overlay">
161
-    <?php if($_GET['page']!="login" && $_GET['page']!="request_ip" && $_GET['page']!="upgrade" && $_GET['page']!="install" && $User->user->passChange!="Yes")  include('app/sections/index.php');?>
161
+    <?php if($_GET['page']!="login" && $_GET['page']!="request_ip" && $_GET['page']!="upgrade" && $_GET['page']!="install" && $User->user->passChange!="Yes") {
162
+    include('app/sections/index.php');
163
+}
164
+?>
162 165
 </div>
163 166
 </div>
164 167
 
@@ -210,7 +213,7 @@  discard block
 block discarded – undo
210 213
 				print "<div id='leftMenu' class='menu-$_GET[page]'>";
211 214
 					if($_GET['page'] == "subnets" || $_GET['page'] == "vlan" ||
212 215
 					   $_GET['page'] == "vrf" 	  || $_GET['page'] == "folder")			{ include("app/subnets/subnets-menu.php"); }
213
-					else if ($_GET['page'] == "tools")									{ include("app/tools/tools-menu.php"); }
216
+					   else if ($_GET['page'] == "tools")									{ include("app/tools/tools-menu.php"); }
214 217
 					else if ($_GET['page'] == "administration")							{ include("app/admin/admin-menu.php"); }
215 218
 				print "</div>";
216 219
 				print "</td>";
Please login to merge, or discard this patch.
functions/classes/class.Rackspace.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,8 @@
 block discarded – undo
130 130
         if ($this->key_size > 0) {
131 131
 
132 132
             $out .= ' ' . trim($this->key_data, '.') . '.';
133
-        } else {
133
+        }
134
+        else {
134 135
 
135 136
             $out .= ' .';
136 137
         }
Please login to merge, or discard this patch.
api/controllers/L2domains.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		# execute update
164 164
 		if(!$this->Admin->object_modify ("vrf", "add", "vrfId", $values))
165 165
 													{ $this->Response->throw_exception(500, "VRF creation failed"); }
166
-		else {
166
+													else {
167 167
 			//set result
168 168
 			return array("code"=>201, "data"=>"VRF created", "location"=>"/api/".$this->_params->app_id."/vrfs/".$this->Admin->lastId."/");
169 169
 		}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		# execute update
196 196
 		if(!$this->Admin->object_modify ("vrf", "edit", "vrfId", $values))
197 197
 													{ $this->Response->throw_exception(500, "Vrf edit failed"); }
198
-		else {
198
+													else {
199 199
 			//set result
200 200
 			return array("code"=>200, "data"=>"VRF updated");
201 201
 		}
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		# execute delete
223 223
 		if(!$this->Admin->object_modify ("vrf", "delete", "vrfId", $values))
224 224
 													{ $this->Response->throw_exception(500, "Vrf delete failed"); }
225
-		else {
225
+													else {
226 226
 			// delete all references
227 227
 			$this->Admin->remove_object_references ("subnets", "vrfId", $this->_params->id);
228 228
 
Please login to merge, or discard this patch.
api/controllers/Vlans.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		# execute update
164 164
 		if(!$this->Admin->object_modify ("vrf", "add", "vrfId", $values))
165 165
 													{ $this->Response->throw_exception(500, "VRF creation failed"); }
166
-		else {
166
+													else {
167 167
 			//set result
168 168
 			return array("code"=>201, "data"=>"VRF created", "location"=>"/api/".$this->_params->app_id."/vrfs/".$this->Admin->lastId."/");
169 169
 		}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		# execute update
196 196
 		if(!$this->Admin->object_modify ("vrf", "edit", "vrfId", $values))
197 197
 													{ $this->Response->throw_exception(500, "Vrf edit failed"); }
198
-		else {
198
+													else {
199 199
 			//set result
200 200
 			return array("code"=>200, "data"=>"VRF updated");
201 201
 		}
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		# execute delete
223 223
 		if(!$this->Admin->object_modify ("vrf", "delete", "vrfId", $values))
224 224
 													{ $this->Response->throw_exception(500, "Vrf delete failed"); }
225
-		else {
225
+													else {
226 226
 			// delete all references
227 227
 			$this->Admin->remove_object_references ("subnets", "vrfId", $this->_params->id);
228 228
 
Please login to merge, or discard this patch.
app/dashboard/widgets/iprequest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
         				if($subnet->allowRequests == 1) {
41 41
         					$subnets_count ++;
42 42
         					/* must not have any nested subnets! */
43
-        					if(!$Subnets->has_slaves($subnet->id))
44
-        					{
43
+        					if(!$Subnets->has_slaves($subnet->id)) {
45 44
         						$html[] = '<option value="'. $subnet->id .'">' . $Subnets->transform_to_dotted($subnet->subnet) .'/'. $subnet->mask .' ['. $subnet->description .']</option>';
46 45
         					}
47 46
         				}
Please login to merge, or discard this patch.
app/dashboard/widgets/changelog.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 $User->check_user_session ();
22 22
 
23 23
 # if direct request that redirect to tools page
24
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
24
+if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest") {
25 25
 	header("Location: ".create_link("tools","changelog"));
26 26
 }
27 27
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			else							{ $permission = 0; }
73 73
 
74 74
 			# if 0 ignore
75
-			if($permission > 0)	{
75
+			if($permission > 0) {
76 76
 				# format diff
77 77
 				$l['cdiff'] = str_replace("\n\n", "", trim($l['cdiff']));
78 78
 				$l['cdiff'] = str_replace("\n", "; ", $l['cdiff']);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 				switch($l['ctype']) {
82 82
 					case "ip_addr":							{ $l['ctype'] = "IP address";	break; }
83 83
 					case "subnet":  if($l['isFolder']==1) 	{ $l['ctype'] = "Folder"; }
84
-									else 					{ $l['ctype'] = "Subnet"; }
84
+					else 					{ $l['ctype'] = "Subnet"; }
85 85
 					break;
86 86
 
87 87
 					case "section":							{ $l['ctype'] = "Section";	break; }
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
 				print "	<td>$l[ctype] / $l[caction] $l[cresult]</td>";
93 93
 
94 94
 				# subnet, section or ip address
95
-				if($l['ctype']=="IP address")	{
95
+				if($l['ctype']=="IP address") {
96 96
 					print "	<td><a href='".create_link("subnets",$l['sectionId'],$l['subnetId'],"address-details",$l['tid'])."'>".$Subnets->transform_address ($l['ip_addr'], "dotted")."</a></td>";
97 97
 				}
98
-				elseif($l['ctype']=="Subnet")   {
98
+				elseif($l['ctype']=="Subnet") {
99 99
 					print "	<td><a href='".create_link("subnets",$l['sectionId'],$l['tid'])."'>".$Subnets->transform_address ($l['ip_addr'], "dotted")."/$l[mask]</a></td>";
100 100
 				}
101
-				elseif($l['ctype']=="Folder")   {
101
+				elseif($l['ctype']=="Folder") {
102 102
 					print "	<td><a href='".create_link("folder",$l['sectionId'],$l['tid'])."'>$l[sDescription]</a></td>";
103 103
 				}
104
-				elseif($l['ctype']=="Section")   {
104
+				elseif($l['ctype']=="Section") {
105 105
 					print "	<td><a href='".create_link("subnets",$l['tid'])."'>$l[sDescription]</a></td>";
106 106
 				}
107 107
 				print "	<td>$l[cdate]</td>";
Please login to merge, or discard this patch.
app/dashboard/widgets/tools.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $User->check_user_session ();
15 15
 
16 16
 # if direct request that redirect to tools page
17
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
17
+if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest") {
18 18
 	header("Location: ".create_link("tools"));
19 19
 }
20 20
 
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 # Subnets
26 26
 $tools_menu['Subnets'][] 	= array("show"=>true,	"icon"=>"fa-sitemap", 	"name"=>"Subnets",  		   	"href"=>"subnets", 		"description"=>"Show all subnets");
27 27
 $tools_menu['Subnets'][] 	= array("show"=>true,	"icon"=>"fa-cloud", 	"name"=>"VLAN",  				"href"=>"vlan", 		"description"=>"Show VLANs and belonging subnets");
28
-if($User->settings->enableVRF == 1)
29
-$tools_menu['Subnets'][] 	= array("show"=>true,	"icon"=>"fa-cloud", 	 "name"=>"VRF",  				"href"=>"vrf", 			"description"=>"Show VRFs and belonging networks");
28
+if($User->settings->enableVRF == 1) {
29
+    $tools_menu['Subnets'][] 	= array("show"=>true,	"icon"=>"fa-cloud", 	 "name"=>"VRF",  				"href"=>"vrf", 			"description"=>"Show VRFs and belonging networks");
30
+}
30 31
 $tools_menu['Subnets'][] 	= array("show"=>true,	"icon"=>"fa-desktop", 	 "name"=>"Devices",  			"href"=>"devices", 		"description"=>"Show all configured devices");
31 32
 ?>
32 33
 
Please login to merge, or discard this patch.
app/dashboard/widgets/favourite_subnets.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 $User->check_user_session ();
15 15
 
16 16
 # if direct request that redirect to tools page
17
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
17
+if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest") {
18 18
 	header("Location: ".create_link("tools","favourites"));
19 19
 }
20 20
 ?>
@@ -77,7 +77,8 @@  discard block
 block discarded – undo
77 77
 			if(strlen($f['vlanId'])>0 && $f['vlanId']!=0) {
78 78
 				$vlan = $Tools->fetch_object("vlans", "vlanId", $f['vlanId']);
79 79
 				print "	<td>$vlan->number</td>";
80
-			} else {
80
+			}
81
+			else {
81 82
 				print "	<td>/</td>";
82 83
 			}
83 84
 
Please login to merge, or discard this patch.
app/dashboard/widgets/top10_percentage.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $slimit = 10;
23 23
 
24 24
 # if direct request include plot JS
25
-if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest")	{
25
+if($_SERVER['HTTP_X_REQUESTED_WITH']!="XMLHttpRequest") {
26 26
 	# get widget details
27 27
 	if(!$widget = $Tools->fetch_widget ("wfile", $_REQUEST['section'])) { $Result->show("danger", _("Invalid widget"), true); }
28 28
 	# reset size and limit
@@ -221,7 +221,8 @@  discard block
 block discarded – undo
221 221
 	if($m!=0) {
222 222
 	?>
223 223
     $.plot($("#<?php print $type; ?>top10"), [ data ], options);
224
-    <?php } else { ?>
224
+    <?php }
225
+else { ?>
225 226
     $("#IPv4top10").hide();
226 227
     <?php } ?>
227 228
 });
Please login to merge, or discard this patch.