Changeset 12720

Show
Ignore:
Timestamp:
10/09/07 15:43:37 (1 year ago)
Author:
juhana
Message:

Some bug fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/data/midgard_admin_sitewizard_creator_host.php

    r12690 r12720  
    3535    } 
    3636     
    37     public function initialize($sitegroup_guid) 
     37    public function initialize($sitegroup_id) 
    3838    { 
    3939        $this->verbose('Initializing host creation'); 
     
    4141        if (!is_object($this->sitegroup)) 
    4242        {         
    43             if (!$this->sitegroup = mgd_get_sitegroup(/*$sitegroup_guid*/ 1) /*new midgard_sitegroup()*/
     43            if (!$this->sitegroup = mgd_get_sitegroup($sitegroup_id)
    4444            { 
    4545                throw new midgard_admin_sitewizard_exception("Sitewizard couldn't initialize sitegroup object. 
     
    8181        { 
    8282            $this->host->prefix = $this->host_prefix; 
    83             //print_r($this->host); 
    8483            if (!$this->host->update()) 
    8584            { 
     
    191190    { 
    192191        return $this->sitegroup; 
     192    } 
     193     
     194    public function get_root_page() 
     195    { 
     196        return $this->root_page; 
    193197    } 
    194198     
     
    225229                $this->verbose("Sitewizard created host successfully."); 
    226230                 
    227                 //return $this->creation_root_topic->guid; 
     231                return $this->host->guid; 
    228232        } 
    229233            catch(midgard_admin_sitewizard_exception $e) 
  • trunk/midgard/data/midgard_admin_sitewizard_creator_structure.php

    r12690 r12720  
    6666                $this->verbose("Getting sitegroup of host GUID: " . $this->host->guid); 
    6767                $sitegroup_id = $this->host->sitegroup; 
    68 /* 
    69         $this->sitegroup = new midgard_sitegroup(); 
    70         $this->sitegroup->get_by_id($sitegroup_id); 
    71 */ 
     68 
    7269                $this->sitegroup = mgd_get_sitegroup($sitegroup_id); 
    7370 
     
    360357            if (isset($node['nodes']) && count($node['nodes']) > 0) 
    361358            { 
    362                 $this->create_topic_structure_recursive($node['nodes']); 
     359                $this->create_topic_structure_recursive($node['nodes'], $topic); 
    363360            } 
    364361        } 
     
    447444            $this->creation_root_topic->up = 0; 
    448445            $this->creation_root_topic->sitegroup = $this->sitegroup->id; 
    449             $this->creation_root_topic->extra = $this->structure['root']['title'];  
    450             $this->creation_root_topic->name = $this->structure['root']['name']
     446            $this->creation_root_topic->extra = $this->replace($this->structure['root']['title']);  
     447            $this->creation_root_topic->name = $this->replace($this->structure['root']['name'])
    451448             
    452449            if (isset($node['root']['style']) && !empty($node['root']['style'])) 
     
    627624                { 
    628625                    $this->host = $this->parent_link->get_host(); 
     626                    $this->sitegroup = $this->parent_link->get_sitegroup(); 
     627                    $this->root_page = $this->parent_link->get_root_page(); 
    629628                }        
    630629            }