1
0
Fork 0

PortableContact created

Create PortableContact and remove socgraph, update references, and calls
This commit is contained in:
Adam Magness 2017-11-15 10:53:16 -05:00
commit 259f91caa9
26 changed files with 266 additions and 219 deletions

View file

@ -1,45 +1,44 @@
<?php
/**
* @file mod/nogroup.php
*/
use Friendica\App;
use Friendica\Database\DBM;
require_once('include/Contact.php');
require_once('include/socgraph.php');
require_once('include/contact_selectors.php');
function nogroup_init(App $a) {
require_once 'include/Contact.php';
require_once 'include/contact_selectors.php';
function nogroup_init(App $a)
{
if (! local_user()) {
return;
}
require_once('include/group.php');
require_once('include/contact_widgets.php');
require_once 'include/group.php';
require_once 'include/contact_widgets.php';
if (! x($a->page,'aside')) {
if (! x($a->page, 'aside')) {
$a->page['aside'] = '';
}
$a->page['aside'] .= group_side('contacts','group','extended',0,$contact_id);
$a->page['aside'] .= group_side('contacts', 'group', 'extended', 0, $contact_id);
}
function nogroup_content(App $a) {
function nogroup_content(App $a)
{
if (! local_user()) {
notice( t('Permission denied.') . EOL);
notice(t('Permission denied.') . EOL);
return '';
}
require_once('include/Contact.php');
require_once 'include/Contact.php';
$r = contacts_not_grouped(local_user());
if (DBM::is_result($r)) {
$a->set_pager_total($r[0]['total']);
}
$r = contacts_not_grouped(local_user(),$a->pager['start'],$a->pager['itemspage']);
$r = contacts_not_grouped(local_user(), $a->pager['start'], $a->pager['itemspage']);
if (DBM::is_result($r)) {
foreach ($r as $rr) {
$contact_details = get_contact_details_by_url($rr['url'], local_user(), $rr);
$contacts[] = array(
@ -64,12 +63,13 @@ function nogroup_content(App $a) {
}
$tpl = get_markup_template("nogroup-template.tpl");
$o .= replace_macros($tpl, array(
$o .= replace_macros(
$tpl,
array(
'$header' => t('Contacts who are not members of a group'),
'$contacts' => $contacts,
'$paginate' => paginate($a),
));
'$paginate' => paginate($a))
);
return $o;
}