Changeset 1435 for trunk/wifidog-auth/wifidog/classes/Network.php
- Timestamp:
- 12/09/09 17:08:25 (3 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/classes/Network.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/Network.php
r1428 r1435 55 55 require_once('classes/ThemePack.php'); 56 56 require_once('classes/Security.php'); 57 require_once('classes/HotspotGraphElement.php'); 57 58 58 59 /** … … 71 72 /** Object cache for the object factory (getObject())*/ 72 73 private static $instanceArray = array(); 74 protected $_hotspotGraphElement; 73 75 74 76 /** … … 201 203 throw new Exception(_('Unable to insert the new network in the database!')); 202 204 } 205 206 HotspotGraphElement::createNewObject($network_id, 'Network'); 207 203 208 $object = self::getObject($network_id); 204 209 require_once('classes/Stakeholder.php'); … … 378 383 { 379 384 $db = AbstractDb::getObject(); 385 if ($p_network_id == "") 386 $p_network_id = self::getDefaultNetwork()->getId(); 380 387 $network_id_str = $db->escapeString($p_network_id); 381 if ($network_id_str == "")382 $network_id_str = $db->escapeString(self::getDefaultNetwork()->getId());383 388 384 389 $sql = "SELECT *, EXTRACT(EPOCH FROM validation_grace_time) as validation_grace_time_seconds FROM networks WHERE network_id='$network_id_str'"; … … 390 395 $this->_row = $row; 391 396 $this->_id = $p_network_id; 397 $this->_hotspotGraphElement = HotspotGraphElement::getObject($this->_id,'Network'); 392 398 } 393 399 … … 1696 1702 * Content management 1697 1703 */ 1698 $title = _("Network content");1704 /* $title = _("Network content"); 1699 1705 $name = "network_".$this->_id."_content"; 1700 1706 $data = Content::getLinkedContentUI($name, "network_has_content", "network_id", $this->_id, $display_page = "portal"); 1701 $html .= InterfaceElements::generateAdminSectionContainer("network_content", $title, $data); 1707 $html .= InterfaceElements::generateAdminSectionContainer("network_content", $title, $data);*/ 1708 if (!is_null($this->_hotspotGraphElement)) 1709 $html .= $this->_hotspotGraphElement->getContentAdminUI(); 1702 1710 1703 1711 /* … … 1927 1935 $data = ProfileTemplate::getLinkedProfileTemplateUI($name, "network_has_profile_templates", "network_id", $this->_id); 1928 1936 $html .= InterfaceElements::generateAdminSectionContainer("network_profile_templates", $title, $data); 1937 1938 // objects hierarchy 1939 if (!is_null($this->_hotspotGraphElement)) 1940 $html .= $this->_hotspotGraphElement->getGraphAdminUI($this); 1929 1941 1930 1942 $html .= "</ul>\n"; … … 1946 1958 1947 1959 // Content management 1948 $name = "network_".$this->_id."_content"; 1949 Content :: processLinkedContentUI($name, 'network_has_content', 'network_id', $this->_id); 1960 if (!is_null($this->_hotspotGraphElement)) 1961 $this->_hotspotGraphElement->processContentAdminUI(); 1962 /* $name = "network_".$this->_id."_content"; 1963 Content :: processLinkedContentUI($name, 'network_has_content', 'network_id', $this->_id);*/ 1950 1964 1951 1965 // name … … 2064 2078 $name = "network_".$this->_id."_profile_templates"; 2065 2079 ProfileTemplate :: processLinkedProfileTemplateUI($name, 'network_has_profile_templates', 'network_id', $this->_id); 2080 2081 if (!is_null($this->_hotspotGraphElement)) 2082 $this->_hotspotGraphElement->processGraphAdminUI($errMsg, $this); 2083 if(!empty($errMsg)) { 2084 echo $errMsg; 2085 $errMsg = null; 2086 } 2066 2087 2067 2088 // Node creation
