aboutsummaryrefslogtreecommitdiff
path: root/mod/file/search.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 22:13:10 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-03 22:13:10 +0000
commiteff4faea7f3c95440f02ea45d0be4f67236e2bf3 (patch)
tree57d51ef4bc84547d60c9a6faae7d5ff5d82d00f9 /mod/file/search.php
parent4b501dda1d62195531e4c2ab1bd84971c0cd4e37 (diff)
downloadelgg-eff4faea7f3c95440f02ea45d0be4f67236e2bf3.tar.gz
elgg-eff4faea7f3c95440f02ea45d0be4f67236e2bf3.tar.bz2
Fixes #1320: Bundled mods use elgg_echo()'s internal string substitution.
git-svn-id: http://code.elgg.org/elgg/trunk@7229 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/search.php')
-rw-r--r--mod/file/search.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/mod/file/search.php b/mod/file/search.php
index e92cf0362..b0120d932 100644
--- a/mod/file/search.php
+++ b/mod/file/search.php
@@ -2,7 +2,7 @@
/**
* Elgg file search
- *
+ *
* @package ElggFile
*/
@@ -10,7 +10,7 @@
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
-
+
// Get input
$md_type = 'simpletype';
$tag = get_input('tag');
@@ -31,17 +31,17 @@
}
}
$page_owner = get_input('page_owner',0);
- if ($page_owner) {
+ if ($page_owner) {
set_page_owner($page_owner);
} else {
if ($friends) {
- set_page_owner($friends);
+ set_page_owner($friends);
} else {
if ($owner_guid > 0 && !is_array($owner_guid))
set_page_owner($owner_guid);
}
}
-
+
if (is_callable('group_gatekeeper')) group_gatekeeper();
if (empty($tag)) {
@@ -49,12 +49,12 @@
$area2 = elgg_view_title(elgg_echo('file:type:all'));
$area2 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'file'));
} else {
- $title = sprintf(elgg_echo('searchtitle'),$tag);
+ $title = elgg_echo('searchtitle',array($tag));
if (is_array($owner_guid)) {
//$area2 = elgg_view_title(elgg_echo("file:friends:type:" . $tag));
$area2 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file'));
} else if (elgg_get_page_owner_guid() && elgg_get_page_owner_guid() != get_loggedin_userid()) {
- //$area2 = elgg_view_title(sprintf(elgg_echo("file:user:type:" . $tag),elgg_get_page_owner()->name));
+ //$area2 = elgg_view_title(elgg_echo("file:user:type:" . $tag,array(elgg_get_page_owner()->name)));
$area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'file'));
} else{
//$area2 = elgg_view_title(elgg_echo("file:type:" . $tag));
@@ -68,7 +68,7 @@
} else {
$area1 = get_filetype_cloud();
}
-
+
elgg_push_context('search');
$offset = (int)get_input('offset', 0);
@@ -87,13 +87,13 @@
} else {
$area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'owner_guid' => $owner_guid, 'limit' => $limit, 'offset' => $offset));
}
-
+
elgg_pop_context();
-
+
$content = "<div class='files'>".$area1.$area2."</div>";
-
+
$body = elgg_view_layout('one_column_with_sidebar', $content);
-
+
echo elgg_view_page($title, $body);
?> \ No newline at end of file