diff --git a/lib/Alchemy/Phrasea/Application/OAuth2.php b/lib/Alchemy/Phrasea/Application/OAuth2.php index a41b716239..6c943c940a 100644 --- a/lib/Alchemy/Phrasea/Application/OAuth2.php +++ b/lib/Alchemy/Phrasea/Application/OAuth2.php @@ -271,7 +271,7 @@ return call_user_func(function() $route = "/applications/dev/new"; $app->get($route, function() use ($app) { - $var = array("violations" => null); + $var = array("violations" => null, 'form' => null); return $app['response']('api/auth/application_dev_new.twig', $var); }); @@ -339,7 +339,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -374,7 +374,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -400,7 +400,7 @@ return call_user_func(function() } catch (Exception $e) { - + } $Serializer = $app['Core']['Serializer']; @@ -424,7 +424,7 @@ return call_user_func(function() } catch (\Exception $e) { - + } $Serializer = $app['Core']['Serializer']; diff --git a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php index 27e52e3d40..d77ea41f13 100644 --- a/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php +++ b/lib/Alchemy/Phrasea/Controller/Utils/ConnectionTest.php @@ -52,7 +52,7 @@ class ConnectionTest implements ControllerProviderInterface } catch (\Exception $e) { - + } if ($dbname && $connection_ok === true) @@ -85,7 +85,7 @@ class ConnectionTest implements ControllerProviderInterface } catch (\Exception $e) { - + } } diff --git a/lib/classes/API/OAuth2/Adapter.class.php b/lib/classes/API/OAuth2/Adapter.class.php index 5e93db5c2a..8a36bfc717 100644 --- a/lib/classes/API/OAuth2/Adapter.class.php +++ b/lib/classes/API/OAuth2/Adapter.class.php @@ -406,11 +406,22 @@ class API_OAuth2_Adapter extends OAuth2 'response_type' => $request->get('response_type', false) , 'client_id' => $request->get('client_id', false) , 'redirect_uri' => $request->get('redirect_uri', false) - , 'scope' => $request->get('scope', false) - , 'state' => $request->get('state', false) ); + $scope = $request->get('scope', false); + $state = $request->get('state', false); + + if($state) + { + $datas["state"] = $state; + } + + if($scope) + { + $datas["scope"] = $scope; + } + $filters = array( "client_id" => array( "filter" => FILTER_VALIDATE_REGEXP diff --git a/lib/classes/User/Adapter.class.php b/lib/classes/User/Adapter.class.php index bb9f587b3b..c9f1158921 100644 --- a/lib/classes/User/Adapter.class.php +++ b/lib/classes/User/Adapter.class.php @@ -1280,9 +1280,9 @@ class User_Adapter implements User_Interface, cache_cacheableInterface if ($this->_prefs) return $this; - + $registry = \registry::get_instance(); - + $sql = 'SELECT prop, value FROM usr_settings WHERE usr_id= :id'; $stmt = $this->appbox->get_connection()->prepare($sql); $stmt->execute(array(':id' => $this->id)); @@ -1302,7 +1302,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface { $v = $registry->get('GV_defaultQuery'); } - + $this->_prefs[$k] = $v; $this->update_pref($k, $v); } diff --git a/lib/classes/cache/databox.class.php b/lib/classes/cache/databox.class.php index 6535e19b66..c219d071c1 100644 --- a/lib/classes/cache/databox.class.php +++ b/lib/classes/cache/databox.class.php @@ -43,7 +43,7 @@ class cache_databox } catch (\Exception $e) { - + } if ($last_update) diff --git a/lib/classes/connection.class.php b/lib/classes/connection.class.php index 13d7a12228..7318d72216 100755 --- a/lib/classes/connection.class.php +++ b/lib/classes/connection.class.php @@ -192,7 +192,6 @@ class connection self::$_PDO_instance[$name] = null; unset(self::$_PDO_instance[$name]); } - return; } diff --git a/lib/classes/databox/status.class.php b/lib/classes/databox/status.class.php index 88a3b1cfa3..fe5c0f5e9a 100644 --- a/lib/classes/databox/status.class.php +++ b/lib/classes/databox/status.class.php @@ -159,13 +159,13 @@ class databox_status $statuses = array(); $sbas_ids = $user->ACL()->get_granted_sbas(); - + $see_all = array(); foreach ($sbas_ids as $databox) { $see_all[$databox->get_sbas_id()] = false; - + foreach($databox->get_collections() as $collection) { if($user->ACL()->has_right_on_base($collection->get_base_id(), 'chgstatus')) @@ -193,7 +193,7 @@ class databox_status if ($user->ACL()->has_right_on_sbas($sbas_id, 'bas_modify_struct')) $see_this = true; - + foreach ($status as $bit => $props) { diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index 750570ba0d..4c609116d2 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1935,16 +1935,16 @@ class record_adapter implements record_Interface, cache_cacheableInterface public function get_data_from_cache($option = null) { \cache_databox::refresh($this->get_sbas_id()); - + $databox = $this->get_databox(); - + return $databox->get_data_from_cache($this->get_cache_key($option)); } public function set_data_to_cache($value, $option = null, $duration = 0) { $databox = $this->get_databox(); - + return $databox->set_data_to_cache($value, $this->get_cache_key($option), $duration); } @@ -1962,7 +1962,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface break; } $databox = $this->get_databox(); - + \cache_databox::update($this->get_sbas_id(), 'record', $this->get_record_id()); return $databox->delete_data_from_cache($this->get_cache_key($option)); diff --git a/templates/web/api/auth/application_dev_show.twig b/templates/web/api/auth/application_dev_show.twig index 3134c16407..d247d76b3e 100644 --- a/templates/web/api/auth/application_dev_show.twig +++ b/templates/web/api/auth/application_dev_show.twig @@ -6,7 +6,7 @@
  • {{app.get_name}} - {{app.get_desciption }} + {{app.get_description }}