brute-force changed access to $_GET['key'] to use get_array instead
[plewww.git] / planetlab / sites / delete_site.php
index 22de21c..88eb351 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-// $Id: delete_site.php 353 2007-05-14 09:36:49Z thierry $
+// $Id$
 //
 
 // Require login
@@ -11,7 +11,6 @@ global $plc, $api;
 
 // Common functions
 require_once 'plc_functions.php';
-require_once 'plc_sorts.php';
 
 // Print header
 require_once 'plc_drupal.php';
@@ -24,10 +23,8 @@ $_roles= $_person['role_ids'];
 
 
 // if no id redirect
-if( !$_GET['id'] ) {
-  header( "location: index.php" );
-  exit();
- }
+if( !get_array($_GET, 'id') ) 
+  plc_redirect (l_sites());
 
 // set the site_id
 $site_id= $_GET['id'];