diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/admin.php | 4 | ||||
-rw-r--r-- | mod/display.php | 2 | ||||
-rw-r--r-- | mod/item.php | 4 | ||||
-rw-r--r-- | mod/network.php | 2 | ||||
-rw-r--r-- | mod/photos.php | 15 | ||||
-rw-r--r-- | mod/receive.php | 2 | ||||
-rw-r--r-- | mod/settings.php | 8 | ||||
-rw-r--r-- | mod/viewsrc.php | 5 |
8 files changed, 25 insertions, 17 deletions
diff --git a/mod/admin.php b/mod/admin.php index 68ce6fe85..06f44c89b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -687,7 +687,9 @@ function admin_page_users(&$a){ $order = " order by account_email asc "; if($_REQUEST['order'] === 'expires') $order = " order by account_expires desc "; - + if($_REQUEST['order'] === 'created') + $order = " order by account_created desc "; + $users =q("SELECT `account_id` , `account_email`, `account_lastlog`, `account_created`, `account_expires`, " . "`account_service_class`, ( account_flags & %d ) > 0 as `blocked`, " . "(SELECT GROUP_CONCAT( ch.channel_address SEPARATOR ' ') FROM channel as ch " . "WHERE ch.channel_account_id = ac.account_id and not (ch.channel_pageflags & %d )) as `channels` " . diff --git a/mod/display.php b/mod/display.php index c389eb976..be06c1e82 100644 --- a/mod/display.php +++ b/mod/display.php @@ -85,6 +85,8 @@ function display_content(&$a, $update = 0, $load = false) { $target_item = $r[0]; } + $r = null; + if($target_item['item_restrict'] & ITEM_WEBPAGE) { $x = q("select * from channel where channel_id = %d limit 1", intval($target_item['uid']) diff --git a/mod/item.php b/mod/item.php index 23d39a62c..7f25b35b8 100644 --- a/mod/item.php +++ b/mod/item.php @@ -854,7 +854,9 @@ function item_post(&$a) { if($parent) { // Store the comment signature information in case we need to relay to Diaspora //FIXME - store_diaspora_comment_sig($datarray,$channel,$parent_item, $post_id); + $ditem = $datarray; + $ditem['author'] = $observer; + store_diaspora_comment_sig($ditem,$channel,$parent_item, $post_id); } update_remote_id($channel,$post_id,$webpage,$pagetitle,$namespace,$remote_id,$mid); diff --git a/mod/network.php b/mod/network.php index 97870a6a1..0bad366d4 100644 --- a/mod/network.php +++ b/mod/network.php @@ -403,7 +403,7 @@ function network_content(&$a, $update = 0, $load = false) { dbesc($parents_str) ); - xchan_query($items); + xchan_query($items,true,(($firehose) ? local_user() : 0)); $items = fetch_post_tags($items,true); $items = conv_sort($items,$ordering); } diff --git a/mod/photos.php b/mod/photos.php index f2df894c0..44a7ce0f0 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -703,7 +703,7 @@ function photos_content(&$a) { if(count($r)) { $twist = 'rotright'; $o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>"; - $o .= '<div id="photo-album-contents-' . $a->pager['page'] . '">'; + $o .= '<div id="photo-album-contents">'; foreach($r as $rr) { @@ -758,20 +758,15 @@ function photos_content(&$a) { echo $ajaxout; killme(); } - - echo '<div id="photo-album-contents-' . $a->pager['page'] . '">'; echo $ajaxout; - echo '</div>'; - echo '<script>justifyPhotos(' . $a->pager['page'] . ');</script>'; + echo '<script>justifyPhotosAjax();</script>'; killme(); } - - $o .= '</div>'; // photo-album-contents - $o .= '<script>justifyPhotos(' . $a->pager['page'] . ');</script>'; $o .= '<div id="page-end"></div>'; + $o .= '</div>'; // photo-album-contents $o .= '<div id="photo-album-end"></div>'; - $o .= '<script>$(document).ready(function() { loadingPage = false;});</script>'; + $o .= '<script>$(document).ready(function() { loadingPage = false; justifyPhotos(); });</script>'; $o .= '<div id="page-spinner"></div>'; // $o .= paginate($a); @@ -1226,7 +1221,6 @@ function photos_content(&$a) { if($photos) { $o = replace_macros(get_markup_template('photosajax.tpl'),array( '$photos' => $photos, - '$page' => $a->pager['page'] )); } else { @@ -1243,7 +1237,6 @@ function photos_content(&$a) { '$can_post' => $can_post, '$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'), '$photos' => $photos, - '$page' => $a->pager['page'] )); } diff --git a/mod/receive.php b/mod/receive.php index 2a68019e0..4071b169b 100644 --- a/mod/receive.php +++ b/mod/receive.php @@ -58,7 +58,7 @@ function receive_post(&$a) { logger('mod-diaspora: decoded', LOGGER_DEBUG); - logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DEBUG); + logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DATA); if(! is_array($msg)) http_status_exit(500); diff --git a/mod/settings.php b/mod/settings.php index f9568feb3..876216871 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -736,7 +736,7 @@ function settings_content(&$a) { $user_scalable = (($user_scalable===false)? '1': $user_scalable); // default if not set: 1 $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); - $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds + $browser_update = (($browser_update == 0) ? 80 : $browser_update / 1000); // default if not set: 40 seconds $itemspage = intval(get_pconfig(local_user(), 'system','itemspage')); $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 20); // default if not set: 20 items @@ -935,6 +935,10 @@ function settings_content(&$a) { } } + + $permissions_role = get_pconfig(local_user(),'system','permissions_role'); + $permissions_set = (($permissions_role && $permissions_role != 'custom') ? true : false); + $o .= replace_macros($stpl,array( '$ptitle' => t('Channel Settings'), @@ -955,6 +959,8 @@ function settings_content(&$a) { '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)')), '$h_prv' => t('Security and Privacy Settings'), + '$permissions_set' => $permissions_set, + '$perms_set_msg' => t('Your permissions are already configured. Click to view/adjust'), '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')), diff --git a/mod/viewsrc.php b/mod/viewsrc.php index ddf39535c..982d1c417 100644 --- a/mod/viewsrc.php +++ b/mod/viewsrc.php @@ -5,6 +5,8 @@ function viewsrc_content(&$a) { $o = ''; + $sys = get_sys_channel(); + $item_id = ((argc() > 1) ? intval(argv(1)) : 0); $json = ((argc() > 2 && argv(2) === 'json') ? true : false); @@ -19,8 +21,9 @@ function viewsrc_content(&$a) { } if(local_user() && $item_id) { - $r = q("select item_flags, body from item where item_restrict = 0 and uid = %d and id = %d limit 1", + $r = q("select item_flags, body from item where item_restrict = 0 and uid in (%d , %d) and id = %d limit 1", intval(local_user()), + intval($sys['channel_id']), intval($item_id) ); |