Changeset 765 for branches/0.4/web


Ignore:
Timestamp:
03/28/13 12:21:53 (11 years ago)
Author:
ramonb
Message:
Location:
branches/0.4/web/addons/job_monarch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/web/addons/job_monarch/image.php

    r718 r765  
    3535    session_start();
    3636
    37     if( isset( $_SESSION["data"] ) ) {
     37    if( isset( $_SESSION["data"] ) )
     38    {
    3839        $myxml_data    = &$_SESSION["data"];
    39     } else {
    40         $myxml_data    = 0;
     40    }
     41    else
     42    {
     43        $myxml_data    = null;
    4144    }
    4245
    43     if( !$myxml_data ) {
     46    if( $myxml_data == null )
     47    {
    4448        $ds             = new DataSource();
    4549        $myxml_data     = $ds->getData();
    46 
    4750    }
    4851    return $myxml_data;
  • branches/0.4/web/addons/job_monarch/libtoga.php

    r764 r765  
    13621362    function ClusterImage( $data, $clustername )
    13631363    {
    1364         $this->dataget        = new DataGatherer( $clustername );
    1365         $this->data        = $data;
    1366         $this->clustername    = $clustername;
    1367         $this->filters        = array();
    1368         $this->size        = 's';
     1364        $this->dataget      = new DataGatherer( $clustername );
     1365        $this->data         = $data;
     1366        $this->clustername  = $clustername;
     1367        $this->filters      = array();
     1368        $this->size         = 's';
    13691369        $this->width        = 0;
    1370         $this->height        = 0;
    1371         $this->output        = 1;
     1370        $this->height       = 0;
     1371        $this->output       = 1;
    13721372        $this->jobs         = null;
    13731373        $this->nodes        = null;
     1374        $this->parsed       = false;
    13741375    }
    13751376
     
    13941395        $this->output    = 0;
    13951396    }
     1397    function checkParse()
     1398    {
     1399        if( $this->parsed == false )
     1400        {
     1401            $this->dataget->parseXML( $this->data );
     1402            $this->parsed = true;
     1403        }
     1404    }
    13961405    function getJobs()
    13971406    {
    13981407        if( $this->jobs == null )
    13991408        {
     1409            $this->checkParse();
    14001410            $mydatag = $this->dataget;
    1401             $mydatag->parseXML( $this->data );
    14021411            $this->jobs = $mydatag->getJobs();
    14031412        }
     
    14131422        if( $this->nodes== null )
    14141423        {
     1424            $this->checkParse();
    14151425            $mydatag = $this->dataget;
    1416             $mydatag->parseXML( $this->data );
    14171426            $this->nodes = $mydatag->getNodes();
    14181427        }
Note: See TracChangeset for help on using the changeset viewer.