add an admin option to update the site:enabled field on the site view page.
[plewww.git] / planetlab / common / actions.php
index 1d47ac9..c05d0b0 100644 (file)
@@ -184,7 +184,7 @@ switch ($action) {
 
  case 'become-person' : {
    $plc->BecomePerson (intval($person_id));
-   plc_redirect (l_persons());
+   plc_redirect (l_person(intval($person_id)));
  }
 
  case 'delete-person' : {
@@ -434,6 +434,9 @@ switch ($action) {
      $fields['login_base'] = $_POST['login_base'];
    if ($_POST['max_slices']) 
      $fields['max_slices'] = intval($_POST['max_slices']);
+   if (isset($_POST['enabled'])) {
+     $fields['enabled'] = (bool)$_POST['enabled'];
+   }
    
    $retcod=$api->UpdateSite( intval( $site_id ), $fields );
    if ($retcod == 1)