aboutsummaryrefslogtreecommitdiff
path: root/mod/file
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 23:58:35 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 23:58:35 +0000
commit8a73785aee3e51c26c65053a4de7c5d7f0ebb673 (patch)
tree41e7e607886b0498a0d8d4dc79df6aaa5094d385 /mod/file
parentb81f168b0bfc298c6eb1c0a2a857311f076c40bd (diff)
downloadelgg-8a73785aee3e51c26c65053a4de7c5d7f0ebb673.tar.gz
elgg-8a73785aee3e51c26c65053a4de7c5d7f0ebb673.tar.bz2
Merged r6586:6587 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6842 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file')
-rw-r--r--mod/file/start.php5
-rw-r--r--mod/file/views/default/file/groupprofile_files.php26
-rw-r--r--mod/file/views/default/object/file.php2
-rw-r--r--mod/file/views/default/widgets/filerepo/view.php46
4 files changed, 39 insertions, 40 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index a2785386f..06f64fddf 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -294,9 +294,8 @@
global $CONFIG;
$title = $entity->title;
- $title = friendly_title($title);
- return $CONFIG->url . "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
-
+ $title = elgg_get_friendly_title($title);
+ return $CONFIG->url . "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
}
// Make sure test_init is called on initialisation
diff --git a/mod/file/views/default/file/groupprofile_files.php b/mod/file/views/default/file/groupprofile_files.php
index 81fb88588..27f6f5d33 100644
--- a/mod/file/views/default/file/groupprofile_files.php
+++ b/mod/file/views/default/file/groupprofile_files.php
@@ -1,12 +1,12 @@
<?php
-
+
// Files on group profile page
//check to make sure group files is activated
if($vars['entity']->files_enable != 'no'){
?>
-<div class="group_tool_widget files">
+<div class="group_tool_widget files">
<h3><?php echo elgg_echo("file:group"); ?></h3>
<?php
@@ -15,38 +15,38 @@
$number = (int) $vars['entity']->num_display;
if (!$number)
$number = 6;
-
+
//get the group's files
$files = elgg_get_entities(array('type' => 'object',
'subtype' => 'file',
'container_guid' => $vars['entity']->guid,
'limit' => $number
));
-
+
//if there are some files, go get them
if ($files) {
-
+
//display in list mode
foreach($files as $f){
-
+
$mime = $f->mimetype;
echo "<div class='entity_listing clearfloat'>";
echo "<div class='entity_listing_icon'><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
echo "<div class='entity_listing_info'>";
echo "<p class='entity_title'>" . $f->title . "</p>";
- echo "<p class='entity_subtext'>" . friendly_time($f->time_created) . "</p>";
+ echo "<p class='entity_subtext'>" . elgg_view_friendly_time($f->time_created) . "</p>";
echo "</div></div>";
-
+
}
-
-
+
+
//get a link to the users files
$users_file_url = $vars['url'] . "pg/file/" . page_owner_entity()->username;
-
+
echo "<p><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></p>";
-
+
} else {
-
+
echo "<p class='margin_top'>" . elgg_echo("file:none") . "</p>";
}
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index f92c2bfc5..ef5c2df07 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -18,7 +18,7 @@
$title = $file->title;
$desc = $file->description;
$owner = $vars['entity']->getOwnerEntity();
- $friendlytime = friendly_time($vars['entity']->time_created);
+ $friendlytime = elgg_view_friendly_time($vars['entity']->time_created);
$mime = $file->mimetype;
if (!$title) {
diff --git a/mod/file/views/default/widgets/filerepo/view.php b/mod/file/views/default/widgets/filerepo/view.php
index 6763d2536..74c7810d9 100644
--- a/mod/file/views/default/widgets/filerepo/view.php
+++ b/mod/file/views/default/widgets/filerepo/view.php
@@ -2,13 +2,13 @@
//the page owner
$owner = $vars['entity']->owner_guid;
-
+
//the number of files to display
$number = (int) $vars['entity']->num_display;
if (!$number) {
$number = 4;
}
-
+
//get the layout view which is set by the user in the edit panel
$get_view = (int) $vars['entity']->gallery_list;
if (!$get_view || $get_view == 1) {
@@ -19,55 +19,55 @@
//get the user's files
$files = get_user_objects($vars['entity']->owner_guid, "file", $number, 0);
-
+
//if there are some files, go get them
if ($files) {
-
+
echo "<div id='filerepo_widget_layout'>";
-
+
if($view == "gallery"){
-
+
echo "<div class='filerepo_widget_galleryview'>";
-
+
//display in gallery mode
foreach($files as $f){
-
+
$mime = $f->mimetype;
echo "<a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a>";
-
+
}
-
+
echo "</div>";
-
+
}else{
-
+
//display in list mode
foreach($files as $f){
-
+
$mime = $f->mimetype;
echo "<div class='filerepo_widget_singleitem clearfloat'>";
echo "<div class='filerepo_listview_icon'><a href=\"{$f->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $f->thumbnail, 'file_guid' => $f->guid)) . "</a></div>";
echo "<div class='filerepo_widget_content'>";
echo "<div class='filerepo_listview_title'><p class='filerepo_title'>" . $f->title . "</p></div>";
- echo "<div class='filerepo_listview_date'><p class='filerepo_timestamp'><small>" . friendly_time($f->time_created) . "</small></p></div>";
+ echo "<div class='filerepo_listview_date'><p class='filerepo_timestamp'><small>" . elgg_view_friendly_time($f->time_created) . "</small></p></div>";
echo "</div></div>";
-
+
}
-
+
}
-
-
+
+
//get a link to the users files
$users_file_url = $vars['url'] . "pg/file/" . get_user($f->owner_guid)->username;
-
+
echo "<div class='filerepo_widget_singleitem_more'><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>";
echo "</div>";
-
-
+
+
} else {
-
+
echo "<p class='margin_top'>" . elgg_echo("file:none") . "</p>";
-
+
}
?> \ No newline at end of file