Show
Ignore:
Timestamp:
02/04/10 13:22:09 (2 years ago)
Author:
gbastien
Message:

* Bug fix: when creating new nodes and node groups, they are now automatically added as children of the network in the new hierarchy structure.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/HotspotGraph.php

    r1436 r1444  
    5656{ 
    5757 
     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     
    5871    /** 
    5972     * Gets recursively all parents of the given object