provide fake first arg to ajax updater

This commit is contained in:
Friendika 2011-07-21 17:55:15 -07:00
parent 9290283040
commit f4b4f61f66
2 changed files with 6 additions and 7 deletions

View File

@ -149,8 +149,8 @@
prev = 'live-' + src; prev = 'live-' + src;
in_progress = true; in_progress = true;
var udargs = ((netargs.length) ? '/' + netargs : ''); var udargs = ((netargs.length) ? '/?f=' + netargs : '?f=');
var update_url = 'update_' + src + udargs + '?p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0);
$.get(update_url,function(data) { $.get(update_url,function(data) {
in_progress = false; in_progress = false;

View File

@ -125,10 +125,10 @@ function network_content(&$a, $update = 0) {
$o .= '<div id="live-network"></div>' . "\r\n"; $o .= '<div id="live-network"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . $_SESSION['uid'] $o .= "<script> var profile_uid = " . $_SESSION['uid']
. "; var netargs = '" . substr($a->cmd,8) . "; var netargs = '" . substr($a->cmd,8)
. ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '')
. ((x($_GET,'search')) ? '?search=' . $_GET['search'] : '') . ((x($_GET,'search')) ? '&search=' . $_GET['search'] : '')
. ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '')
. "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n"; . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
} }
@ -208,7 +208,6 @@ function network_content(&$a, $update = 0) {
$sql_extra .= " AND `item`.`body` REGEXP '" . dbesc(escape_tags($_GET['search'])) . "' "; $sql_extra .= " AND `item`.`body` REGEXP '" . dbesc(escape_tags($_GET['search'])) . "' ";
$r = q("SELECT COUNT(*) AS `total` $r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0