parent
6189f6c8e7
commit
4ca68c7af0
151 changed files with 987 additions and 8742 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
||||
require_once('mod/settings.php');
|
||||
|
||||
|
|
@ -29,12 +30,12 @@ function delegate_content(App $a) {
|
|||
$r = q("select `nickname` from user where uid = %d limit 1",
|
||||
intval($id)
|
||||
);
|
||||
if (dbm::is_result($r)) {
|
||||
if (DBM::is_result($r)) {
|
||||
$r = q("select id from contact where uid = %d and nurl = '%s' limit 1",
|
||||
intval(local_user()),
|
||||
dbesc(normalise_link(System::baseUrl() . '/profile/' . $r[0]['nickname']))
|
||||
);
|
||||
if (dbm::is_result($r)) {
|
||||
if (DBM::is_result($r)) {
|
||||
dba::insert('manage', array('uid' => $a->argv[2], 'mid' => local_user()));
|
||||
}
|
||||
}
|
||||
|
|
@ -64,7 +65,7 @@ function delegate_content(App $a) {
|
|||
dbesc($a->user['email']),
|
||||
dbesc($a->user['password'])
|
||||
);
|
||||
if (dbm::is_result($r))
|
||||
if (DBM::is_result($r))
|
||||
$full_managers = $r;
|
||||
|
||||
$delegates = array();
|
||||
|
|
@ -75,7 +76,7 @@ function delegate_content(App $a) {
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
if (dbm::is_result($r))
|
||||
if (DBM::is_result($r))
|
||||
$delegates = $r;
|
||||
|
||||
$uids = array();
|
||||
|
|
@ -97,14 +98,14 @@ function delegate_content(App $a) {
|
|||
dbesc(NETWORK_DFRN)
|
||||
);
|
||||
|
||||
if (! dbm::is_result($r)) {
|
||||
if (! DBM::is_result($r)) {
|
||||
notice( t('No potential page delegates located.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
$nicknames = array();
|
||||
|
||||
if (dbm::is_result($r)) {
|
||||
if (DBM::is_result($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$nicknames[] = "'" . dbesc(basename($rr['nurl'])) . "'";
|
||||
}
|
||||
|
|
@ -118,7 +119,7 @@ function delegate_content(App $a) {
|
|||
|
||||
$r = q("select `uid`, `username`, `nickname` from user where nickname in ( $nicks )");
|
||||
|
||||
if (dbm::is_result($r))
|
||||
if (DBM::is_result($r))
|
||||
foreach($r as $rr)
|
||||
if(! in_array($rr['uid'],$uids))
|
||||
$potentials[] = $rr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue