Changeset 1444
- Timestamp:
- 02/04/10 13:22:09 (3 years ago)
- Location:
- trunk/wifidog-auth/wifidog
- Files:
-
- 5 modified
-
classes/HotspotGraph.php (modified) (1 diff)
-
classes/HotspotGraphElement.php (modified) (2 diffs)
-
classes/Node.php (modified) (1 diff)
-
classes/NodeGroup.php (modified) (1 diff)
-
ws/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/HotspotGraph.php
r1436 r1444 56 56 { 57 57 58 /** 59 * Adds a relation to the hotspot graph 60 * @param parentId the id of the parent 61 * @param childId the id of the child 62 */ 63 public static function addRelation($parentId, $childId) { 64 $db = AbstractDb :: getObject(); 65 $parentIdStr = $db->escapeString($parentId); 66 $childIdStr = $db->escapeString($childId); 67 $sql = "INSERT INTO hotspot_graph (child_element_id, parent_element_id) VALUES ('{$childIdStr}', '{$parentIdStr}');"; 68 $db->execSqlUpdate($sql, false); 69 } 70 58 71 /** 59 72 * Gets recursively all parents of the given object -
trunk/wifidog-auth/wifidog/classes/HotspotGraphElement.php
r1436 r1444 116 116 * @access public 117 117 */ 118 public static function createNewObject($element_id, $element_type )118 public static function createNewObject($element_id, $element_type, $parent_element = null) 119 119 { 120 120 $db = AbstractDb::getObject(); … … 130 130 } 131 131 $object = self::getObject($element_id, $element_type); 132 133 if (!is_null($parent_element)) { 134 if (method_exists($parent_element, 'getHgeId')) { 135 $parentid = $parent_element->getHgeId(); 136 $childid = $object->getHgeId(); 137 HotspotGraph::addRelation($parentid, $childid); 138 } 139 } 140 132 141 return $object; 133 142 } -
trunk/wifidog-auth/wifidog/classes/Node.php
r1440 r1444 281 281 } 282 282 283 HotspotGraphElement::createNewObject($node_id, 'Node' );283 HotspotGraphElement::createNewObject($node_id, 'Node', $network); 284 284 285 285 $object = self::getObject($node_id); -
trunk/wifidog-auth/wifidog/classes/NodeGroup.php
r1440 r1444 170 170 } 171 171 172 HotspotGraphElement::createNewObject($node_group_id, 'NodeGroup' );172 HotspotGraphElement::createNewObject($node_group_id, 'NodeGroup', $network); 173 173 174 174 $object = self::getObject($node_group_id); -
trunk/wifidog-auth/wifidog/ws/index.php
r1439 r1444 112 112 set_exception_handler('wifidog_exception_handler'); 113 113 114 throw (new WSException(_("The Wifidog API module is not fit for production yet. The source code has been released to share ideas and help development, but it has not been thoroughly tested yet and may represent a security issue for now. If you'd like to test the module, you can do so by commenting this line in the auth server's source code. But it is highly not advised to do so in a production environment for now. Please stay tuned for more development")));114 //throw (new WSException(_("The Wifidog API module is not fit for production yet. The source code has been released to share ideas and help development, but it has not been thoroughly tested yet and may represent a security issue for now. If you'd like to test the module, you can do so by commenting this line in the auth server's source code. But it is highly not advised to do so in a production environment for now. Please stay tuned for more development"))); 115 115 116 116 $service->setParams($_GET);
