Changeset 12720
- Timestamp:
- 10/09/07 15:43:37 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/data/midgard_admin_sitewizard_creator_host.php
r12690 r12720 35 35 } 36 36 37 public function initialize($sitegroup_ guid)37 public function initialize($sitegroup_id) 38 38 { 39 39 $this->verbose('Initializing host creation'); … … 41 41 if (!is_object($this->sitegroup)) 42 42 { 43 if (!$this->sitegroup = mgd_get_sitegroup( /*$sitegroup_guid*/ 1) /*new midgard_sitegroup()*/)43 if (!$this->sitegroup = mgd_get_sitegroup($sitegroup_id)) 44 44 { 45 45 throw new midgard_admin_sitewizard_exception("Sitewizard couldn't initialize sitegroup object. … … 81 81 { 82 82 $this->host->prefix = $this->host_prefix; 83 //print_r($this->host);84 83 if (!$this->host->update()) 85 84 { … … 191 190 { 192 191 return $this->sitegroup; 192 } 193 194 public function get_root_page() 195 { 196 return $this->root_page; 193 197 } 194 198 … … 225 229 $this->verbose("Sitewizard created host successfully."); 226 230 227 //return $this->creation_root_topic->guid;231 return $this->host->guid; 228 232 } 229 233 catch(midgard_admin_sitewizard_exception $e) trunk/midgard/data/midgard_admin_sitewizard_creator_structure.php
r12690 r12720 66 66 $this->verbose("Getting sitegroup of host GUID: " . $this->host->guid); 67 67 $sitegroup_id = $this->host->sitegroup; 68 /* 69 $this->sitegroup = new midgard_sitegroup(); 70 $this->sitegroup->get_by_id($sitegroup_id); 71 */ 68 72 69 $this->sitegroup = mgd_get_sitegroup($sitegroup_id); 73 70 … … 360 357 if (isset($node['nodes']) && count($node['nodes']) > 0) 361 358 { 362 $this->create_topic_structure_recursive($node['nodes'] );359 $this->create_topic_structure_recursive($node['nodes'], $topic); 363 360 } 364 361 } … … 447 444 $this->creation_root_topic->up = 0; 448 445 $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']); 451 448 452 449 if (isset($node['root']['style']) && !empty($node['root']['style'])) … … 627 624 { 628 625 $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(); 629 628 } 630 629 }
