Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NextcloudPlugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stud.IP
Plugins
NextcloudPlugin
Commits
c8eb1cd1
Commit
c8eb1cd1
authored
2 years ago
by
David Siegfried
Browse files
Options
Downloads
Patches
Plain Diff
prepare for studip-5.3
parent
bccaf6c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/OAuth.class.php
+3
-3
3 additions, 3 deletions
classes/OAuth.class.php
classes/OwncloudFile.php
+5
-5
5 additions, 5 deletions
classes/OwncloudFile.php
with
8 additions
and
8 deletions
classes/OAuth.class.php
+
3
−
3
View file @
c8eb1cd1
...
@@ -10,10 +10,10 @@ class OAuth {
...
@@ -10,10 +10,10 @@ class OAuth {
$accessToken
=
self
::
getAccessToken
();
$accessToken
=
self
::
getAccessToken
();
if
(
!
$accessToken
)
{
if
(
!
$accessToken
)
{
throw
new
Exception
(
sprintf
(
"No valid access token. Please refresh your connection to %s."
,
Config
::
get
()
->
OWNCLOUD_NAME
));
throw
new
\
Exception
(
sprintf
(
"No valid access token. Please refresh your connection to %s."
,
Config
::
get
()
->
OWNCLOUD_NAME
));
}
}
$header
[]
=
OwnCloudFolder
::
getAuthHeader
();
$header
[]
=
\
OwnCloudFolder
::
getAuthHeader
();
$r
=
curl_init
();
$r
=
curl_init
();
curl_setopt
(
$r
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$r
,
CURLOPT_URL
,
$url
);
...
...
This diff is collapsed.
Click to expand it.
classes/OwncloudFile.php
+
5
−
5
View file @
c8eb1cd1
...
@@ -108,7 +108,7 @@ class OwncloudFile implements FileType
...
@@ -108,7 +108,7 @@ class OwncloudFile implements FileType
* on the server disk. Other implementations shall just return
* on the server disk. Other implementations shall just return
* an empty string.
* an empty string.
*
*
* @returns The file system path for the file or an empty string if the
* @returns
string
The file system path for the file or an empty string if the
* file doesn't have a path in the file system.
* file doesn't have a path in the file system.
*/
*/
public
function
getPath
()
:
string
public
function
getPath
()
:
string
...
@@ -339,7 +339,7 @@ class OwncloudFile implements FileType
...
@@ -339,7 +339,7 @@ class OwncloudFile implements FileType
$content
=
curl_exec
(
$r
);
$content
=
curl_exec
(
$r
);
$info
=
curl_getinfo
(
$r
);
curl_getinfo
(
$r
);
curl_close
(
$r
);
curl_close
(
$r
);
$path
=
$GLOBALS
[
'TMP_PATH'
]
.
"/owncloudplugin_"
.
md5
(
uniqid
());
$path
=
$GLOBALS
[
'TMP_PATH'
]
.
"/owncloudplugin_"
.
md5
(
uniqid
());
file_put_contents
(
file_put_contents
(
...
@@ -438,7 +438,7 @@ class OwncloudFile implements FileType
...
@@ -438,7 +438,7 @@ class OwncloudFile implements FileType
curl_setopt
(
$r
,
CURLOPT_VERBOSE
,
true
);
curl_setopt
(
$r
,
CURLOPT_VERBOSE
,
true
);
}
}
curl_exec
(
$r
);
curl_exec
(
$r
);
$status
=
curl_getinfo
(
$r
,
CURLINFO_HTTP_CODE
);
curl_getinfo
(
$r
,
CURLINFO_HTTP_CODE
);
curl_close
(
$r
);
curl_close
(
$r
);
fclose
(
$fh_res
);
fclose
(
$fh_res
);
...
@@ -447,6 +447,6 @@ class OwncloudFile implements FileType
...
@@ -447,6 +447,6 @@ class OwncloudFile implements FileType
public
function
getAccessibility
()
:
bool
public
function
getAccessibility
()
:
bool
{
{
// TODO: Implement getAccessibility() method.
return
false
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment