Setting tag plewww-5.2-4
[plewww.git] / planetlab / tags / tag_action.php
index 170db85..9084451 100644 (file)
@@ -16,13 +16,16 @@ include 'plc_header.php';
 
 // Common functions
 require_once 'plc_functions.php';
-require_once 'plc_sorts.php';
 
 // find person roles
 $_person= $plc->person;
 $_roles= $_person['role_ids'];
 
 
+drupal_set_message ("xxx tag_action.php is deprecated - use planetlab/actions.php instead");
+return;
+
+
 // TAGS -------------------------------------------------
 
 // tag deletion
@@ -37,15 +40,13 @@ if( $_GET['rem_id'] ) {
   // delete the tag
   $api->DeleteSliceTag( $tag_id );
 
-
-  header( "location: index.php?id=$slice_id" );
-  exit();
+  plc_redirect( "index.php?id=$slice_id" );
 }
 
 
 // tag updates
 if( $_POST['edit_tag'] ) {
-  // get the id of the tag to update and teh value from POST
+  // get the id of the tag to update and the value from POST
   $tag_id= intval( $_POST['tag_id'] );
   $value= $_POST['value'];
   $slice_id= $_POST['slice_id'];
@@ -53,8 +54,7 @@ if( $_POST['edit_tag'] ) {
   // update it!
   $api->UpdateSliceTag( $tag_id, $value );
 
-  header( "location: index.php?id=$slice_id" );
-  exit();
+  plc_redirect( "index.php?id=$slice_id" );
 }
 
 
@@ -68,8 +68,7 @@ if( $_POST['add_tag'] ) {
   // add it!
   $api->AddSliceTag( $slice_id, $tag_type_id, $value );
 
-  header( "location: index.php?id=$slice_id" );
-  exit();
+  plc_redirect( "index.php?id=$slice_id" );
 }
 
 // TAG TYPES ---------------------------------------------------
@@ -90,8 +89,7 @@ if( $_POST['add_type'] ) {
   // add it!!
   $api->AddTagType( $tag_type_fields );
 
-  header( "location: tags.php?type=slice" );
-  exit();
+  plc_redirect( "tags.php?type=slice" );
 }
   
 
@@ -109,25 +107,10 @@ if( $_POST['edit_type'] ) {
   // Update it!
   $api->UpdateTagType( $tag_type_id, $tag_type_fields );
   
-  header( "location: tags.php?type=slice" );
-  exit();
+  plc_redirect( "tags.php?type=slice" );
 }
 
 
-// delete tag types
-if( $_GET['del_type'] ) {
-  // get vars
-  $type_id= intval( $_GET['del_type'] );
-
-  // delete it!
-  $api->DeleteTagType( $type_id );
-  
-  header( "location: tags.php?type=slice" );
-  exit();
-}
-
-  
-  
 /*
 // Print footer
 include 'plc_footer.php';