Permalink
Browse files

use the name of the webloc file

  • Loading branch information...
mubashariqbal committed Oct 24, 2018
1 parent 8ff4f57 commit cdbc01046631534259dc18e7c85c381b83c69f9d
Showing with 4 additions and 22 deletions.
  1. +2 −0 engine/application/libraries/Filebrowser.php
  2. +2 −22 engine/application/libraries/Subfolio.php
@@ -684,6 +684,8 @@ public function get_item_property($filename, $propertyname) {
if (isset($link->dict->string)) {
$property = (string) $link->dict->string;
}
} else {
$property = $filename;
}
}
}
@@ -1087,17 +1087,7 @@ public function files()
case "webloc" :
$url = Subfolio::$filebrowser->get_item_property($file->name, 'url') ? Subfolio::$filebrowser->get_item_property($file->name, 'url') : '';
$target = Subfolio::$filebrowser->get_item_property($file->name, 'target') ? Subfolio::$filebrowser->get_item_property($file->name, 'target') : '_blank';
if ($url) {
$parts = parse_url($url);
if (isset($parts['host'])) {
$display = $parts['host'];
} else {
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
}
} else {
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
}
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
break;
@@ -1293,17 +1283,7 @@ public function files_and_folders()
case "webloc" :
$url = Subfolio::$filebrowser->get_item_property($file->name, 'url') ? Subfolio::$filebrowser->get_item_property($file->name, 'url') : '';
$target = Subfolio::$filebrowser->get_item_property($file->name, 'target') ? Subfolio::$filebrowser->get_item_property($file->name, 'target') : '_blank';
if ($url) {
$parts = parse_url($url);
if (isset($parts['host'])) {
$display = $parts['host'];
} else {
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
}
} else {
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
}
$display = format::filename($file->get_display_name($replace_dash_space, $replace_underscore_space, TRUE), false);
break;

0 comments on commit cdbc010

Please sign in to comment.