brute-force changed access to $_GET['key'] to use get_array instead
[plewww.git] / planetlab / persons / person.php
old mode 100755 (executable)
new mode 100644 (file)
index 5a2a9db..24e5cfb
@@ -22,7 +22,7 @@ require_once 'toggle.php';
 
 // -------------------- 
 // recognized URL arguments
-$person_id=intval($_GET['id']);
+$person_id=intval(get_array($_GET, 'id'));
 if ( ! $person_id ) { 
   plc_error('Malformed URL - id not set'); 
   return;
@@ -67,7 +67,11 @@ if ($site_ids) {
 } else {
        $sites = array();
 }
-$slices= $api->GetSlices( $slice_ids, array( "slice_id", "name" ) );
+if ($slice_ids) {
+       $slices= $api->GetSlices( $slice_ids, array( "slice_id", "name" ) );
+} else {
+       $slices = array();
+}
 $keys= $api->GetKeys( $key_ids );
 
 drupal_set_title("Details for account " . $first_name . " " . $last_name);