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
7c815054
Commit
7c815054
authored
13 years ago
by
Arthur Schiwon
Browse files
Options
Downloads
Patches
Plain Diff
Config file is more appropriate here
adjust default value
parent
19bbb61b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
files/admin.php
+4
-4
4 additions, 4 deletions
files/admin.php
files/templates/index.php
+2
-2
2 additions, 2 deletions
files/templates/index.php
lib/files.php
+2
-2
2 additions, 2 deletions
lib/files.php
with
8 additions
and
8 deletions
files/admin.php
+
4
−
4
View file @
7c815054
...
...
@@ -35,16 +35,16 @@ if($_POST) {
}
if
(
isset
(
$_POST
[
'maxZipInputSize'
]))
{
$maxZipInputSize
=
$_POST
[
'maxZipInputSize'
];
OC_
Preferences
::
setValue
(
''
,
'files'
,
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
$maxZipInputSize
));
OC_
Config
::
setValue
(
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
$maxZipInputSize
));
}
OC_
Preferences
::
setValue
(
''
,
'files'
,
'allowZipDownload'
,
isset
(
$_POST
[
'allowZipDownload'
]));
OC_
Config
::
setValue
(
'allowZipDownload'
,
isset
(
$_POST
[
'allowZipDownload'
]));
}
else
{
$upload_max_filesize
=
OC_Helper
::
computerFileSize
(
ini_get
(
'upload_max_filesize'
));
$post_max_size
=
OC_Helper
::
computerFileSize
(
ini_get
(
'post_max_size'
));
$maxUploadFilesize
=
min
(
$upload_max_filesize
,
$post_max_size
);
$allowZipDownload
=
intval
(
OC_Preferences
::
getValue
(
''
,
'files'
,
'allowZipDownload'
,
1
));
$maxZipInputSize
=
OC_Helper
::
humanfilesize
(
OC_Preferences
::
getValue
(
''
,
'files'
,
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
'800 MB'
)));
$maxZipInputSize
=
OC_Helper
::
humanfilesize
(
OC_Config
::
getValue
(
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
'800 MB'
)));
}
$allowZipDownload
=
intval
(
OC_Config
::
getValue
(
'allowZipDownload'
,
true
));
OC_App
::
setActiveNavigationEntry
(
"files_administration"
);
...
...
This diff is collapsed.
Click to expand it.
files/templates/index.php
+
2
−
2
View file @
7c815054
...
...
@@ -40,7 +40,7 @@
<?php
if
(
!
isset
(
$_
[
'readonly'
])
||
!
$_
[
'readonly'
])
{
?>
<input
type=
"checkbox"
id=
"select_all"
/>
<?php
}
?>
<span
class=
'name'
>
<?php
echo
$l
->
t
(
'Name'
);
?>
</span>
<span
class=
'selectedActions'
>
<?php
if
(
OC_
Preferences
::
getValue
(
''
,
'files'
,
'allowZipDownload'
,
1
))
:
?>
<?php
if
(
OC_
Config
::
getValue
(
'allowZipDownload'
,
true
))
:
?>
<a
href=
""
title=
"
<?php
echo
$l
->
t
(
'Download'
)
?>
"
class=
"download"
><img
class=
'svg'
alt=
"Download"
src=
"
<?php
echo
image_path
(
"core"
,
"actions/download.svg"
);
?>
"
/></a>
<?php
endif
;
?>
<a
href=
""
title=
"Share"
class=
"share"
><img
class=
'svg'
alt=
"Share"
src=
"
<?php
echo
image_path
(
"core"
,
"actions/share.svg"
);
?>
"
/></a>
...
...
@@ -70,4 +70,4 @@
</div>
<!-- config hints for javascript -->
<input
type=
"hidden"
name=
"allowZipDownload"
id=
"allowZipDownload"
value=
"
<?php
echo
OC_Preferences
::
getValue
(
''
,
'files'
,
'allowZipDownload'
,
1
);
?>
"
/>
\ No newline at end of file
<input
type=
"hidden"
name=
"allowZipDownload"
id=
"allowZipDownload"
value=
"
<?php
echo
intval
(
OC_Config
::
getValue
(
'allowZipDownload'
,
true
));
?>
"
/>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/files.php
+
2
−
2
View file @
7c815054
...
...
@@ -224,7 +224,7 @@ class OC_Files {
* @param files $files
*/
static
function
validateZipDownload
(
$dir
,
$files
)
{
if
(
!
OC_
Preferences
::
getValue
(
''
,
'files'
,
'allowZipDownload'
,
1
))
{
if
(
!
OC_
Config
::
getValue
(
'allowZipDownload'
,
true
))
{
$l
=
new
OC_L10N
(
'files'
);
header
(
"HTTP/1.0 409 Conflict"
);
$tmpl
=
new
OC_Template
(
''
,
'error'
,
'user'
);
...
...
@@ -239,7 +239,7 @@ class OC_Files {
exit
;
}
$zipLimit
=
OC_
Preferences
::
getValue
(
''
,
'files'
,
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
'800 MB'
));
$zipLimit
=
OC_
Config
::
getValue
(
'maxZipInputSize'
,
OC_Helper
::
computerFileSize
(
'800 MB'
));
if
(
$zipLimit
>
0
)
{
$totalsize
=
0
;
if
(
is_array
(
$files
)){
...
...
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