aboutsummaryrefslogtreecommitdiff
path: root/mod/file/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
committerSem <sembrestels@riseup.net>2012-04-25 19:09:22 +0200
commit9fe063022e08a4b6fa5f5935f8f185d5d95814a4 (patch)
tree87377f7b889efc639935508556beb9baf010e821 /mod/file/start.php
parent24690ed95198c093e6fbb91a94b5d0544c740f89 (diff)
downloadelgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.gz
elgg-9fe063022e08a4b6fa5f5935f8f185d5d95814a4.tar.bz2
Upgraded to Elgg 1.8.4.
Diffstat (limited to 'mod/file/start.php')
-rw-r--r--mod/file/start.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index 6c1501bd2..120129276 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -122,6 +122,7 @@ function file_page_handler($page) {
include "$file_dir/friends.php";
break;
case 'view':
+ case 'read': // Elgg 1.7 compatibility
set_input('guid', $page[1]);
include "$file_dir/view.php";
break;
@@ -199,9 +200,13 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'file')) {
$descr = $entity->description;
$title = $entity->title;
- $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
- return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $entity->title . "\n\n" . $descr . "\n\n" . $entity->getURL();
+ return elgg_echo('file:notification', array(
+ $owner->name,
+ $title,
+ $descr,
+ $entity->getURL()
+ ));
}
return null;
}
@@ -232,14 +237,6 @@ function file_owner_block_menu($hook, $type, $return, $params) {
* @return string The overall type
*/
function file_get_simple_type($mimetype) {
-
- if($type = elgg_trigger_plugin_hook('file_simple_type', 'object', $params, null)) {
- return $type;
- }
-
- if($type = elgg_trigger_plugin_hook('file_simple_type', 'object', $params, null)) {
- return $type;
- }
switch ($mimetype) {
case "application/msword":
@@ -405,4 +402,4 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) {
$url = elgg_trigger_plugin_hook('file:icon:url', 'override', $params, $url);
return $url;
}
-}
+} \ No newline at end of file