Index: /trunk/web2/addons/job_monarch/jobstore.php
===================================================================
--- /trunk/web2/addons/job_monarch/jobstore.php	(revision 577)
+++ /trunk/web2/addons/job_monarch/jobstore.php	(revision 578)
@@ -4,5 +4,5 @@
 set_time_limit(0);
 
-$c			= $_POST["c"];
+$c			= $_POST['c'];
 $clustername		= $c;
 $cluster		= $c;
@@ -10,6 +10,6 @@
 // Supplied by ExtJS when DataStore has remoteSort: true
 //
-$sortfield		= isset($_POST['sort'] ) ? $_POST["sort"] : "jid";
-$sortorder		= isset($_POST['dir'] ) ? $_POST["dir"] : "ASC"; // ASC or DESC
+$sortfield		= isset($_POST['sort'] ) ? $_POST['sort'] : "jid";
+$sortorder		= isset($_POST['dir'] ) ? $_POST['dir'] : "ASC"; // ASC or DESC
 
 // Search query from ext.SearchField
@@ -47,6 +47,6 @@
 // Need to fool Ganglia here: or it won't parse XML for our cluster
 //
-$HTTP_POST_VARS["c"]	= $c;
-$_GET["c"]		= $c;
+$HTTP_POST_VARS['c']	= $c;
+$_GET['c']		= $c;
 
 global $c, $clustername, $cluster;
@@ -58,6 +58,6 @@
 
 session_start();
-unset( $_SESSION["data"] );
-$_SESSION["data"]       = &$myxml_data;
+unset( $_SESSION['data'] );
+$_SESSION['data']       = &$myxml_data;
 
 global $jobs, $metrics;
@@ -203,14 +203,14 @@
                 foreach( $jobs as $jobid => $jobattrs )
                 {
-                                $state          = $jobattrs[status];
-                                $user           = $jobattrs[owner];
-                                $queue          = $jobattrs[queue];
-                                $name           = $jobattrs[name];
-                                $req_cpu        = $jobattrs[requested_time];
-                                $req_memory     = $jobattrs[requested_memory];
-
-                                $nodes		= $jobattrs[nodes];
-
-                                $ppn            = (int) $jobattrs[ppn] ? $jobattrs[ppn] : 1;
+                                $state          = $jobattrs['status'];
+                                $user           = $jobattrs['owner'];
+                                $queue          = $jobattrs['queue'];
+                                $name           = $jobattrs['name'];
+                                $req_cpu        = $jobattrs['requested_time'];
+                                $req_memory     = $jobattrs['requested_memory'];
+
+                                $nodes		= $jobattrs['nodes'];
+
+                                $ppn            = (int) $jobattrs['ppn'] ? $jobattrs['ppn'] : 1;
 
 				if( $state == 'R' )
@@ -222,6 +222,6 @@
 					$cpus		= ((int) $nodes ) * $ppn;
 				}
-                                $queued_time    = (int) $jobattrs[queued_timestamp];
-                                $start_time     = (int) $jobattrs[start_timestamp];
+                                $queued_time    = (int) $jobattrs['queued_timestamp'];
+                                $start_time     = (int) $jobattrs['start_timestamp'];
                                 $runningtime    = $report_time - $start_time;
 
