From 9abd95fad3784a10fc48bc40f9b8a75d7d74edda Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 31 Mar 2016 16:06:03 -0700 Subject: static App --- mod/search.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mod/search.php') diff --git a/mod/search.php b/mod/search.php index 555d46f6a..37bd00a66 100644 --- a/mod/search.php +++ b/mod/search.php @@ -2,7 +2,7 @@ function search_init(&$a) { if(x($_REQUEST,'search')) - $a->data['search'] = $_REQUEST['search']; + App::$data['search'] = $_REQUEST['search']; } @@ -30,7 +30,7 @@ function search_content(&$a,$update = 0, $load = false) { $update = $load = 1; } - $observer = $a->get_observer(); + $observer = App::get_observer(); $observer_hash = (($observer) ? $observer['xchan_hash'] : ''); $o = '' . "\r\n"; @@ -39,8 +39,8 @@ function search_content(&$a,$update = 0, $load = false) { $o .= '

' . t('Search') . '

'; - if(x($a->data,'search')) - $search = trim($a->data['search']); + if(x(App::$data,'search')) + $search = trim(App::$data['search']); else $search = ((x($_GET,'search')) ? trim(rawurldecode($_GET['search'])) : ''); @@ -99,12 +99,12 @@ function search_content(&$a,$update = 0, $load = false) { $o .= '' . "\r\n"; $o .= "\r\n"; + . "; var netargs = '?f='; var profile_page = " . App::$pager['page'] . "; \r\n"; - $a->page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( + App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( '$baseurl' => z_root(), '$pgtype' => 'search', - '$uid' => (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : '0'), + '$uid' => ((App::$profile['profile_uid']) ? App::$profile['profile_uid'] : '0'), '$gid' => '0', '$cid' => '0', '$cmin' => '0', @@ -117,7 +117,7 @@ function search_content(&$a,$update = 0, $load = false) { '$nouveau' => '0', '$wall' => '0', '$list' => ((x($_REQUEST,'list')) ? intval($_REQUEST['list']) : 0), - '$page' => (($a->pager['page'] != 1) ? $a->pager['page'] : 1), + '$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1), '$search' => (($tag) ? urlencode('#') : '') . $search, '$order' => '', '$file' => '', @@ -141,8 +141,8 @@ function search_content(&$a,$update = 0, $load = false) { if(($update) && ($load)) { $itemspage = get_pconfig(local_channel(),'system','itemspage'); - $a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); - $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval($a->pager['itemspage']), intval($a->pager['start'])); + App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); + $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); // in case somebody turned off public access to sys channel content with permissions -- cgit v1.2.3