Migrate to encodePath
This commit is contained in:
parent
5a3fce12a4
commit
582631323a
|
@ -7,8 +7,7 @@
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
|
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
|
||||||
$crumb = $_["breadcrumb"][$i];
|
$crumb = $_["breadcrumb"][$i];
|
||||||
$dir = str_replace('+', '%20', urlencode($crumb["dir"]));
|
$dir = \OCP\Util::encodePath($crumb["dir"]); ?>
|
||||||
$dir = str_replace('%2F', '/', $dir); ?>
|
|
||||||
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
|
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
|
||||||
data-dir='<?php p($dir);?>'>
|
data-dir='<?php p($dir);?>'>
|
||||||
<a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
|
<a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
|
||||||
|
|
|
@ -17,10 +17,8 @@ $totalsize = 0; ?>
|
||||||
// the older the file, the brighter the shade of grey; days*14
|
// the older the file, the brighter the shade of grey; days*14
|
||||||
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
|
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
|
||||||
if($relative_date_color>160) $relative_date_color = 160;
|
if($relative_date_color>160) $relative_date_color = 160;
|
||||||
$name = rawurlencode($file['name']);
|
$name = \OCP\Util::encodePath($file['name']);
|
||||||
$name = str_replace('%2F', '/', $name);
|
$directory = \OCP\Util::encodePath($file['directory']); ?>
|
||||||
$directory = rawurlencode($file['directory']);
|
|
||||||
$directory = str_replace('%2F', '/', $directory); ?>
|
|
||||||
<tr data-id="<?php p($file['fileid']); ?>"
|
<tr data-id="<?php p($file['fileid']); ?>"
|
||||||
data-file="<?php p($name);?>"
|
data-file="<?php p($name);?>"
|
||||||
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
|
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
|
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
|
||||||
$crumb = $_["breadcrumb"][$i];
|
$crumb = $_["breadcrumb"][$i];
|
||||||
$dir = str_replace('+', '%20', urlencode($crumb["dir"]));
|
$dir = \OCP\Util::encodePath($crumb["dir"]); ?>
|
||||||
$dir = str_replace('%2F', '/', $dir); ?>
|
|
||||||
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
|
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) p('last');?> svg"
|
||||||
data-dir='<?php p($dir);?>'>
|
data-dir='<?php p($dir);?>'>
|
||||||
<a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
|
<a href="<?php p($_['baseURL'].$dir); ?>"><?php p($crumb["name"]); ?></a>
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
// the older the file, the brighter the shade of grey; days*14
|
// the older the file, the brighter the shade of grey; days*14
|
||||||
$relative_date_color = round((time()-$file['date'])/60/60/24*14);
|
$relative_date_color = round((time()-$file['date'])/60/60/24*14);
|
||||||
if($relative_date_color>200) $relative_date_color = 200;
|
if($relative_date_color>200) $relative_date_color = 200;
|
||||||
$name = str_replace('+', '%20', urlencode($file['name']));
|
$name = \OCP\Util::encodePath($file['name']);
|
||||||
$name = str_replace('%2F', '/', $name);
|
$directory = \OCP\Util::encodePath($file['directory']); ?>
|
||||||
$directory = str_replace('+', '%20', urlencode($file['directory']));
|
|
||||||
$directory = str_replace('%2F', '/', $directory); ?>
|
|
||||||
<tr data-filename="<?php p($file['name']);?>"
|
<tr data-filename="<?php p($file['name']);?>"
|
||||||
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
|
data-type="<?php ($file['type'] == 'dir')?p('dir'):p('file')?>"
|
||||||
data-mime="<?php p($file['mimetype'])?>"
|
data-mime="<?php p($file['mimetype'])?>"
|
||||||
|
|
Loading…
Reference in New Issue