//get further details of the contact
$contact_details = Model\Contact::getDetailsByURL($rr['url'], $uid, $rr);
- $photo_menu = '';
-
$connlnk = '';
// $rr[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photo_menu
// If the contact is not common to the user, Connect/Follow' will be added to the photo menu
require_once 'include/api.php';
-function oauth_get_client($request)
+function oauth_get_client(OAuthRequest $request)
{
-
-
$params = $request->get_parameters();
$token = $params['oauth_token'];
function delegate_init(App $a)
{
- return settings_init($a);
+ settings_init($a);
}
function delegate_post(App $a)
*/
$dfrn_id = Strings::escapeTags(trim($_GET['dfrn_id']));
- $dfrn_version = (float) $_GET['dfrn_version'];
$rino_remote = (!empty($_GET['rino']) ? intval($_GET['rino']) : 0);
$type = "";
$last_update = "";
$challenge = defaults($_GET, 'challenge' , '');
$sec = defaults($_GET, 'sec' , '');
$dfrn_version = (float) defaults($_GET, 'dfrn_version' , 2.0);
- $perm = defaults($_GET, 'perm' , 'r');
$quiet = !empty($_GET['quiet']);
// Possibly it is an OStatus compatible server that requests a user feed
switch ($direction) {
case -1:
$sql_extra = sprintf(" AND `issued-id` = '%s' ", DBA::escape($dfrn_id));
- $my_id = $dfrn_id;
break;
case 0:
$sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", DBA::escape($dfrn_id));
- $my_id = '1:' . $dfrn_id;
break;
case 1:
$sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", DBA::escape($dfrn_id));
- $my_id = '0:' . $dfrn_id;
break;
default:
$a->internalRedirect();
DBA::delete('challenge', ["`expire` < ?", time()]);
if ($type !== 'profile') {
- $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` , `type`, `last_update` )
+ q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` , `type`, `last_update` )
VALUES( '%s', '%s', '%s', '%s', '%s' ) ",
DBA::escape($hash),
DBA::escape($dfrn_id),
}
if (strlen($dfrn_request) && strlen($confirm_key)) {
- $s = Network::fetchUrl($dfrn_request . '?confirm_key=' . $confirm_key);
+ Network::fetchUrl($dfrn_request . '?confirm_key=' . $confirm_key);
}
// (ignore reply, nothing we can do it failed)
}
$nickname = $a->profile['nickname'];
- $notify_flags = $a->profile['notify-flags'];
$uid = $a->profile['uid'];
$maxreq = intval($a->profile['maxreq']);
$contact_record = null;
}
}
- $real_name = !empty($_POST['realname']) ? Strings::escapeTags(trim($_POST['realname'])) : '';
-
$url = trim($_POST['dfrn_url']);
if (!strlen($url)) {
notice(L10n::t("Invalid locator") . EOL);
$hash = Strings::getRandomHex() . (string) time(); // Generate a confirm_key
if (is_array($contact_record)) {
- $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
+ q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `note`, `hash`, `datetime`)
VALUES ( %d, %d, 1, %d, '%s', '%s', '%s' )",
intval($uid),
intval($contact_record['id']),
// If we are auto_confirming, this record will have already been nuked
// in dfrn_confirm_post()
- $r = q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s'",
+ q("UPDATE `intro` SET `blocked` = 0 WHERE `hash` = '%s'",
DBA::escape($_GET['confirm_key'])
);
}
]);
return $o;
}
-
- return; // Somebody is fishing.
}
}
while ($rr = DBA::fetch($r)) {
- $itemurl= '';
$itemurl = (($rr['addr'] != "") ? $rr['addr'] : $rr['profile_url']);
}
$nick = (($a->argc > 1) ? $a->argv[1] : '');
- $profiledata = [];
if ($a->argc == 3) {
if (substr($a->argv[2], -5) == '.atom') {
}
if (!$skip) {
- $author = "";
preg_match("/author='(.*?)'/ism", $attributes, $matches);
if (!empty($matches[1])) {
$profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
if (!empty($matches[1])) {
$profiledata["name"] = html_entity_decode($matches[1],ENT_QUOTES,'UTF-8');
}
- $profile = "";
preg_match("/profile='(.*?)'/ism", $attributes, $matches);
if (!empty($matches[1])) {
$profiledata["url"] = $matches[1];
if (!empty($matches[1])) {
$profiledata["url"] = $matches[1];
}
- $avatar = "";
preg_match("/avatar='(.*?)'/ism", $attributes, $matches);
if (!empty($matches[1])) {
$profiledata["photo"] = $matches[1];
/**
* @file mod/editpost.php
*/
+
use Friendica\App;
use Friendica\Content\Feature;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
$jotplugins = '';
$jotnets = '';
- $mail_disabled = ((function_exists('imap_open') && !Config::get('system', 'imap_disabled')) ? 0 : 1);
-
- $mail_enabled = false;
- $pubmail_enabled = false;
-
- if (!$mail_disabled) {
- $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
- intval(local_user())
- );
-
- if (DBA::isResult($r)) {
- $mail_enabled = true;
-
- if (intval($r[0]['pubmail'])) {
- $pubmail_enabled = true;
- }
- }
- }
-
Hook::callAll('jot_tool', $jotplugins);
$tpl = Renderer::getMarkupTemplate("jot.tpl");
}
if (($a->argc > 2) && ($a->argv[1] === 'ignore') && intval($a->argv[2])) {
- $r = q("UPDATE `event` SET `ignore` = 1 WHERE `id` = %d AND `uid` = %d",
+ q("UPDATE `event` SET `ignore` = 1 WHERE `id` = %d AND `uid` = %d",
intval($a->argv[2]),
intval(local_user())
);
}
if (($a->argc > 2) && ($a->argv[1] === 'unignore') && intval($a->argv[2])) {
- $r = q("UPDATE `event` SET `ignore` = 0 WHERE `id` = %d AND `uid` = %d",
+ q("UPDATE `event` SET `ignore` = 0 WHERE `id` = %d AND `uid` = %d",
intval($a->argv[2]),
intval(local_user())
);
$y = 2100;
}
- $nextyear = $y;
- $nextmonth = $m + 1;
- if ($nextmonth > 12) {
- $nextmonth = 1;
- $nextyear ++;
- }
-
- $prevyear = $y;
- if ($m > 1) {
- $prevmonth = $m - 1;
- } else {
- $prevmonth = 12;
- $prevyear --;
- }
-
$dim = Temporal::getDaysInMonth($y, $m);
$start = sprintf('%d-%d-%d %d:%d:%d', $y, $m, 1, 0, 0, 0);
$finish = sprintf('%d-%d-%d %d:%d:%d', $y, $m, $dim, 23, 59, 59);
'$s_text' => L10n::t('Event Starts:') . ' <span class="required" title="' . L10n::t('Required') . '">*</span>',
'$s_dsel' => Temporal::getDateTimeField(
new DateTime(),
- DateTime::createFromFormat('Y', $syear+5),
+ DateTime::createFromFormat('Y', intval($syear) + 5),
DateTime::createFromFormat('Y-m-d H:i', "$syear-$smonth-$sday $shour:$sminute"),
L10n::t('Event Starts:'),
'start_text',
'$f_text' => L10n::t('Event Finishes:'),
'$f_dsel' => Temporal::getDateTimeField(
new DateTime(),
- DateTime::createFromFormat('Y', $fyear+5),
+ DateTime::createFromFormat('Y', intval($fyear) + 5),
DateTime::createFromFormat('Y-m-d H:i', "$fyear-$fmonth-$fday $fhour:$fminute"),
L10n::t('Event Finishes:'),
'finish_text',
}
$template_file = "filebrowser.tpl";
- $mode = "";
- if (!empty($_GET['mode'])) {
- $mode = "?mode=".$_GET['mode'];
- }
switch ($a->argv[1]) {
case "image":
$albums = array_map("_map_folder1", $albums);
}
- $album = "";
- if ($a->argc==3) {
+ if ($a->argc == 3) {
$album = hex2bin($a->argv[2]);
$sql_extra = sprintf("AND `album` = '%s' ", DBA::escape($album));
$sql_extra2 = "";
- $path[]=[$a->argv[2], $album];
+ $path[] = [$a->argv[2], $album];
}
$r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, ANY_VALUE(`type`) AS `type`,
function _map_files2($rr)
{
- $a = \get_app();
- list($m1,$m2) = explode("/", $rr['filetype']);
+ list($m1, $m2) = explode("/", $rr['filetype']);
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");
$filename_e = $rr['filename'];
intval(local_user())
);
if (DBA::isResult($r)) {
- $x = q("INSERT INTO `fsuggest` ( `uid`,`cid`,`name`,`url`,`request`,`photo`,`note`,`created`)
+ q("INSERT INTO `fsuggest` ( `uid`,`cid`,`name`,`url`,`request`,`photo`,`note`,`created`)
VALUES ( %d, %d, '%s','%s','%s','%s','%s','%s')",
intval(local_user()),
intval($contact_id),
'$login' => $login,
'$content' => $content
]);
-
- return $o;
-
}}
// If a contact is connected the url is internally changed to 'redir/CID'. We need the pure url to search for
// the contact. So we strip out the contact id from the internal url and look in the contact table for
// the real url (nurl)
- $cid = 0;
if (strpos($profileurl, 'redir/') === 0) {
$cid = intval(substr($profileurl, 6));
$remote_contact = DBA::selectFirst('contact', ['nurl'], ['id' => $cid]);
$parent = $parent_item['id'];
$parent_user = $parent_item['uid'];
- $parent_contact = Contact::getDetailsByURL($parent_item["author-link"]);
-
$objecttype = ACTIVITY_OBJ_COMMENT;
}
continue;
}
- $success = handle_tag($a, $body, $inform, $str_tags, local_user() ? local_user() : $profile_uid, $tag, $network);
+ $success = handle_tag($body, $inform, $str_tags, local_user() ? local_user() : $profile_uid, $tag, $network);
if ($success['replaced']) {
$tagged[] = $tag;
}
$a->internalRedirect($return_path);
}
exit();
- } else {
- $post_id = 0;
}
unset($datarray['edit']);
* @throws ImagickException
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*/
-function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "")
+function handle_tag(&$body, &$inform, &$str_tags, $profile_uid, $tag, $network = "")
{
$replaced = false;
$r = null;
- $tag_type = '@';
//is it a person tag?
if ((strpos($tag, '@') === 0) || (strpos($tag, '!') === 0)) {
return $replaced;
}
- $stat = false;
//get the person's name
$name = substr($tag, 1);
function lostpass_content(App $a)
{
- $o = '';
if ($a->argc > 1) {
$pwdreset_token = $a->argv[1];
function lostpass_generate_password($user)
{
$o = '';
- $a = \get_app();
$new_password = User::generateNewPassword();
$result = User::updatePassword($user['uid'], $new_password);
);
if (DBA::isResult($r)) {
$parent = $r[0]['parent-uri'];
- $convid = $r[0]['convid'];
if (DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) {
info(L10n::t('Conversation removed.') . EOL);
if (DBA::isResult($r)) {
$prename = $r[0]['name'];
- $preurl = $r[0]['url'];
$preid = $r[0]['id'];
$preselect = [$preid];
} else {
$unseen = Item::exists($condition);
if ($unseen) {
- $r = Item::update(['unseen' => false], $condition);
+ Item::update(['unseen' => false], $condition);
}
}
// Rawmode is used for fetching new content at the end of the page
$rawmode = (isset($_GET['mode']) && ($_GET['mode'] == 'raw'));
- if (isset($_GET['last_id'])) {
- $last_id = intval($_GET['last_id']);
- } else {
- $last_id = 0;
- }
-
$o = '';
$file = defaults($_GET, 'file', '');
$pager = new Pager($a->query_string);
- /// @TODO Figure out why this variable is unused
- $pager_sql = networkPager($a, $pager, $update);
+ networkPager($a, $pager, $update);
if (strlen($file)) {
$condition = ["`term` = ? AND `otype` = ? AND `type` = ? AND `uid` = ?",
$sql_extra3 = '';
$sql_table = '`thread`';
$sql_parent = '`iid`';
- $sql_order = '';
if ($update) {
$sql_table = '`item`';
return;
}
- $profile = 0;
-
- $which = $a->user['nickname'];
-
Nav::setSelected('home');
-
- //Profile::load($a, $which, $profile);
}
$taginfo[] = [$newname, $profile, $salmon];
} else {
$newname = $name;
- $alias = '';
$tagcid = 0;
if (strrpos($newname, '+')) {
. System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo['resource-id'] . '</id>';
$arr['target'] .= '<link>' . XML::escape('<link rel="alternate" type="text/html" href="' . System::baseUrl() . '/photos/' . $owner_record['nickname'] . '/image/' . $photo['resource-id'] . '" />' . "\n" . '<link rel="preview" type="'.$photo['type'].'" href="' . System::baseUrl() . "/photo/" . $photo['resource-id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>';
- $item_id = Item::insert($arr);
+ Item::insert($arr);
}
}
}
$groups = [];
$remote_cid = null;
- $tab = 'posts';
$o = '';
if ($update) {
if ($is_owner) {
$unseen = Item::exists(['wall' => true, 'unseen' => true, 'uid' => local_user()]);
if ($unseen) {
- $r = Item::update(['unseen' => false],
- ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
+ Item::update(['unseen' => false], ['wall' => true, 'unseen' => true, 'uid' => local_user()]);
}
}
// If setting for the default profile, unset the profile photo flag from any other photos I own
if ($is_default_profile) {
- $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d",
+ q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d",
DBA::escape($base_image['resource-id']), intval(local_user())
);
} else {
- $r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
+ q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
DBA::escape(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $Image->getExt()),
DBA::escape(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $Image->getExt()),
intval($_REQUEST['profile']), intval(local_user())
// set an already uloaded photo as profile photo
// if photo is in 'Profile Photos', change it in db
if (($r[0]['album'] == L10n::t('Profile Photos')) && ($havescale)) {
- $r = q("UPDATE `photo` SET `profile`=0 WHERE `profile`=1 AND `uid`=%d", intval(local_user()));
+ q("UPDATE `photo` SET `profile`=0 WHERE `profile`=1 AND `uid`=%d", intval(local_user()));
- $r = q("UPDATE `photo` SET `profile`=1 WHERE `uid` = %d AND `resource-id` = '%s'", intval(local_user()),
+ q("UPDATE `photo` SET `profile`=1 WHERE `uid` = %d AND `resource-id` = '%s'", intval(local_user()),
DBA::escape($resource_id)
);
]);
return $o;
}
-
- return; // NOTREACHED
}
function profile_photo_crop_ui_head(App $a, Image $image)
// move every contact using this profile as their default to the user default
- $r = q("UPDATE `contact` SET `profile-id` = (SELECT `profile`.`id` AS `profile-id` FROM `profile` WHERE `profile`.`is-default` = 1 AND `profile`.`uid` = %d LIMIT 1) WHERE `profile-id` = %d AND `uid` = %d ",
+ q("UPDATE `contact` SET `profile-id` = (SELECT `profile`.`id` AS `profile-id` FROM `profile` WHERE `profile`.`is-default` = 1 AND `profile`.`uid` = %d LIMIT 1) WHERE `profile-id` = %d AND `uid` = %d ",
intval(local_user()),
intval($a->argv[2]),
intval(local_user())
);
- $r = q("DELETE FROM `profile` WHERE `id` = %d AND `uid` = %d",
+ q("DELETE FROM `profile` WHERE `id` = %d AND `uid` = %d",
intval($a->argv[2]),
intval(local_user())
);
$r1 = q("SELECT `name`, `photo`, `thumb` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1",
intval(local_user()));
- $r2 = q("INSERT INTO `profile` (`uid` , `profile-name` , `name`, `photo`, `thumb`)
+ q("INSERT INTO `profile` (`uid` , `profile-name` , `name`, `photo`, `thumb`)
VALUES ( %d, '%s', '%s', '%s', '%s' )",
intval(local_user()),
DBA::escape($name),
if(! DBA::isResult($r1)) {
notice(L10n::t('Profile unavailable to clone.') . EOL);
exit();
- return;
}
unset($r1[0]['id']);
$r1[0]['is-default'] = 0;
if (! DBA::isResult($r)) {
notice(L10n::t('Profile not found.') . EOL);
exit();
- return;
}
Profile::load($a, $a->user['nickname'], $r[0]['id']);
PConfig::set(local_user(), 'system', 'detailled_profile', (($_POST['detailled_profile'] == 1) ? 1: 0));
$changes = [];
- $value = '';
if ($is_default) {
if ($marital != $orig[0]['marital']) {
$changes[] = '[color=#ff0000]♥[/color] ' . L10n::t('Marital Status');
- $value = $marital;
}
if ($withchanged) {
$changes[] = '[color=#ff0000]♥[/color] ' . L10n::t('Romantic Partner');
- $value = strip_tags($with);
}
if ($likes != $orig[0]['likes']) {
$changes[] = L10n::t('Likes');
- $value = $likes;
}
if ($dislikes != $orig[0]['dislikes']) {
$changes[] = L10n::t('Dislikes');
- $value = $dislikes;
}
if ($work != $orig[0]['work']) {
$changes[] = L10n::t('Work/Employment');
}
if ($religion != $orig[0]['religion']) {
$changes[] = L10n::t('Religion');
- $value = $religion;
}
if ($politic != $orig[0]['politic']) {
$changes[] = L10n::t('Political Views');
- $value = $politic;
}
if ($gender != $orig[0]['gender']) {
$changes[] = L10n::t('Gender');
- $value = $gender;
}
if ($sexual != $orig[0]['sexual']) {
$changes[] = L10n::t('Sexual Preference');
- $value = $sexual;
}
if ($xmpp != $orig[0]['xmpp']) {
$changes[] = L10n::t('XMPP');
- $value = $xmpp;
}
if ($homepage != $orig[0]['homepage']) {
$changes[] = L10n::t('Homepage');
- $value = $homepage;
}
if ($interest != $orig[0]['interest']) {
$changes[] = L10n::t('Interests');
- $value = $interest;
}
if ($address != $orig[0]['address']) {
$changes[] = L10n::t('Address');
if ($locality != $orig[0]['locality'] || $region != $orig[0]['region']
|| $country_name != $orig[0]['country-name']) {
$changes[] = L10n::t('Location');
- $comma1 = ((($locality) && ($region || $country_name)) ? ', ' : ' ');
- $comma2 = (($region && $country_name) ? ', ' : '');
- $value = $locality . $comma1 . $region . $comma2 . $country_name;
}
}
if ($is_default) {
if ($namechanged) {
- $r = q("UPDATE `user` set `username` = '%s' where `uid` = %d",
+ q("UPDATE `user` set `username` = '%s' where `uid` = %d",
DBA::escape($name),
intval(local_user())
);
$hub_mode = Strings::escapeTags(trim(defaults($_GET, 'hub_mode', '')));
$hub_topic = Strings::escapeTags(trim(defaults($_GET, 'hub_topic', '')));
$hub_challenge = Strings::escapeTags(trim(defaults($_GET, 'hub_challenge', '')));
- $hub_lease = Strings::escapeTags(trim(defaults($_GET, 'hub_lease_seconds', '')));
$hub_verify = Strings::escapeTags(trim(defaults($_GET, 'hub_verify_token', '')));
Logger::log('Subscription from ' . $_SERVER['REMOTE_ADDR'] . ' Mode: ' . $hub_mode . ' Nick: ' . $nick);
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$hub_mode = post_var('hub_mode');
$hub_callback = post_var('hub_callback');
- $hub_verify = post_var('hub_verify');
$hub_verify_token = post_var('hub_verify_token');
$hub_secret = post_var('hub_secret');
$hub_topic = post_var('hub_topic');
{
BaseModule::checkFormSecurityTokenRedirectOnError('/register', 'register');
- $verified = 0;
- $blocked = 1;
-
$arr = ['post' => $_POST];
Hook::callAll('register_post', $arr);
$o .= "<p>".L10n::t("Keep this window open until done.")."</p>";
- $result = Contact::createFromProbe($uid, $r[0]["url"], true);
+ Contact::createFromProbe($uid, $r[0]["url"], true);
$a->page['htmlhead'] = '<meta http-equiv="refresh" content="1; URL='.System::baseUrl().'/repair_ostatus?counter='.$counter.'">';
Logger::log('new salmon ' . $xml, Logger::DATA);
$nick = (($a->argc > 1) ? Strings::escapeTags(trim($a->argv[1])) : '');
- $mentions = (($a->argc > 2 && $a->argv[2] === 'mention') ? true : false);
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 AND `account_removed` = 0 LIMIT 1",
DBA::escape($nick)
}
Theme::install($theme);
- $r = q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d",
+ q("UPDATE `user` SET `theme` = '%s' WHERE `uid` = %d",
DBA::escape($theme),
intval(local_user())
);
$page_flags = Contact::PAGE_COMMUNITY;
}
- $email_changed = false;
-
$err = '';
if ($username != $a->user['username']) {
}
if ($email != $a->user['email']) {
- $email_changed = true;
// check for the correct password
if (!User::authenticate(intval(local_user()), $_POST['mpassword'])) {
$err .= L10n::t('Wrong Password') . EOL;
// clear session language
unset($_SESSION['language']);
- $r = q("UPDATE `profile`
+ q("UPDATE `profile`
SET `publish` = %d,
`name` = '%s',
`net-publish` = %d,
Nav::setSelected('home');
- $o = '';
-
if ($a->argc > 1) {
$nick = $a->argv[1];
$user = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
//
if ($a->argc > 3) {
$datatype = $a->argv[2];
- $datum = $a->argv[3];
} elseif(($a->argc > 2) && ($a->argv[2] === 'upload')) {
$datatype = 'upload';
} else {
$datatype = 'summary';
}
- if ($a->argc > 4) {
- $cmd = $a->argv[4];
- } else {
- $cmd = 'view';
- }
-
//
// Setup permissions structures
//
if (DBA::isResult($r)) {
$can_post = true;
- $contact = $r[0];
$remote_contact = true;
$visitor = $contact_id;
}
);
if (DBA::isResult($r)) {
- $contact = $r[0];
$remote_contact = true;
}
}
}
- if (!$remote_contact && local_user()) {
- $contact_id = $_SESSION['cid'];
- $contact = $a->contact;
- }
-
if ($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (!$remote_contact)) {
notice(L10n::t('Access to this item is restricted.') . EOL);
return;
if ($a->argc == 4){
$theme = $a->argv[2];
- $THEMEPATH = "view/theme/$theme";
if(file_exists("view/theme/$theme/style.php"))
require_once("view/theme/$theme/style.php");
}
}
$can_post = false;
- $visitor = 0;
$page_owner_uid = $r[0]['uid'];
$page_owner_cid = $r[0]['id'];
- $page_owner_nick = $r[0]['nickname'];
$community_page = (($r[0]['page-flags'] == Contact::PAGE_COMMUNITY) ? true : false);
if ((local_user()) && (local_user() == $page_owner_uid)) {
if (DBA::isResult($r)) {
$can_post = true;
- $visitor = $contact_id;
}
}
}
}
}
- $basename = basename($filename);
-
if (!$desktopmode) {
$r = q("SELECT `id`, `datasize`, `width`, `height`, `type` FROM `photo`
WHERE `resource-id` = '%s'
namespace Friendica\Worker;
-use Friendica\BaseObject;
use Friendica\Core\Logger;
use Friendica\Core\System;
use Friendica\Database\DBA;