diff options
author | friendica <info@friendica.com> | 2012-10-23 17:14:50 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-10-23 17:14:50 -0700 |
commit | 8e8482355baa55a5c9e3cb3553eecf5a733e2897 (patch) | |
tree | 69aebb07dd105280cb40997f172b90e58c555510 /mod/poco.php | |
parent | 756dcd115e5785dc009bce1e75ebb54c8009dfa7 (diff) | |
download | volse-hubzilla-8e8482355baa55a5c9e3cb3553eecf5a733e2897.tar.gz volse-hubzilla-8e8482355baa55a5c9e3cb3553eecf5a733e2897.tar.bz2 volse-hubzilla-8e8482355baa55a5c9e3cb3553eecf5a733e2897.zip |
more heavy lifting
Diffstat (limited to 'mod/poco.php')
-rw-r--r-- | mod/poco.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/mod/poco.php b/mod/poco.php index 2a5d47909..f93c8ade5 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -8,8 +8,8 @@ function poco_init(&$a) { http_status_exit(401); - if($a->argc > 1) { - $user = notags(trim($a->argv[1])); + if(argc() > 1) { + $user = notags(trim(argv(1))); } if(! x($user)) { $c = q("select * from pconfig where cat = 'system' and k = 'suggestme' and v = 1"); @@ -18,21 +18,24 @@ function poco_init(&$a) { $system_mode = true; } - $format = (($_GET['format']) ? $_GET['format'] : 'json'); + $format = (($_REQUEST['format']) ? $_REQUEST['format'] : 'json'); $justme = false; - if($a->argc > 2 && $a->argv[2] === '@me') + if(argc() > 2 && argv(2) === '@me') $justme = true; - if($a->argc > 3 && $a->argv[3] === '@all') - $justme = false; - if($a->argc > 3 && $a->argv[3] === '@self') - $justme = true; - if($a->argc > 4 && intval($a->argv[4]) && $justme == false) - $cid = intval($a->argv[4]); + if(argc() > 3) { + if(argv(3) === '@all') + $justme = false; + elseif(argv(3) === '@self') + $justme = true; + } + if(argc() > 4 && intval(argv(4)) && $justme == false) + $cid = intval(argv(4)); if(! $system_mode) { + $r = q("SELECT `user`.*,`profile`.`hide_friends` from user left join profile on `user`.`uid` = `profile`.`uid` where `user`.`nickname` = '%s' and `profile`.`is_default` = 1 limit 1", dbesc($user) |