From 6880e367d948b36d412dba8deef4a645da3247d3 Mon Sep 17 00:00:00 2001
From: Gulacsi Tamas <tgulacsi@websrv.unosoft.dmz>
Date: Fri, 10 Sep 2010 10:58:20 +0200
Subject: [PATCH] fix graphiz_api indentation and syntax error


diff --git a/core/graphviz_api.php b/core/graphviz_api.php
old mode 100644
new mode 100755
index 125cbff..b10aed1
--- a/core/graphviz_api.php
+++ b/core/graphviz_api.php
@@ -338,33 +338,32 @@ class Graph {
 			2 => array( 'file', 'php://stderr', 'w', ),
 			);
 
-			$t_pipes = array();
-			$t_proccess = proc_open( $t_command, $t_descriptors, $t_pipes );
-
-			if( is_resource( $t_proccess ) ) {
-				# Filter generated output through dot
-				fwrite( $t_pipes[0], $t_dot_source );
-				fclose( $t_pipes[0] );
-
-				if( $p_headers ) {
-					# Headers were requested, use another output buffer to
-					# retrieve the size for Content-Length.
-					ob_start();
-					while( !feof( $t_pipes[1] ) ) {
-						echo fgets( $t_pipes[1], 1024 );
-					}
-					header( 'Content-Length: ' . ob_get_length() );
-					ob_end_flush();
-				} else {
-					# No need for headers, send output directly.
-					while( !feof( $t_pipes[1] ) ) {
-						print( fgets( $t_pipes[1], 1024 ) );
-					}
+		$t_pipes = array();
+		$t_proccess = proc_open( $t_command, $t_descriptors, $t_pipes );
+
+		if( is_resource( $t_proccess ) ) {
+			# Filter generated output through dot
+			fwrite( $t_pipes[0], $t_dot_source );
+			fclose( $t_pipes[0] );
+
+			if( $p_headers ) {
+				# Headers were requested, use another output buffer to
+				# retrieve the size for Content-Length.
+				ob_start();
+				while( !feof( $t_pipes[1] ) ) {
+					echo fgets( $t_pipes[1], 1024 );
+				}
+				header( 'Content-Length: ' . ob_get_length() );
+				ob_end_flush();
+			} else {
+				# No need for headers, send output directly.
+				while( !feof( $t_pipes[1] ) ) {
+					print( fgets( $t_pipes[1], 1024 ) );
 				}
-
-				fclose( $t_pipes[1] );
-				proc_close( $t_proccess );
 			}
+
+			fclose( $t_pipes[1] );
+			proc_close( $t_proccess );
 		}
 	}
 
-- 
1.5.4.3

