Skip to content

Commit

Permalink
fixed bugs introducted by refactoring in 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufschmidt committed Nov 10, 2016
1 parent 375a3f1 commit 909606e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions RESTController/RESTController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct($iliasRoot, array $userSettings = array()) {

// Fetch environment and remeber base-directory (just in case)
$env = $this->environment();
$env['ilias_root'] = $root;
$env['ilias_root'] = $iliasRoot;
$env['ctl_root'] = __DIR__;
// Alternatively set as hard-coded path: "$root/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST/RESTController"

Expand Down Expand Up @@ -392,10 +392,11 @@ protected function initResponseFormat() {
* by the restplugin.php
*/
protected function initILIAS() {
// Initialize ILIAS (if not created via restplugin.php)
// Initialize ILIAS (if not created via api.php)
if (!defined('CLIENT_ID')) {
// Fetch request object
$request = $this->request();
$client = null;

// Try to fetch ilias-client from access-token
try {
Expand Down
2 changes: 1 addition & 1 deletion RESTController/libs/RESTilias.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected static function getIniHost() {
* It does some extra-work to make sure ILIAS does not get any wrong idea
* when having 'unpredicted' values in $_SERVER array.
*/
public static function initILIAS($client) {
public static function initILIAS($client = null) {
// Apply oAuth2 fix for client_id GET/POST value
self::applyOAuth2Fix($client);

Expand Down
18 changes: 12 additions & 6 deletions sql/dbupdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,28 @@ function gen_uuid() {
'default' => -1
),
'grant_client_credentials' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'grant_authorization_code' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'grant_implicit' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'grant_resource_owner' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'refresh_authorization_code' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'refresh_resource_owner' => array(
'type' => 'integer'
'type' => 'integer',
'length' => 1
),
'grant_bridge' => array(
'type' => 'text',
Expand Down

0 comments on commit 909606e

Please sign in to comment.