$parms['key'] // this was already escaped
);
if (DBM::is_result($r)) {
- Group::addMember(User::getDefaultGroup($uid, $r[0]["network"]), $r[0]['id']);
+ Group::addMember(User::getDefaultGroup(local_user(), $r[0]["network"]), $r[0]['id']);
if (isset($photo)) {
Contact::updateAvatar($photo, local_user(), $r[0]["id"], true);
return;
}
+ $geotag = '';
+
$o .= replace_macros(get_markup_template("section_title.tpl"),[
'$title' => L10n::t('Edit post')
]);
$dbdata = notags(trim($_POST['dbdata']));
$phpath = notags(trim($_POST['phpath']));
+ $adminmail = notags(trim($_POST['adminmail']));
$tpl = get_markup_template('install_db.tpl');
$o .= replace_macros($tpl, [
$t = 'now';
}
- $o .= '<h3>' . L10n::t('Time Conversion') . '</h3>';
+ $o = '<h3>' . L10n::t('Time Conversion') . '</h3>';
$o .= '<p>' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '</p>';
function lostpass_generate_password($user)
{
$o = '';
+ $a = get_app();
$new_password = User::generateNewPassword();
$result = User::updatePassword($user['uid'], $new_password);
'$to' => L10n::t('To:'),
'$showinputs' => 'true',
'$prefill' => $prefill,
- '$autocomp' => $autocomp,
'$preid' => $preid,
'$subject' => L10n::t('Subject:'),
'$subjtxt' => x($_REQUEST, 'subject') ? strip_tags($_REQUEST['subject']) : '',
}
if (strlen($file)) {
- $sql_post_table .= sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ",
+ $sql_post_table = sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ",
dbesc(protect_sprintf($file)), intval(TERM_OBJ_POST), intval(TERM_FILE), intval(local_user()));
} else {
$sql_post_table = " INNER JOIN `thread` ON `thread`.`iid` = `item`.`parent`";
$notif_content .= L10n::t('No more system notifications.');
}
- $o .= replace_macros($notif_tpl, [
+ $o = replace_macros($notif_tpl, [
'$notif_header' => L10n::t('System Notifications'),
'$tabs' => false, // $tabs,
'$notif_content' => $notif_content,
// Create item container
$lat = $lon = null;
- if ($exif && $exif['GPS'] && Feature::isEnabled($channel_id, 'photo_location')) {
+ if ($exif && $exif['GPS'] && Feature::isEnabled($page_owner_uid, 'photo_location')) {
$lat = Photo::getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
$lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
}
$forums = [];
if (count($forums_unseen)) {
foreach ($forums_unseen as $key => $item) {
- $forums[$count . ':forum'] = $item['count'];
- $forums[$count . ':@attributes'] = ['id' => $item['id']];
+ $forums[$key . ':forum'] = $item['count'];
+ $forums[$key . ':@attributes'] = ['id' => $item['id']];
}
$data['forums'] = $forums;
}
killme();
}
- $o .= '<h3>Probe Diagnostic</h3>';
+ $o = '<h3>Probe Diagnostic</h3>';
$o .= '<form action="probe" method="get">';
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] . '" />';
$tpl = get_markup_template('profile_photo.tpl');
- $o .= replace_macros($tpl,[
+ $o = replace_macros($tpl,[
'$user' => $a->user['nickname'],
'$lbl_upfile' => L10n::t('Upload File:'),
'$lbl_profiles' => L10n::t('Select a profile:'),
}
else {
$filename = $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'] . '.'.$a->config['imagecrop_ext'];
- $resolution = $a->config['imagecrop_resolution'];
$tpl = get_markup_template("cropbody.tpl");
- $o .= replace_macros($tpl,[
+ $o = replace_macros($tpl,[
'$filename' => $filename,
'$profile' => intval($_REQUEST['profile']),
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
$smallest = 0;
+ $filename = '';
$r = Photo::store($Image, local_user(), 0, $hash, $filename, L10n::t('Profile Photos'), 0);
return;
}
+ $o = '';
+
// Switch to text mod interface if we have more than 'n' contacts or group members
$switchtotext = PConfig::get(local_user(),'system','groupedit_image_limit');
return $o;
}
-
break;
}
+ $netpublish = (((x($_POST, 'profile_publish_reg')) &intval($_POST['profile_publish_reg']) = 1) ? 1 : 0);
$arr = $_POST;
L10n::pushLang($register[0]['language']);
- User::sendRegisterOpenEmail(
+ $res = User::sendRegisterOpenEmail(
$user[0]['email'],
$a->config['sitename'],
System::baseUrl(),
if (!local_user()) {
info(L10n::t('Please login.') . EOL);
- $o .= '<br /><br />' . Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
+ $o = '<br /><br />' . Login::form($a->query_string, $a->config['register_policy'] == REGISTER_CLOSED ? 0 : 1);
return $o;
}
$_SESSION['remove_account_verify'] = $hash;
$tpl = get_markup_template('removeme.tpl');
- $o .= replace_macros($tpl, [
+ $o = replace_macros($tpl, [
'$basedir' => System::baseUrl(),
'$hash' => $hash,
'$title' => L10n::t('Remove My Account'),
function search_saved_searches() {
$o = '';
+ $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : '');
if (! Feature::isEnabled(local_user(),'savedsearch'))
return $o;
}
// contruct a wrapper for the search header
- $o .= replace_macros(get_markup_template("content_wrapper.tpl"),[
+ $o = replace_macros(get_markup_template("content_wrapper.tpl"),[
'name' => "search-header",
'$title' => L10n::t("Search"),
'$title_size' => 3,
$targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
$link = xmlify('<link rel="alternate" type="text/html" href="'
- . System::baseUrl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
+ . System::baseUrl() . '/display/' . $r['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
$body = xmlify($item['body']);
return;
}
+ $is_owner = ((local_user() && ($a->profile['profile_uid'] == local_user())) ? true : false);
+
$o = "";
// tabs
$url = $rr['url'];
// route DFRN profiles through the redirect
-
- $is_owner = ((local_user() && ($a->profile['profile_uid'] == local_user())) ? true : false);
-
if ($is_owner && ($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
$url = 'redir/' . $rr['id'];
} else {
return;
}
+ $o = '';
$item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
if(! $item_id) {
]);
$tpl = get_markup_template('wallmessage.tpl');
- $o .= replace_macros($tpl, [
+ $o = replace_macros($tpl, [
'$header' => L10n::t('Send Private Message'),
'$subheader' => L10n::t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.', $user['username']),
'$to' => L10n::t('To:'),
'$text' => ((x($_REQUEST, 'body')) ? escape_tags(htmlspecialchars($_REQUEST['body'])) : ''),
'$readonly' => '',
'$yourmessage' => L10n::t('Your message:'),
- '$select' => $select,
'$parent' => '',
'$upload' => L10n::t('Upload photo'),
'$insert' => L10n::t('Insert web link'),
killme();
}
- $o .= '<h3>Webfinger Diagnostic</h3>';
+ $o = '<h3>Webfinger Diagnostic</h3>';
$o .= '<form action="webfinger" method="get">';
$o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] .'" />';