function api_keys_undelete(&$key) { $update = array('deleted' => 0); return api_keys_update($key, $update); }
$ok = 0; } } if ($ok) { if ($title != $key_row['app_title']) { $update['app_title'] = $title; } if ($description != $key_row['app_description']) { $update['app_description'] = $description; } if ($callback != $key_row['app_callback']) { $update['app_callback'] = $callback; } if (count($update)) { $GLOBALS['smarty']->assign("do_update", 1); $rsp = api_keys_update($key_row, $update); if ($rsp['ok']) { $GLOBALS['smarty']->assign("update_ok", 1); $key_row = $rsp['key']; } else { $GLOBALS['smarty']->assign("update_ok", 0); $GLOBALS['smarty']->assign("error", $rsp['error']); } } } } else { } } $GLOBALS['smarty']->assign_by_ref("key", $key_row); if ($token_row = api_oauth2_access_tokens_get_for_user_and_key($GLOBALS['cfg']['user'], $key_row)) { $GLOBALS['smarty']->assign_by_ref("self_token", $token_row);