use Friendica\Database\DBM;
use Friendica\Model\GlobalContact;
use Friendica\Network\Probe;
+use Friendica\Object\Contact;
use Friendica\Protocol\Diaspora;
+use Friendica\Util\Emailer;
require_once 'include/crypto.php';
require_once 'include/enotify.php';
require_once 'include/threads.php';
require_once 'include/text.php';
require_once 'include/items.php';
-require_once 'include/Contact.php';
function item_post(App $a) {
$thrparent = q("SELECT `author-link`, `network` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($thr_parent));
if (DBM::is_result($thrparent) && ($thrparent[0]["network"] === NETWORK_OSTATUS)
&& (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) {
- $parent_contact = get_contact_details_by_url($thrparent[0]["author-link"]);
+ $parent_contact = Contact::getDetailsByURL($thrparent[0]["author-link"]);
if (!isset($parent_contact["nick"])) {
$probed_contact = Probe::uri($thrparent[0]["author-link"]);
$datarray['owner-name'] = $contact_record['name'];
$datarray['owner-link'] = $contact_record['url'];
$datarray['owner-avatar'] = $contact_record['thumb'];
- $datarray['owner-id'] = get_contact($datarray['owner-link'], 0);
+ $datarray['owner-id'] = Contact::getIdForURL($datarray['owner-link'], 0);
$datarray['author-name'] = $author['name'];
$datarray['author-link'] = $author['url'];
$datarray['author-avatar'] = $author['thumb'];
- $datarray['author-id'] = get_contact($datarray['author-link'], 0);
+ $datarray['author-id'] = Contact::getIdForURL($datarray['author-link'], 0);
$datarray['created'] = datetime_convert();
$datarray['edited'] = datetime_convert();
$datarray['commented'] = datetime_convert();
// update filetags in pconfig
file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
- Worker::add(PRIORITY_HIGH, "notifier", 'edit_post', $post_id);
+ Worker::add(PRIORITY_HIGH, "Notifier", 'edit_post', $post_id);
if ((x($_REQUEST, 'return')) && strlen($return_path)) {
logger('return: ' . $return_path);
goaway($return_path);
// Store the comment signature information in case we need to relay to Diaspora
- Diaspora::store_comment_signature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
+ Diaspora::storeCommentSignature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
} else {
$parent = $post_id;
$message = '<html><body>' . $link . $html . $disclaimer . '</body></html>';
include_once 'include/html2plain.php';
$params = array (
- 'fromName' => $a->user['username'],
- 'fromEmail' => $a->user['email'],
- 'toEmail' => $addr,
- 'replyTo' => $a->user['email'],
- 'messageSubject' => $subject,
- 'htmlVersion' => $message,
- 'textVersion' => html2plain($html.$disclaimer),
+ 'fromName' => $a->user['username'],
+ 'fromEmail' => $a->user['email'],
+ 'toEmail' => $addr,
+ 'replyTo' => $a->user['email'],
+ 'messageSubject' => $subject,
+ 'htmlVersion' => $message,
+ 'textVersion' => html2plain($html.$disclaimer)
);
Emailer::send($params);
}
// We now do it in the background to save some time.
// This is important in interactive environments like the frontend or the API.
// We don't fork a new process since this is done anyway with the following command
- Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "create_shadowentry", $post_id);
+ Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "CreateShadowEntry", $post_id);
// Call the background process that is delivering the item to the receivers
- Worker::add(PRIORITY_HIGH, "notifier", $notify_type, $post_id);
+ Worker::add(PRIORITY_HIGH, "Notifier", $notify_type, $post_id);
logger('post_complete');
*
* @return boolean true if replaced, false if not replaced
*/
-function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "") {
- require_once 'include/socgraph.php';
-
+function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "")
+{
$replaced = false;
$r = null;
$tag_type = '@';