Changeset 178
- Timestamp:
- 12/29/06 00:45:37 (2 years ago)
- Files:
-
- wifidog/wifidog-auth/wifidog/classes/Node.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wifidog/wifidog-auth/wifidog/classes/Node.php
r40 r178 500 500 } 501 501 502 /** Set Network for a node 503 * 504 */ 505 public function setNetwork($n) 506 { 507 $n = $this->mDb->escapeString($n); 508 $retval = $this->mDb->execSqlUpdate("UPDATE nodes SET network_id = '{$n}' WHERE node_id = '{$this->getId()}'"); 509 $this->refresh(); 510 } 511 502 512 /** Get a GisPoint object ; altide is not supported yet 503 513 */ … … 816 826 $network = $this->getNetwork(); 817 827 818 // Check if user is a admin 828 // Check if user is a admin or an owner 819 829 $_userIsAdmin = User::getCurrentUser()->isSuperAdmin(); 830 $_userIsOwner = User::getCurrentUser()->isOwner(); 820 831 821 832 /* … … 1003 1014 } 1004 1015 1016 // Network Selection (added by PR) 1017 $_title = _("Network"); 1018 $_data = Network::getSelectNetworkUI("node_" . $this->getId() . "_network", $this->getNetwork()); 1019 $_html_node_config[] = InterfaceElements::generateAdminSectionContainer("node_network", $_title, $_data); 1020 1021 1005 1022 // Build section 1006 1023 $html .= InterfaceElements::generateAdminSectionContainer("node_config", _("Node configuration"), implode(null, $_html_node_config)); … … 1066 1083 1067 1084 1068 // Check if user is a admin 1085 // Check if user is a admin or an owner 1069 1086 $_userIsAdmin = User::getCurrentUser()->isSuperAdmin(); 1087 $_userIsOwner = User::getCurrentUser()->isOwner(); 1070 1088 1071 1089 // Information about the node … … 1077 1095 Content::processLinkedContentUI($name, 'node_has_content', 'node_id', $this->id); 1078 1096 1079 // Name 1080 if ($_userIsAdmin ) {1097 // Name (to change for node owner) 1098 if ($_userIsAdmin || $_userIsOwner) { 1081 1099 $name = "node_".$hashed_node_id."_name"; 1082 1100 $this->setName($_REQUEST[$name]); … … 1178 1196 1179 1197 // Node configuration section 1180 1181 1198 $network = $this->getNetwork(); 1199 1200 $name = "node_{$this->id}_network"; 1201 $this->setNetwork($_REQUEST[$name]); 1182 1202 1183 1203 // Deployment status
