Changeset 566 for trunk/wifidog-auth/wifidog/classes/Node.php
- Timestamp:
- 04/25/05 09:16:07 (8 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog-auth/wifidog/classes/Node.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/wifidog/classes/Node.php
r555 r566 57 57 else 58 58 { 59 $object = getCurrentRealNode();59 $object = self::getCurrentRealNode(); 60 60 } 61 61 return $object; … … 74 74 * @param * @return a Node object, or null if it can't be found. 75 75 */ 76 public function getCurrentRealNode()76 public static function getCurrentRealNode() 77 77 { 78 78 global $db; … … 484 484 } 485 485 486 /** The list of users online at this node 487 * @return An array of User object, or en empty array */ 486 488 function getOnlineUsers() 487 489 { 488 490 global $db; 489 490 $db->ExecSql("SELECT users.user_id, users.username, users.account_origin FROM users,connections WHERE connections.token_status='".TOKEN_INUSE."' AND users.user_id=connections.user_id AND connections.node_id='{$this->id}'", $users, false); 491 $retval=array(); 492 $db->ExecSql("SELECT users.user_id FROM users,connections WHERE connections.token_status='".TOKEN_INUSE."' AND users.user_id=connections.user_id AND connections.node_id='{$this->id}'", $users, false); 493 if($users!=null) 494 { 495 foreach ($users as $user_row) 496 { 497 $retval[]=getObject($user_row['user_id']); 498 } 499 } 491 500 return $users; 492 501 } … … 548 557 } 549 558 559 /** Warning, the semantics of this function will change */ 550 560 public static function getAllOnlineUsers() 551 561 {
