Merge pull request #512 from fermionic/auto-redir-for-local-hub-contacts
for profile and photos, detect contacts from local hub and auto-redir
This commit is contained in:
commit
ca21f1bbc8
3 changed files with 68 additions and 0 deletions
|
|
@ -4,14 +4,18 @@ require_once('include/items.php');
|
|||
require_once('include/acl_selectors.php');
|
||||
require_once('include/bbcode.php');
|
||||
require_once('include/security.php');
|
||||
require_once('include/redir.php');
|
||||
|
||||
|
||||
function photos_init(&$a) {
|
||||
|
||||
if($a->argc > 1)
|
||||
auto_redir($a, $a->argv[1]);
|
||||
|
||||
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$o = '';
|
||||
|
||||
if($a->argc > 1) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once('include/contact_widgets.php');
|
||||
require_once('include/redir.php');
|
||||
|
||||
|
||||
function profile_init(&$a) {
|
||||
|
|
@ -28,6 +29,9 @@ function profile_init(&$a) {
|
|||
$which = $a->user['nickname'];
|
||||
$profile = $a->argv[1];
|
||||
}
|
||||
else {
|
||||
auto_redir($a, $which);
|
||||
}
|
||||
|
||||
profile_load($a,$which,$profile);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue