1
1
Fork 0

live updates sort of working

This commit is contained in:
Mike Macgirvin 2010-07-24 23:20:20 -07:00
commit fc8379b108
6 changed files with 68 additions and 50 deletions

View file

@ -119,9 +119,15 @@ function network_content(&$a, $update = false) {
}
}
if($update)
$return_url = $_SESSION['return_url'];
else
$return_url = $_SESSION['return_url'] = $a->cmd;
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => $a->cmd,
'$return_path' => $_SESSION['return_url'],
'$id' => $item['item_id'],
'$parent' => $item['parent'],
'$profile_uid' => $_SESSION['uid'],

View file

@ -212,13 +212,18 @@ function profile_content(&$a, $update = false) {
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
if(can_write_wall($a,$a->profile['profile_uid'])) {
if($update)
$return_url = $_SESSION['return_url'];
else
$return_url = $_SESSION['return_url'] = $a->cmd;
if(can_write_wall($a,$a->profile['uid'])) {
if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array(
'$return_path' => $a->cmd,
'$return_path' => $_SESSION['return_url'],
'$id' => $item['item_id'],
'$parent' => $item['parent'],
'$profile_uid' => $a->profile['profile_uid'],
'$profile_uid' => $a->profile['uid'],
'$ww' => ''
));
}

View file

@ -6,9 +6,12 @@ require_once('mod/network.php');
function update_network_content(&$a) {
echo "<html>\r\n";
echo network_content($a,true);
echo "</html>\r\n";
header("Content-type: text/html");
echo "<!DOCTYPE html><html><body>\r\n";
echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
echo str_replace("\t",' ',network_content($a,true));
echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n";
killme();
}

View file

@ -6,9 +6,12 @@ require_once('mod/profile.php');
function update_profile_content(&$a) {
echo "<html>\r\n";
echo profile_content($a,true);
echo "</html>\r\n";
header("Content-type: text/html");
echo "<!DOCTYPE html><html><body>\r\n";
echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
echo str_replace("\t",' ',profile_content($a,true));
echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n";
killme();
}