From 7fe908c50c8dbc5cc05f571dbe11d66141caacd4 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 14 Nov 2013 09:01:22 -0500
Subject: [PATCH] Cleaning up code to match coding guidelines

---
 interface/web/mail/mail_transport_edit.php |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/interface/web/mail/mail_transport_edit.php b/interface/web/mail/mail_transport_edit.php
index c33970e..51abd68 100644
--- a/interface/web/mail/mail_transport_edit.php
+++ b/interface/web/mail/mail_transport_edit.php
@@ -38,8 +38,8 @@
 * End Form configuration
 ******************************************/
 
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
 
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
@@ -50,10 +50,10 @@
 $app->load('tform_actions');
 
 class page_action extends tform_actions {
-	
+
 	function onShowNew() {
 		global $app, $conf;
-		
+
 		// we will check only users, not admins
 		if($_SESSION["s"]["user"]["typ"] == 'user') {
 			if(!$app->tform->checkClientLimit('limit_mailrouting')) {
@@ -63,15 +63,15 @@
 				$app->error('Reseller: '.$app->tform->wordbook["limit_mailrouting_txt"]);
 			}
 		}
-		
+
 		parent::onShowNew();
 	}
-	
+
 	function onShowEnd() {
 		global $app, $conf;
-		
-		$tmp_parts = explode(":",$this->dataRecord["transport"]);
-		if(!empty($this->id) && !stristr($this->dataRecord["transport"],':')) {
+
+		$tmp_parts = explode(":", $this->dataRecord["transport"]);
+		if(!empty($this->id) && !stristr($this->dataRecord["transport"], ':')) {
 			$rec["type"] = 'custom';
 		} else {
 			if(empty($this->id) && empty($tmp_parts[0])) {
@@ -87,15 +87,15 @@
 		} else {
 			$dest = $this->dataRecord["transport"];
 		}
-		if(@substr($dest,0,1) == '[') {
+		if(@substr($dest, 0, 1) == '[') {
 			$rec["mx"] = 'checked="CHECKED"';
-			$rec["destination"] = @str_replace(']','',@str_replace('[','',$dest));
+			$rec["destination"] = @str_replace(']', '', @str_replace('[', '', $dest));
 		} else {
 			$rec["mx"] = '';
 			$rec["destination"] = @$dest;
 		}
-		
-		$types = array('smtp' => 'smtp','uucp' => 'uucp','slow' => 'slow', 'error' => 'error', 'custom' => 'custom','' => 'null');
+
+		$types = array('smtp' => 'smtp', 'uucp' => 'uucp', 'slow' => 'slow', 'error' => 'error', 'custom' => 'custom', '' => 'null');
 		$type_select = '';
 		if(is_array($types)) {
 			foreach( $types as $key => $val) {
@@ -107,7 +107,7 @@
 		$app->tpl->setVar($rec);
 		unset($type);
 		unset($types);
-		
+
 		parent::onShowEnd();
 	}
 
@@ -129,7 +129,7 @@
 
 	function onSubmit() {
 		global $app, $conf;
-				
+
 		// Check the client limits, if user is not the admin
 		if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
 			// Get the limits of the client
@@ -145,11 +145,11 @@
 				unset($tmp);
 			}
 		} // end if user is not admin
-		
+
 		//* Compose transport field
 		if($this->dataRecord["mx"] == 'y') {
-			if(stristr($this->dataRecord["destination"],':')) {
-				$tmp_parts = explode(":",$this->dataRecord["destination"]);
+			if(stristr($this->dataRecord["destination"], ':')) {
+				$tmp_parts = explode(":", $this->dataRecord["destination"]);
 				$transport = '['.$tmp_parts[0].']:'.$tmp_parts[1];
 			} else {
 				$transport = '['.$this->dataRecord["destination"].']';
@@ -157,23 +157,23 @@
 		} else {
 			$transport = $this->dataRecord["destination"];
 		}
-		
+
 		if($this->dataRecord["type"] == 'custom') {
 			$this->dataRecord["transport"] = $transport;
 		} else {
 			$this->dataRecord["transport"] = $this->dataRecord["type"].':'.$transport;
 		}
-		
+
 		unset($this->dataRecord["type"]);
 		unset($this->dataRecord["mx"]);
 		unset($this->dataRecord["destination"]);
-		
+
 		parent::onSubmit();
 	}
-	
+
 }
 
 $page = new page_action;
 $page->onLoad();
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1