*/
use Friendica\App;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
use Friendica\Core\System;
+use Friendica\Core\Worker;
+use Friendica\Database\DBM;
use Friendica\Network\Probe;
+use Friendica\Protocol\Diaspora;
require_once 'include/enotify.php';
require_once 'include/group.php';
intval($uid)
);
- if (! dbm::is_result($r)) {
+ if (! DBM::is_result($r)) {
logger('Contact not found in DB.');
notice( t('Contact not found.') . EOL );
notice( t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL );
return;
}
- if(strlen($leading_junk) && get_config('system','debugging')) {
+ if(strlen($leading_junk) && Config::get('system','debugging')) {
// This might be more common. Mixed error text and some XML.
// If we're configured for debugging, show the text. Proceed in either case.
);
}
- /// @TODO is dbm::is_result() working here?
+ /// @TODO is DBM::is_result() working here?
if ($r === false) {
notice( t('Unable to set contact photo.') . EOL);
}
$r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
intval($contact_id)
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$contact = $r[0];
} else {
$contact = null;
if ((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND)) {
if (($contact) && ($contact['network'] === NETWORK_DIASPORA)) {
- require_once 'include/diaspora.php';
$ret = Diaspora::send_share($user[0],$r[0]);
logger('share returns: ' . $ret);
}
intval($uid)
);
- if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
+ if((DBM::is_result($r)) && ($r[0]['hide-friends'] == 0) && ($activity) && (! $hidden)) {
require_once 'include/items.php';
$i = item_store($arr);
if($i)
- proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
+ Worker::add(PRIORITY_HIGH, "notifier", "activity", $i);
}
}
}
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($node));
- if (! dbm::is_result($r)) {
+ if (! DBM::is_result($r)) {
$message = sprintf(t('No user record found for \'%s\' '), $node);
xml_status(3,$message); // failure
// NOTREACHED
dbesc($decrypted_source_url),
intval($local_uid)
);
- if (!dbm::is_result($ret)) {
+ if (!DBM::is_result($ret)) {
if (strstr($decrypted_source_url,'http:')) {
$newurl = str_replace('http:','https:',$decrypted_source_url);
} else {
dbesc($newurl),
intval($local_uid)
);
- if (!dbm::is_result($ret)) {
+ if (!DBM::is_result($ret)) {
// this is either a bogus confirmation (?) or we deleted the original introduction.
$message = t('Contact record was not found for you on our site.');
xml_status(3,$message);
$r = q("SELECT * FROM `contact` WHERE `dfrn-id` = '%s' LIMIT 1",
dbesc($decrypted_dfrn_id)
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$message = t('The ID provided by your system is a duplicate on our system. It should work if you try again.');
xml_status(1,$message); // Birthday paradox - duplicate dfrn-id
// NOTREACHED
dbesc($dfrn_pubkey),
intval($dfrn_record)
);
- if (! dbm::is_result($r)) {
+ if (! DBM::is_result($r)) {
$message = t('Unable to set your contact credentials on our system.');
xml_status(3,$message);
}
$r = q("SELECT `photo` FROM `contact` WHERE `id` = %d LIMIT 1",
intval($dfrn_record));
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$photo = $r[0]['photo'];
} else {
$photo = System::baseUrl() . '/images/person-175.jpg';
intval($dfrn_record)
);
- if (dbm::is_result($r))
+ if (DBM::is_result($r))
$combined = $r[0];
- if((dbm::is_result($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
+ if((DBM::is_result($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
$mutual = ($new_relation == CONTACT_IS_FRIEND);
notification(array(
'type' => NOTIFY_CONFIRM,
// Send a new friend post if we are allowed to...
- if($page && intval(get_pconfig($local_uid,'system','post_joingroup'))) {
+ if($page && intval(PConfig::get($local_uid,'system','post_joingroup'))) {
$r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
intval($local_uid)
);
- if((dbm::is_result($r)) && ($r[0]['hide-friends'] == 0)) {
+ if((DBM::is_result($r)) && ($r[0]['hide-friends'] == 0)) {
require_once 'include/items.php';
$i = item_store($arr);
if($i)
- proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
+ Worker::add(PRIORITY_HIGH, "notifier", "activity", $i);
}
}