Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
die_coolen_jungs
our_own_cloud_project
Commits
64ef1e21
Commit
64ef1e21
authored
12 years ago
by
Michael Gapczynski
Browse files
Options
Downloads
Patches
Plain Diff
Change name of share function to shareItem, silly PHP 5.3.1 thinking it is a constructor...
parent
fb493c45
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/ajax/share.php
+1
-1
1 addition, 1 deletion
core/ajax/share.php
lib/public/share.php
+2
-2
2 additions, 2 deletions
lib/public/share.php
with
3 additions
and
3 deletions
core/ajax/share.php
+
1
−
1
View file @
64ef1e21
...
...
@@ -26,7 +26,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['item']
case
'share'
:
if
(
isset
(
$_POST
[
'shareType'
])
&&
isset
(
$_POST
[
'shareWith'
])
&&
isset
(
$_POST
[
'permissions'
]))
{
try
{
OCP\Share
::
share
(
$_POST
[
'itemType'
],
$_POST
[
'item'
],
$_POST
[
'shareType'
],
$_POST
[
'shareWith'
],
$_POST
[
'permissions'
]);
OCP\Share
::
share
Item
(
$_POST
[
'itemType'
],
$_POST
[
'item'
],
$_POST
[
'shareType'
],
$_POST
[
'shareWith'
],
$_POST
[
'permissions'
]);
// TODO May need to return private link
OC_JSON
::
success
();
}
catch
(
Exception
$exception
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/public/share.php
+
2
−
2
View file @
64ef1e21
...
...
@@ -140,7 +140,7 @@ class Share {
* @param int CRUDS permissions
* @return bool Returns true on success or false on failure
*/
public
static
function
share
(
$itemType
,
$itemSource
,
$shareType
,
$shareWith
,
$permissions
)
{
public
static
function
share
Item
(
$itemType
,
$itemSource
,
$shareType
,
$shareWith
,
$permissions
)
{
$uidOwner
=
\OC_User
::
getUser
();
// Verify share type and sharing conditions are met
switch
(
$shareType
)
{
...
...
@@ -201,7 +201,7 @@ class Share {
\OC_Log
::
write
(
'OCP\Share'
,
$message
,
\OC_Log
::
ERROR
);
throw
new
\Exception
(
$message
);
}
return
self
::
share
(
$itemType
,
$itemSource
,
self
::
SHARE_TYPE_EMAIL
,
$details
[
'EMAIL'
],
$permissions
);
return
self
::
share
Item
(
$itemType
,
$itemSource
,
self
::
SHARE_TYPE_EMAIL
,
$details
[
'EMAIL'
],
$permissions
);
break
;
// Future share types need to include their own conditions
default
:
...
...
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