constructors are named __construct for php8
[plewww.git] / planetlab / includes / plc_peers.php
index 468fda7..a4a4dda 100644 (file)
@@ -9,8 +9,8 @@ drupal_set_html_head('<link href="/planetlab/css/plc_peers.css" rel="stylesheet"
 // all known peers hashed on peer_id
 class Peers {
   var $hash;
-  
-  function Peers ($api) {
+
+  function __construct ($api) {
     $hash=array();
     // fake entry fot the local myplc
     $local_fake_peer = array ('peername' => PLC_NAME,
@@ -96,12 +96,12 @@ class Peers {
   }
 
   // writes a cell in the table with the peer's shortname, link to the peer page, 
-  // and classname set for proper background
+  // and classname set for proper color
   function cell ($table, $peer_id) {
-    $shortname = $this->shortname($peer_id);
-    $table->cell ($this->link($peer_id,$shortname),array('class'=>'peer-'.strtolower($shortname)));
+    $shortname=$this->shortname($peer_id);
+    $table->cell ($this->link($peer_id,$shortname),
+                 array('class'=>$this->classname($peer_id)));
   }
-    
   
 }
 
@@ -110,7 +110,7 @@ class PeerScope {
   var $filter;
   var $label;
 
-  function PeerScope ($api, $peerscope) {
+  function __construct ($api, $peerscope) {
     switch ($peerscope) {
     case '':
       $this->filter=array();