From fd9c12128afba39d91b81371b240e0cd92f66469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sun, 26 Feb 2012 20:39:37 +0000 Subject: should probably be a->user['hidewall'] instead of profile['hidewall'] --- mod/profile.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/profile.php b/mod/profile.php index eba9874a8..74e1a2302 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -107,7 +107,7 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { + if($a->user['hidewall'] && (! $is_owner) && (! $remote_contact)) { notice( t('Access to this profile has been restricted.') . EOL); return; } @@ -228,10 +228,12 @@ function profile_content(&$a, $update = 0) { intval($a->profile['profile_uid']), dbesc($parents_str) ); + + $items = conv_sort($items,'created'); + } else { + $items = array(); } - $items = conv_sort($items,'created'); - if($is_owner && ! $update) { $o .= get_birthdays(); $o .= get_events(); -- cgit v1.2.3 From 792abc3a24d13408d4e31a4137a8173e3039bd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sun, 26 Feb 2012 20:40:41 +0000 Subject: necessare fields not loaded from DB --- mod/acl.php | 4 +++- mod/ping.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'mod') diff --git a/mod/acl.php b/mod/acl.php index 98ca90ded..375c618c8 100755 --- a/mod/acl.php +++ b/mod/acl.php @@ -16,6 +16,8 @@ function acl_init(&$a){ if ($search!=""){ $sql_extra = "AND `name` LIKE '%%".dbesc($search)."%%'"; $sql_extra2 = "AND (`attag` LIKE '%%".dbesc($search)."%%' OR `name` LIKE '%%".dbesc($search)."%%' OR `nick` LIKE '%%".dbesc($search)."%%')"; + } else { + $sql_extra = $sql_extra2 = ""; } // count groups and contacts @@ -75,7 +77,7 @@ function acl_init(&$a){ if ($type=='' || $type=='c'){ - $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url` FROM `contact` + $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag` FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `blocked` = 0 AND `pending` = 0 AND `notify` != '' $sql_extra2 ORDER BY `name` ASC ", diff --git a/mod/ping.php b/mod/ping.php index 0f6f0a9d6..7380ff7d0 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -26,9 +26,10 @@ function ping_init(&$a) { $dislikes = array(); $friends = array(); $posts = array(); - + $home = 0; + $network = 0; - $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`author-name`, + $r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`wall`, `item`.`author-name`, `item`.`author-link`, `item`.`author-avatar`, `item`.`created`, `item`.`object`, `pitem`.`author-name` as `pname`, `pitem`.`author-link` as `plink` FROM `item` INNER JOIN `item` as `pitem` ON `pitem`.`id`=`item`.`parent` -- cgit v1.2.3 From b102a1d5ecda36a9a48a841f06df9ef5d33fa46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Sun, 26 Feb 2012 20:43:23 +0000 Subject: is not always defined; but if defined, then always of type integer --- mod/photo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/photo.php b/mod/photo.php index a5a5a1dc1..c4a93769a 100755 --- a/mod/photo.php +++ b/mod/photo.php @@ -119,7 +119,7 @@ function photo_init(&$a) { // NOTREACHED } - if(intval($customres) && $customres > 0 && $customres < 500) { + if(isset($customres) && $customres > 0 && $customres < 500) { require_once('include/Photo.php'); $ph = new Photo($data); if($ph->is_valid()) { -- cgit v1.2.3