Exemple #1
0
 /**
  * Saves site-specific attributes.
  *
  * @internal Site attributes are saved in the sites_entity table.
  *
  * @return bool
  */
 public function save()
 {
     global $CONFIG;
     // Save generic stuff
     if (!parent::save()) {
         return false;
     }
     // make sure the site guid is set (if not, set to self)
     if (!$this->get('site_guid')) {
         $guid = $this->get('guid');
         update_data("UPDATE {$CONFIG->dbprefix}entities SET site_guid={$guid}\n\t\t\t\tWHERE guid={$guid}");
     }
     // Now save specific stuff
     return create_site_entity($this->get('guid'), $this->get('name'), $this->get('description'), $this->get('url'));
 }
Exemple #2
0
 /**
  * Saves site-specific attributes.
  *
  * @internal Site attributes are saved in the sites_entity table.
  *
  * @return bool
  */
 public function save()
 {
     // Save generic stuff
     if (!parent::save()) {
         return false;
     }
     // Now save specific stuff
     return create_site_entity($this->get('guid'), $this->get('name'), $this->get('description'), $this->get('url'));
 }