diff --git a/htdocs/includes/OAuth/OAuth2/Service/WordPress.php b/htdocs/includes/OAuth/OAuth2/Service/WordPress.php index 4d6d81e086d..79a13d00e2d 100755 --- a/htdocs/includes/OAuth/OAuth2/Service/WordPress.php +++ b/htdocs/includes/OAuth/OAuth2/Service/WordPress.php @@ -11,17 +11,28 @@ use OAuth\Common\Http\Exception\TokenResponseException; use OAuth\OAuth2\Service\Exception\InvalidAccessTypeException; use OAuth\Common\Http\Uri\Uri; +/** + * Class For WordPress OAuth + */ class WordPress extends AbstractService { + /** + * @var string + */ protected $accessType = 'online'; - public function __construct( - CredentialsInterface $credentials, - ClientInterface $httpClient, - TokenStorageInterface $storage, - $scopes = array(), - UriInterface $baseApiUri = null - ) { + /** + * Construct + * + * @param CredentialsInterface $credentials credentials + * @param ClientInterface $httpClient httpClient + * @param TokenStorageInterface $storage storage + * @param $scopes scope + * @param UriInterface|null $baseApiUri baseApiUri + * @throws Exception\InvalidScopeException + */ + public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, $scopes = array(), UriInterface $baseApiUri = null) + { parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true); if (null === $baseApiUri) { @@ -41,7 +52,7 @@ class WordPress extends AbstractService }*/ /** - * {@inheritdoc} + * @return Uri */ public function getAuthorizationEndpoint() { @@ -49,7 +60,7 @@ class WordPress extends AbstractService } /** - * {@inheritdoc} + * @return Uri */ public function getAccessTokenEndpoint() { @@ -57,7 +68,7 @@ class WordPress extends AbstractService } /** - * {@inheritdoc} + * @return int */ protected function getAuthorizationMethod() { @@ -66,7 +77,9 @@ class WordPress extends AbstractService } /** - * {@inheritdoc} + * @param $responseBody responseBody + * @return StdOAuth2Token + * @throws TokenResponseException */ protected function parseAccessTokenResponse($responseBody) { diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index 0f223d520e5..4ee300998ea 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -39,3 +39,5 @@ UPDATE llx_rights_def SET perms = 'writeall' WHERE perms = 'writeall_advance' AN -- v16 +-- Missing in v14 or lower +ALTER TABLE llx_projet_task_time ADD COLUMN fk_product integer NULL; diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index 786d8907588..63eadb1177f 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -24,6 +24,7 @@ create table llx_projet_task_time task_datehour datetime, -- day + hour task_date_withhour integer DEFAULT 0, -- 0 by default, 1 if date was entered with start hour task_duration double, + fk_product integer NULL, fk_user integer, thm double(24,8), invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here