@@ -322,38 +322,38 @@
                 foreach( $jobs as $jobid => $jobattrs )
                 {
-                                $state          = $jobattrs[status];
-                                $user           = $jobattrs[owner];
-                                $jqueue          = $jobattrs[queue];
-                                $name           = $jobattrs[name];
-                                $req_cpu        = $jobattrs[requested_time];
-                                $req_memory     = $jobattrs[requested_memory];
+                                $state          = $jobattrs['status'];
+                                $user           = $jobattrs['owner'];
+                                $jqueue          = $jobattrs['queue'];
+                                $name           = $jobattrs['name'];
+                                $req_cpu        = $jobattrs['requested_time'];
+                                $req_memory     = $jobattrs['requested_memory'];
 
                                 if( $state == 'R' )
                                 {
-                                        $nodes = count( $jobattrs[nodes] );
+                                        $nodes = count( $jobattrs['nodes'] );
 
 					$mynodehosts = array();
-				        foreach( $jobattrs[nodes] as $mynode )
+				        foreach( $jobattrs['nodes'] as $mynode )
 					{
 						//if( $use_fqdn == 1)
 						//{
-						//	$mynode = $mynode.".".$jobattrs[domain];
+						//	$mynode = $mynode.".".$jobattrs['domain'];
 						//}
 						$mynodehosts[]  = $mynode;
 					}
-					$jobattrs[nodes] = $mynodehosts;
+					$jobattrs['nodes'] = $mynodehosts;
                                 }
                                 else
                                 {
-                                        $nodes = $jobattrs[nodes];
+                                        $nodes = $jobattrs['nodes'];
                                 }
 
-                                $ppn            = (int) $jobattrs[ppn] ? $jobattrs[ppn] : 1;
+                                $ppn            = (int) $jobattrs['ppn'] ? $jobattrs['ppn'] : 1;
                                 $cpus           = $nodes * $ppn;
-                                $queued_time    = (int) $jobattrs[queued_timestamp];
-                                $start_time     = (int) $jobattrs[start_timestamp];
+                                $queued_time    = (int) $jobattrs['queued_timestamp'];
+                                $start_time     = (int) $jobattrs['start_timestamp'];
                                 $runningtime    = $report_time - $start_time;
 
-				$domain		= $jobattrs[domain];
+				$domain		= $jobattrs['domain'];
 				$domain_len 	= 0 - strlen( $domain );
 
@@ -454,5 +454,5 @@
 		$nr['v']	= '0';
 
-		$cpus		= $metrics[$host]["cpu_num"]["VAL"];
+		$cpus		= $metrics[$host]['cpu_num']['VAL'];
 
 		if ( !$cpus )
@@ -461,5 +461,5 @@
 		}
 
-		$load_one	= $metrics[$host]["load_one"]["VAL"];
+		$load_one	= $metrics[$host]['load_one']['VAL'];
 		$load		= ((float) $load_one) / $cpus;
 		$load_color	= load_color($load);
@@ -532,12 +532,12 @@
 		if( $jr['status'] == 'R' )
 		{
-			$nodes 		= count( $jobs[$jobid][nodes] );
+			$nodes 		= count( $jobs[$jobid]['nodes'] );
 		}
 		else
 		{
-			$nodes 		= (int) $jobs[$jobid][nodes];
-		}
-
-		$jr['ppn']		= strval( $jobs[$jobid][ppn] ? $jobs[$jobid][ppn] : 1 );
+			$nodes 		= (int) $jobs[$jobid]['nodes'];
+		}
+
+		$jr['ppn']		= strval( $jobs[$jobid]['ppn'] ? $jobs[$jobid]['ppn'] : 1 );
 		$jr['nodect']		= strval( $nodes );
 
Index: /trunk/web2/addons/job_monarch/libtoga.php
===================================================================
--- /trunk/web2/addons/job_monarch/libtoga.php	(revision 577)
+++ /trunk/web2/addons/job_monarch/libtoga.php	(revision 578)
@@ -34,6 +34,6 @@
 		$this->restvars		= array();
 
-		$this->clustername	= $httpvars["c"] ? $httpvars["c"] : $getvars["c"];
-		$this->metricname	= $httpvars["m"] ? $httpvars["m"] : $getvars["m"];
+		$this->clustername	= $httpvars['c'] ? $httpvars['c'] : $getvars['c'];
+		$this->metricname	= $httpvars['m'] ? $httpvars['m'] : $getvars['m'];
 
 		if( count( $httpvars ) > 0 )
@@ -1233,5 +1233,5 @@
 		// determine the offset between colors
 		//
-		$step_offset = array("r" => ($background["r"] / $ds_steps), "g" => ($background["g"] / $ds_steps), "b" => ($background["b"] / $ds_steps));
+		$step_offset = array("r" => ($background['r'] / $ds_steps), "g" => ($background['g'] / $ds_steps), "b" => ($background['b'] / $ds_steps));
 
 		// calculate and allocate the needed colors
@@ -1241,9 +1241,9 @@
 		for ($i = 0; $i <= $ds_steps ; $i++)
 		{
-			$colors[$i] = imagecolorallocate($this->image, round($current_color["r"]), round($current_color["g"]), round($current_color["b"]));
-
-			$current_color["r"] -= $step_offset["r"];
-			$current_color["g"] -= $step_offset["g"];
-			$current_color["b"] -= $step_offset["b"];
+			$colors[$i] = imagecolorallocate($this->image, round($current_color['r']), round($current_color['g']), round($current_color['b']));
+
+			$current_color['r'] -= $step_offset['r'];
+			$current_color['g'] -= $step_offset['g'];
+			$current_color['b'] -= $step_offset['b'];
 		}
 
