aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_request.php2
-rw-r--r--mod/directory.php13
-rw-r--r--mod/display.php3
-rw-r--r--mod/home.php10
-rw-r--r--mod/search.php11
5 files changed, 31 insertions, 8 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index ce422aa9f..e1370dfd8 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -6,7 +6,7 @@ function dfrn_request_init(&$a) {
if($a->argc > 1)
$which = $a->argv[1];
- profile_init($a,$which);
+ profile_load($a,$which);
return;
}}
diff --git a/mod/directory.php b/mod/directory.php
index 703c08ce1..e9bbf47ab 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -3,11 +3,22 @@ function directory_init(&$a) {
$a->set_pager_itemspage(60);
}
+
+function directory_post(&$a) {
+ if(x($_POST,'search'))
+ $a->data['search'] = $_POST['search'];
+}
+
+
+
function directory_content(&$a) {
$o = '';
$o .= '<script> $(document).ready(function() { $(\'#nav-directory-link\').addClass(\'nav-selected\'); });</script>';
- $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');
+ if(x($a->data,'search'))
+ $search = notags(trim($a->data['search']));
+ else
+ $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : '');
$tpl = load_view_file('view/directory_header.tpl');
diff --git a/mod/display.php b/mod/display.php
index 1049b28a0..990d0b431 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -5,7 +5,8 @@ function display_content(&$a) {
$o = '<div id="live-display"></div>' . "\r\n";
- profile_init($a);
+ $nick = (($a->argc > 1) ? $a->argv[1] : '');
+ profile_load($a,$nick);
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
diff --git a/mod/home.php b/mod/home.php
index b8f16158e..59cc31d3b 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -14,12 +14,14 @@ if(! function_exists('home_content')) {
function home_content(&$a) {
$o = '';
- if(! (x($a->page,'footer')))
- $a->page['footer'] = '';
- $a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://friendika.com\" title=\"friendika\" >friendika</a></div>";
+/*
+ * if(! (x($a->page,'footer')))
+ * $a->page['footer'] = '';
+ * $a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://friendika.com\" title=\"friendika\" >friendika</a></div>";
+ */
$o .= '<h1>Welcome' . ((x($a->config,'sitename')) ? " to {$a->config['sitename']}" : "" ) . '</h1>';
if(file_exists('home.html'))
- $o .= file_get_contents('home.html');
+ $o .= file_get_contents('home.html');
$o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
return $o;
diff --git a/mod/search.php b/mod/search.php
index 78a4a3d53..7605e9ae2 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -1,13 +1,22 @@
<?php
+function search_post(&$a) {
+ if(x($_POST,'search'))
+ $a->data['search'] = $_POST['search'];
+}
+
+
function search_content(&$a) {
$o = '<div id="live-search"></div>' . "\r\n";
$o .= '<h3>' . t('Search') . '</h3>';
- $search = ((x($_GET,'search')) ? rawurldecode($_GET['search']) : '');
+ if(x($a->data,'search'))
+ $search = notags(trim($a->data['search']));
+ else
+ $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
$o .= search($search);