None is equal to zero for php. use === operator to check the type
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Tue, 20 Oct 2009 08:23:09 +0000 (08:23 +0000)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Tue, 20 Oct 2009 08:23:09 +0000 (08:23 +0000)
planetlab/sites/join_request.php
planetlab/sites/site.php
planetlab/sites/sites.php

index ce7b309..815c328 100644 (file)
@@ -68,7 +68,7 @@ function render_join_request_review($api, $site_id) {
       return;
   }
   $site = $sites[0];
-  if ($site['enabled'] && $site['ext_consortium_id'] == $PENDING_CONSORTIUM_ID) {
+  if ($site['enabled'] && $site['ext_consortium_id'] === $PENDING_CONSORTIUM_ID) {
     print("<p class='plc-warning'> This site is already enabled </p>");
     return;
   }
index 807479d..d80dc5f 100644 (file)
@@ -155,7 +155,7 @@ $peers->block_start ($peer_id);
 if ( $local_peer ) {
   // pending site
   global $PENDING_CONSORTIUM_ID;
-  if ( $ext_consortium_id == $PENDING_CONSORTIUM_ID) {
+  if ( $ext_consortium_id === $PENDING_CONSORTIUM_ID) {
     if ( ! $enabled ) 
       plc_warning ("This site is under pending registration - Please visit " . 
                   href (l_sites_pending(),"this page") . 
index 8eb5a03..9b188b9 100644 (file)
@@ -51,7 +51,7 @@ function site_status ($site) {
     if ( ! $site['enabled']) 
       $messages [] = "Not enabled";
     global $PENDING_CONSORTIUM_ID;
-    if ( $site['ext_consortium_id'] == $PENDING_CONSORTIUM_ID )
+    if ( $site['ext_consortium_id'] === $PENDING_CONSORTIUM_ID )
       $messages [] = "Pending registration";
   
     // check that site has at least a PI and a tech