Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
9b59bf40
Commit
9b59bf40
authored
13 years ago
by
Michael Gapczynski
Browse files
Options
Downloads
Patches
Plain Diff
Fix encoding again and update the link after renaming files
parent
1cddfe88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
files/index.php
+1
-1
1 addition, 1 deletion
files/index.php
files/js/filelist.js
+2
-0
2 additions, 0 deletions
files/js/filelist.js
files/templates/part.list.php
+7
-3
7 additions, 3 deletions
files/templates/part.list.php
with
10 additions
and
4 deletions
files/index.php
+
1
−
1
View file @
9b59bf40
...
...
@@ -71,7 +71,7 @@ $breadcrumb = array();
$pathtohere
=
""
;
foreach
(
explode
(
"/"
,
$dir
)
as
$i
){
if
(
$i
!=
""
){
$pathtohere
.
=
"/"
.
urlencode
(
$i
);
$pathtohere
.
=
"/"
.
str_replace
(
'+'
,
'%20'
,
urlencode
(
$i
)
)
;
$breadcrumb
[]
=
array
(
"dir"
=>
$pathtohere
,
"name"
=>
$i
);
}
}
...
...
This diff is collapsed.
Click to expand it.
files/js/filelist.js
+
2
−
0
View file @
9b59bf40
...
...
@@ -136,6 +136,8 @@ FileList={
var
newname
=
input
.
val
();
tr
.
attr
(
'
data-file
'
,
newname
);
td
.
children
(
'
a.name
'
).
empty
();
var
path
=
td
.
children
(
'
a.name
'
).
attr
(
'
href
'
);
td
.
children
(
'
a.name
'
).
attr
(
'
href
'
,
path
.
replace
(
encodeURIComponent
(
name
),
encodeURIComponent
(
newname
)));
if
(
newname
.
indexOf
(
'
.
'
)
>
0
){
basename
=
newname
.
substr
(
0
,
newname
.
lastIndexOf
(
'
.
'
));
}
else
{
...
...
This diff is collapsed.
Click to expand it.
files/templates/part.list.php
+
7
−
3
View file @
9b59bf40
...
...
@@ -4,11 +4,15 @@
if
(
$simple_size_color
<
0
)
$simple_size_color
=
0
;
$relative_modified_date
=
relative_modified_date
(
$file
[
'mtime'
]);
$relative_date_color
=
round
((
time
()
-
$file
[
'mtime'
])
/
60
/
60
/
24
*
14
);
// the older the file, the brighter the shade of grey; days*14
if
(
$relative_date_color
>
200
)
$relative_date_color
=
200
;
?>
<tr
data-file=
"
<?php
echo
str_replace
(
'+'
,
'%2B'
,
urlencode
(
$file
[
'name'
]));
?>
"
data-type=
"
<?php
echo
(
$file
[
'type'
]
==
'dir'
)
?
'dir'
:
'file'
?>
"
data-mime=
"
<?php
echo
$file
[
'mime'
]
?>
"
data-size=
'
<?php
echo
$file
[
'size'
];
?>
'
>
if
(
$relative_date_color
>
200
)
$relative_date_color
=
200
;
$name
=
str_replace
(
'+'
,
'%20'
,
urlencode
(
$file
[
'name'
]));
$name
=
str_replace
(
'%2F'
,
'/'
,
$name
);
$directory
=
str_replace
(
'+'
,
'%20'
,
urlencode
(
$file
[
'directory'
]));
$directory
=
str_replace
(
'%2F'
,
'/'
,
$directory
);
?>
<tr
data-file=
"
<?php
echo
$name
;
?>
"
data-type=
"
<?php
echo
(
$file
[
'type'
]
==
'dir'
)
?
'dir'
:
'file'
?>
"
data-mime=
"
<?php
echo
$file
[
'mime'
]
?>
"
data-size=
'
<?php
echo
$file
[
'size'
];
?>
'
>
<td
class=
"filename svg"
style=
"background-image:url(
<?php
if
(
$file
[
'type'
]
==
'dir'
)
echo
mimetype_icon
(
'dir'
);
else
echo
mimetype_icon
(
$file
[
'mime'
]);
?>
)"
>
<?php
if
(
!
isset
(
$_
[
'readonly'
])
||
!
$_
[
'readonly'
])
{
?>
<input
type=
"checkbox"
/>
<?php
}
?>
<a
class=
"name"
href=
"
<?php
if
(
$file
[
'type'
]
==
'dir'
)
echo
$_
[
'baseURL'
]
.
str_replace
(
'%2F'
,
'/'
,
urlencode
(
$file
[
'
directory
'
]))
.
'/'
.
urlencode
(
$file
[
'
name
'
])
;
else
echo
$_
[
'downloadURL'
]
.
str_replace
(
'%2F'
,
'/'
,
urlencode
(
$file
[
'
directory
'
]))
.
'/'
.
urlencode
(
$file
[
'
name
'
])
;
?>
"
title=
""
>
<a
class=
"name"
href=
"
<?php
if
(
$file
[
'type'
]
==
'dir'
)
echo
$_
[
'baseURL'
]
.
$
directory
.
'/'
.
$
name
;
else
echo
$_
[
'downloadURL'
]
.
$
directory
.
'/'
.
$
name
;
?>
"
title=
""
>
<span
class=
"nametext"
>
<?php
if
(
$file
[
'type'
]
==
'dir'
)
:
?>
<?php
echo
htmlspecialchars
(
$file
[
'name'
]);
?>
...
...
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