Changeset 1312
- Timestamp:
- 12/23/07 22:29:58 (10 months ago)
- Files:
-
- trunk/wifidog-auth/CHANGELOG (modified) (1 diff)
- trunk/wifidog-auth/wifidog/classes/MainUI.php (modified) (1 diff)
- trunk/wifidog-auth/wifidog/classes/Menu.php (modified) (1 diff)
- trunk/wifidog-auth/wifidog/classes/Network.php (modified) (1 diff)
- trunk/wifidog-auth/wifidog/classes/Node.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wifidog-auth/CHANGELOG
r1310 r1312 1 1 # $Id$ 2 2007-12-23 Benoit Grégoire <bock@step.polymtl.ca> 3 * Node.php: Fix bug in setCurrentNode() reported by Vacio 4 2 5 2007-11-29 Benoit Grégoire <bock@step.polymtl.ca> 3 6 * signup.tpl, lost_username.tpl, lost_password.tpl, resend_validation.tpl: Move the error div near the button for coherence with the login page (and for the same reason). In fact it was worse than the login page used to be: the error message during signup could appear completely below the page for a user with a low resolution screeen (or big font), giving the form the apereance of doing absolutely nothing (it stumped even me as I was trying to help a user). trunk/wifidog-auth/wifidog/classes/MainUI.php
r1300 r1312 217 217 } 218 218 /** 219 * Con tructor219 * Constructor 220 220 * 221 221 * @return void trunk/wifidog-auth/wifidog/classes/Menu.php
r1307 r1312 78 78 } 79 79 /** 80 * Con tructor80 * Constructor 81 81 * 82 82 * @return void trunk/wifidog-auth/wifidog/classes/Network.php
r1311 r1312 1548 1548 // network_authenticator_params 1549 1549 $title = _("Authenticator parameters"); 1550 $help = _("The explicit parameters to be passed to the authenticator. You MUST read the con tructor documentation of your desired authenticator class (in wifidog/classes/Authenticators/) BEFORE you start playing with this. Example: 'my_network_id', '192.168.0.11', 1812, 1813, 'secret_key', 'CHAP_MD5'");1550 $help = _("The explicit parameters to be passed to the authenticator. You MUST read the constructor documentation of your desired authenticator class (in wifidog/classes/Authenticators/) BEFORE you start playing with this. Example: 'my_network_id', '192.168.0.11', 1812, 1813, 'secret_key', 'CHAP_MD5'"); 1551 1551 $data = InterfaceElements::generateInputText("network_" . $this->getId() . "_network_authenticator_params", $this->getAuthenticatorConstructorParams(), "network_network_authenticator_params_input"); 1552 1552 $html_network_authentication[] = InterfaceElements::generateAdminSectionContainer("network_network_authenticator_params", $title, $data, $help); trunk/wifidog-auth/wifidog/classes/Node.php
r1308 r1312 68 68 private $mdB; /**< An AbstractDb instance */ 69 69 private $id; 70 private static $current _node_id= null;70 private static $currentNode = null; 71 71 72 72 /** … … 117 117 { 118 118 $object = null; 119 if (self :: $current _node_id!= null && $real_node_only == false)120 { 121 $object = self ::getObject(self :: $current_node_id);119 if (self :: $currentNode != null && $real_node_only == false) 120 { 121 $object = self :: $currentNode; 122 122 } 123 123 else … … 128 128 } 129 129 130 /** Set the current node where the user is to be considered connected to. (For portal and content display purp uses, among other.131 * @param $node Node . The new current node.130 /** Set the current node where the user is to be considered connected to. (For portal and content display purposes, among other. 131 * @param $node Node object or null. The new current node. 132 132 * @return true */ 133 static function setCurrentNode(Node $node) 134 { 135 self :: $current_node_id = $node->GetId(); 133 static function setCurrentNode($node) 134 { 135 if(empty($node) || $node instanceof Node) { 136 self :: $currentNode = $node; 137 } 138 else { 139 throw new Exception(sprintf("Parameter node must be null or of class Node but is of class %s", get_class($node))); 140 } 136 141 return true; 137 142 } … … 1262 1267 require_once('classes/Stakeholder.php'); 1263 1268 $user = User::getCurrentUser(); 1264 // Get information about the network1269 // Get information about the network 1265 1270 $network = $this->getNetwork(); 1266 1271 //pretty_print_r($_REQUEST); … … 1277 1282 1278 1283 // Gateway Id 1279 $permArray = null;1284 $permArray = null; 1280 1285 $permArray[]=array(Permission::P('NETWORK_PERM_EDIT_ANY_NODE_CONFIG'), $network); 1281 1286 $permArray[]=array(Permission::P('NODE_PERM_EDIT_GATEWAY_ID'), $this); … … 1616 1621 'title' => _("Edit nodes"), 1617 1622 'url' => BASE_URL_PATH.htmlspecialchars("admin/generic_object_admin.php?object_class=Node&action=list") 1618 );1623 ); 1619 1624 } 1620 1625 else if($nodes = Security::getObjectsWithPermission(Permission::P('NODE_PERM_EDIT_CONFIG'))) {
