diff options
author | friendica <info@friendica.com> | 2012-12-08 14:18:02 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-08 14:18:02 -0800 |
commit | c70777e19c6b48fe128e7ee9cbcaefb1de84c793 (patch) | |
tree | 3f3a7b4cdd841b1ed37561c34c67de3f9e4e4a48 | |
parent | ddedbda9660c35c908c0612c54536664849255cd (diff) | |
download | volse-hubzilla-c70777e19c6b48fe128e7ee9cbcaefb1de84c793.tar.gz volse-hubzilla-c70777e19c6b48fe128e7ee9cbcaefb1de84c793.tar.bz2 volse-hubzilla-c70777e19c6b48fe128e7ee9cbcaefb1de84c793.zip |
a bit of e_all cleanup
-rwxr-xr-x | include/items.php | 2 | ||||
-rw-r--r-- | include/nav.php | 2 | ||||
-rw-r--r-- | include/plugin.php | 7 | ||||
-rw-r--r-- | include/security.php | 2 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | mod/connections.php | 22 |
6 files changed, 19 insertions, 18 deletions
diff --git a/include/items.php b/include/items.php index 7e38469e8..fe29d1635 100755 --- a/include/items.php +++ b/include/items.php @@ -9,6 +9,8 @@ require_once('include/Photo.php'); function collect_recipients($item,&$private) { + require_once('include/group.php'); + if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid']) { $allow_people = expand_acl($item['allow_cid']); $allow_groups = expand_groups(expand_acl($item['allow_gid'])); diff --git a/include/nav.php b/include/nav.php index 7db053741..61ae16644 100644 --- a/include/nav.php +++ b/include/nav.php @@ -52,7 +52,7 @@ EOT; $observer = $a->get_observer(); - $myident = (($channel) ? $channel['xchan_address'] : ''); + $myident = (($channel) ? $channel['xchan_addr'] : ''); $sitelocation = (($myident) ? $myident : $a->get_hostname()); diff --git a/include/plugin.php b/include/plugin.php index c5039692a..46a659ddc 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -484,8 +484,11 @@ function theme_include($file) { 'view/$file' ); - $parent = get_app()->theme_info['extends']; - if(! $parent) + $theme_info = get_app()->theme_info; + + if(array_key_exists('extends',$theme_info)) + $parent = $theme_info['extends']; + else $parent = 'NOPATH'; foreach($paths as $p) { diff --git a/include/security.php b/include/security.php index eeec2b3d6..dfe646b8d 100644 --- a/include/security.php +++ b/include/security.php @@ -121,7 +121,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive } - if($return || $_SESSION['workflow']) { + if($return || x($_SESSION,'workflow')) { unset($_SESSION['workflow']); return; } @@ -378,6 +378,8 @@ head_add_js('mod_' . $a->module . '.js'); $arr = $a->get_widgets(); if(count($arr)) { foreach($arr as $x) { + if(! array_key_exists($x['location'],$a->page)) + $a->page[$x['location']] = ''; $a->page[$x['location']] .= $x['html']; } } diff --git a/mod/connections.php b/mod/connections.php index 9509950a0..106057006 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -26,12 +26,14 @@ function connections_init(&$a) { function connections_aside(&$a) { - if(x($a->data,'abook')) + if(x($a->data,'abook')) { $a->set_widget('vcard',vcard_from_xchan($a->data['abook'])); - else + } + else { $a->set_widget('follow', follow_widget()); + } - $a->set_widget('collections', group_side('connnections','group',false,0,$abook_id)); + $a->set_widget('collections', group_side('connnections','group',false,0,((array_key_exists('abook',$a->data)) ? $a->data['abook']['abook_id'] : ''))); $a->set_widget('findpeople',findpeople_widget()); } @@ -340,7 +342,6 @@ function connections_content(&$a) { '$lblrecent' => t('View conversations'), '$lblsuggest' => $lblsuggest, '$delete' => t('Delete contact'), - '$nettype' => $nettype, '$poll_interval' => contact_poll_interval($contact['priority'],(! $poll_enabled)), '$poll_enabled' => $poll_enabled, '$lastupdtext' => t('Last update:'), @@ -348,12 +349,10 @@ function connections_content(&$a) { '$updpub' => t('Update public posts'), '$last_update' => $last_update, '$udnow' => t('Update now'), - '$profile_select' => contact_profile_assign($contact['profile_id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), +// '$profile_select' => contact_profile_assign($contact['profile_id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), '$contact_id' => $contact['abook_id'], '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ), '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), - '$insecure' => (($contact['network'] !== NETWORK_DFRN && $contact['network'] !== NETWORK_MAIL && $contact['network'] !== NETWORK_FACEBOOK && $contact['network'] !== NETWORK_DIASPORA) ? $insecure : ''), - '$info' => $contact['info'], '$blocked' => (($contact['blocked']) ? t('Currently blocked') : ''), '$ignored' => (($contact['readonly']) ? t('Currently ignored') : ''), '$archived' => (($contact['archive']) ? t('Currently archived') : ''), @@ -421,11 +420,8 @@ function connections_content(&$a) { $unblocked = true; } - $search = ((x($_REQUEST,'search')) ? notags(trim($_REQUEST['search'])) : ''); - $nets = ((x($_GET,'nets')) ? notags(trim($_GET['nets'])) : ''); - $tabs = array( array( 'label' => t('Suggestions'), @@ -487,8 +483,6 @@ function connections_content(&$a) { } $sql_extra .= (($searching) ? protect_sprintf(" AND xchan_name like '%$search_txt%' ") : ""); - if($nets) - $sql_extra .= sprintf(" AND xchan_network = '%s' ", dbesc($nets)); $r = q("SELECT COUNT(abook.abook_id) AS total FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash where abook_channel = %d and not (abook_flags & %d) and not (abook_flags & %d) $sql_extra $sql_extra2 ", @@ -500,7 +494,7 @@ function connections_content(&$a) { $a->set_pager_total($r[0]['total']); $total = $r[0]['total']; } -dbg(1); + $r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook.abook_xchan = xchan.xchan_hash WHERE abook_channel = %d and not (abook_flags & %d) and not (abook_flags & %d) $sql_extra $sql_extra2 ORDER BY xchan_name LIMIT %d , %d ", intval(local_user()), @@ -509,7 +503,7 @@ dbg(1); intval($a->pager['start']), intval($a->pager['itemspage']) ); -dbg(0); + $contacts = array(); if(count($r)) { |