From 2f36b2e4fb8124384ede1e7fd23ba9ef56b747ed Mon Sep 17 00:00:00 2001 From: disc5 Date: Tue, 10 Nov 2015 15:00:29 +0100 Subject: [PATCH] Client description field added --- .../REST/RESTController/core/clients/models/Clients.php | 4 +++- .../REST/RESTController/core/clients/routes/Clients.php | 1 + .../UIComponent/UserInterfaceHook/REST/sql/dbupdate.php | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/models/Clients.php b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/models/Clients.php index 972aa3c7..4d40e6de 100644 --- a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/models/Clients.php +++ b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/models/Clients.php @@ -286,6 +286,7 @@ public static function createClient( $oauth2_gt_client_user, $access_user_csv, $ip_restriction_active, + $description, $access_ip_csv, $oauth2_authcode_refresh_active, $oauth2_resource_refresh_active @@ -306,7 +307,8 @@ public static function createClient( 'oauth2_consent_message_active' => array('integer', $oauth2_consent_message_active), 'oauth2_authcode_refresh_active' => array('integer', $oauth2_authcode_refresh_active), 'oauth2_resource_refresh_active' => array('integer', $oauth2_resource_refresh_active), - 'ip_restriction_active' => array('integer', $ip_restriction_active) + 'ip_restriction_active' => array('integer', $ip_restriction_active), + 'description' => array('text', $description) ); self::getDB()->insert('ui_uihk_rest_keys', $a_columns); $insertId = intval(self::getDB()->getLastInsertId()); diff --git a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/routes/Clients.php b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/routes/Clients.php index 21dfa9bf..40964428 100644 --- a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/routes/Clients.php +++ b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController/core/clients/routes/Clients.php @@ -140,6 +140,7 @@ 'oauth2_authcode_refresh_active', 'oauth2_resource_refresh_active', 'ip_restriction_active', + 'description', 'access_user_csv', 'access_ip_csv', 'api_secret', diff --git a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/sql/dbupdate.php b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/sql/dbupdate.php index 211033ab..89b5176d 100755 --- a/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/sql/dbupdate.php +++ b/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/sql/dbupdate.php @@ -135,6 +135,13 @@ 'notnull' => true, 'default' => 0 ), + 'description' => array( + 'type' => 'text', + 'length' => 1000, + 'fixed' => false, + 'notnull' => false, + 'default' => "" + ), ); $ilDB->createTable("ui_uihk_rest_keys", $fields, true); $ilDB->addPrimaryKey("ui_uihk_rest_keys", array("id"));