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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
c9646ddc
Commit
c9646ddc
authored
11 years ago
by
Björn Schießle
Browse files
Options
Downloads
Patches
Plain Diff
fix undefined index errors if public share view
parent
391f267d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files/templates/index.php
+3
-2
3 additions, 2 deletions
apps/files/templates/index.php
apps/files_sharing/public.php
+6
-0
6 additions, 0 deletions
apps/files_sharing/public.php
with
9 additions
and
2 deletions
apps/files/templates/index.php
+
3
−
2
View file @
c9646ddc
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
data-url=
"
<?php
print_unescaped
(
OCP\Util
::
linkTo
(
'files'
,
'ajax/upload.php'
));
?>
"
/>
data-url=
"
<?php
print_unescaped
(
OCP\Util
::
linkTo
(
'files'
,
'ajax/upload.php'
));
?>
"
/>
<a
href=
"#"
class=
"svg"
></a>
<a
href=
"#"
class=
"svg"
></a>
</div>
</div>
<?php
if
(
$_
[
'trash'
]
)
:
?>
<?php
if
(
!
$_
[
'isPublic'
]
&&
$_
[
'trash'
]
)
:
?>
<input
id=
"trash"
type=
"button"
value=
"
<?php
p
(
$l
->
t
(
'Deleted files'
));
?>
"
class=
"button"
<?php
$_
[
'trashEmpty'
]
?
p
(
'disabled'
)
:
''
?>
></input>
<input
id=
"trash"
type=
"button"
value=
"
<?php
p
(
$l
->
t
(
'Deleted files'
));
?>
"
class=
"button"
<?php
$_
[
'trashEmpty'
]
?
p
(
'disabled'
)
:
''
?>
></input>
<?php
endif
;
?>
<?php
endif
;
?>
<div
id=
"uploadprogresswrapper"
>
<div
id=
"uploadprogresswrapper"
>
...
@@ -111,8 +111,9 @@
...
@@ -111,8 +111,9 @@
<input
type=
"hidden"
name=
"ajaxLoad"
id=
"ajaxLoad"
value=
"
<?php
p
(
$_
[
'ajaxLoad'
]);
?>
"
/>
<input
type=
"hidden"
name=
"ajaxLoad"
id=
"ajaxLoad"
value=
"
<?php
p
(
$_
[
'ajaxLoad'
]);
?>
"
/>
<input
type=
"hidden"
name=
"allowZipDownload"
id=
"allowZipDownload"
value=
"
<?php
p
(
$_
[
'allowZipDownload'
]);
?>
"
/>
<input
type=
"hidden"
name=
"allowZipDownload"
id=
"allowZipDownload"
value=
"
<?php
p
(
$_
[
'allowZipDownload'
]);
?>
"
/>
<input
type=
"hidden"
name=
"usedSpacePercent"
id=
"usedSpacePercent"
value=
"
<?php
p
(
$_
[
'usedSpacePercent'
]);
?>
"
/>
<input
type=
"hidden"
name=
"usedSpacePercent"
id=
"usedSpacePercent"
value=
"
<?php
p
(
$_
[
'usedSpacePercent'
]);
?>
"
/>
<?php
if
(
!
$_
[
'isPublic'
])
:
?>
<input
type=
"hidden"
name=
"encryptedFiles"
id=
"encryptedFiles"
value=
"
<?php
$_
[
'encryptedFiles'
]
?
p
(
'1'
)
:
p
(
'0'
);
?>
"
/>
<input
type=
"hidden"
name=
"encryptedFiles"
id=
"encryptedFiles"
value=
"
<?php
$_
[
'encryptedFiles'
]
?
p
(
'1'
)
:
p
(
'0'
);
?>
"
/>
<input
type=
"hidden"
name=
"encryptedInitStatus"
id=
"encryptionInitStatus"
value=
"
<?php
p
(
$_
[
'encryptionInitStatus'
])
?>
"
/>
<input
type=
"hidden"
name=
"encryptedInitStatus"
id=
"encryptionInitStatus"
value=
"
<?php
p
(
$_
[
'encryptionInitStatus'
])
?>
"
/>
<input
type=
"hidden"
name=
"mailNotificationEnabled"
id=
"mailNotificationEnabled"
value=
"
<?php
p
(
$_
[
'mailNotificationEnabled'
])
?>
"
/>
<input
type=
"hidden"
name=
"mailNotificationEnabled"
id=
"mailNotificationEnabled"
value=
"
<?php
p
(
$_
[
'mailNotificationEnabled'
])
?>
"
/>
<input
type=
"hidden"
name=
"allowShareWithLink"
id=
"allowShareWithLink"
value=
"
<?php
p
(
$_
[
'allowShareWithLink'
])
?>
"
/>
<input
type=
"hidden"
name=
"allowShareWithLink"
id=
"allowShareWithLink"
value=
"
<?php
p
(
$_
[
'allowShareWithLink'
])
?>
"
/>
<?php
endif
;
This diff is collapsed.
Click to expand it.
apps/files_sharing/public.php
+
6
−
0
View file @
c9646ddc
...
@@ -221,6 +221,8 @@ if (isset($path)) {
...
@@ -221,6 +221,8 @@ if (isset($path)) {
$breadcrumbNav
->
assign
(
'breadcrumb'
,
$breadcrumb
);
$breadcrumbNav
->
assign
(
'breadcrumb'
,
$breadcrumb
);
$breadcrumbNav
->
assign
(
'baseURL'
,
OCP\Util
::
linkToPublic
(
'files'
)
.
$urlLinkIdentifiers
.
'&path='
);
$breadcrumbNav
->
assign
(
'baseURL'
,
OCP\Util
::
linkToPublic
(
'files'
)
.
$urlLinkIdentifiers
.
'&path='
);
$maxUploadFilesize
=
OCP\Util
::
maxUploadFilesize
(
$path
);
$maxUploadFilesize
=
OCP\Util
::
maxUploadFilesize
(
$path
);
$fileHeader
=
(
!
isset
(
$files
)
or
count
(
$files
)
>
0
);
$emptyContent
=
(
$allowPublicUploadEnabled
and
!
$fileHeader
);
$folder
=
new
OCP\Template
(
'files'
,
'index'
,
''
);
$folder
=
new
OCP\Template
(
'files'
,
'index'
,
''
);
$folder
->
assign
(
'fileList'
,
$list
->
fetchPage
());
$folder
->
assign
(
'fileList'
,
$list
->
fetchPage
());
$folder
->
assign
(
'breadcrumb'
,
$breadcrumbNav
->
fetchPage
());
$folder
->
assign
(
'breadcrumb'
,
$breadcrumbNav
->
fetchPage
());
...
@@ -234,6 +236,10 @@ if (isset($path)) {
...
@@ -234,6 +236,10 @@ if (isset($path)) {
$folder
->
assign
(
'uploadMaxHumanFilesize'
,
OCP\Util
::
humanFileSize
(
$maxUploadFilesize
));
$folder
->
assign
(
'uploadMaxHumanFilesize'
,
OCP\Util
::
humanFileSize
(
$maxUploadFilesize
));
$folder
->
assign
(
'allowZipDownload'
,
intval
(
OCP\Config
::
getSystemValue
(
'allowZipDownload'
,
true
)));
$folder
->
assign
(
'allowZipDownload'
,
intval
(
OCP\Config
::
getSystemValue
(
'allowZipDownload'
,
true
)));
$folder
->
assign
(
'usedSpacePercent'
,
0
);
$folder
->
assign
(
'usedSpacePercent'
,
0
);
$folder
->
assign
(
'fileHeader'
,
$fileHeader
);
$folder
->
assign
(
'disableSharing'
,
true
);
$folder
->
assign
(
'emptyContent'
,
$emptyContent
);
$folder
->
assign
(
'ajaxLoad'
,
false
);
$tmpl
->
assign
(
'folder'
,
$folder
->
fetchPage
());
$tmpl
->
assign
(
'folder'
,
$folder
->
fetchPage
());
$maxInputFileSize
=
OCP\Config
::
getSystemValue
(
'maxZipInputSize'
,
OCP\Util
::
computerFileSize
(
'800 MB'
));
$maxInputFileSize
=
OCP\Config
::
getSystemValue
(
'maxZipInputSize'
,
OCP\Util
::
computerFileSize
(
'800 MB'
));
$allowZip
=
OCP\Config
::
getSystemValue
(
'allowZipDownload'
,
true
)
$allowZip
=
OCP\Config
::
getSystemValue
(
'allowZipDownload'
,
true
)
...
...
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