Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

REPOSITORY MDL-23951 alfresco repository plugin supports returning ex…

…ternal links
  • Loading branch information...
commit b9825e8e298567298745ac19236e8fb561d15934 1 parent 2b37004
@dcai dcai authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 repository/alfresco/lib.php
View
14 repository/alfresco/lib.php
@@ -203,6 +203,18 @@ public function get_file($uuid, $file = '') {
return array('path'=>$path, 'url'=>$url);
}
+ /**
+ * Return file URL
+ *
+ * @param string $url the url of file
+ * @return string
+ */
+ public function get_link($uuid) {
+ $node = $this->user_session->getNode($this->store, $uuid);
+ $url = $this->get_url($node);
+ return $url;
+ }
+
public function print_search() {
$str = parent::print_search();
$str .= '<label>Space: </label><br /><select name="space">';
@@ -277,7 +289,7 @@ public static function plugin_init() {
}
}
public function supported_returntypes() {
- return FILE_INTERNAL;
+ return (FILE_INTERNAL | FILE_EXTERNAL);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.