if (!empty($_REQUEST['nofinish'])) {$orig_event['nofinish'] = $_REQUEST['nofinish'];}
if (!empty($_REQUEST['adjust'])) {$orig_event['adjust'] = $_REQUEST['adjust'];}
if (!empty($_REQUEST['summary'])) {$orig_event['summary'] = $_REQUEST['summary'];}
- if (!empty($_REQUEST['description'])) {$orig_event['description'] = $_REQUEST['description'];}
+ if (!empty($_REQUEST['desc'])) {$orig_event['desc'] = $_REQUEST['desc'];}
if (!empty($_REQUEST['location'])) {$orig_event['location'] = $_REQUEST['location'];}
if (!empty($_REQUEST['start'])) {$orig_event['start'] = $_REQUEST['start'];}
if (!empty($_REQUEST['finish'])) {$orig_event['finish'] = $_REQUEST['finish'];}
$n_checked = (!empty($orig_event['nofinish']) ? ' checked="checked" ' : '');
$a_checked = (!empty($orig_event['adjust']) ? ' checked="checked" ' : '');
- $t_orig = !empty($orig_event) ? $orig_event['summary'] : '';
- $d_orig = !empty($orig_event) ? $orig_event['desc'] : '';
- $l_orig = !empty($orig_event) ? $orig_event['location'] : '';
+ $t_orig = $orig_event['summary'] ?? '';
+ $d_orig = $orig_event['desc'] ?? '';
+ $l_orig = $orig_event['location'] ?? '';
$eid = !empty($orig_event) ? $orig_event['id'] : 0;
$cid = !empty($orig_event) ? $orig_event['cid'] : 0;
$uri = !empty($orig_event) ? $orig_event['uri'] : '';
if ($cmd === 'drop') {
$drop_url = $a->query_string;
- $extra_inputs = [
- ['name' => 'albumname', 'value' => $_POST['albumname']],
- ];
-
return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post',
'$message' => L10n::t('Do you really want to delete this photo album and all its photos?'),
- '$extra_inputs' => $extra_inputs,
+ '$extra_inputs' => [],
'$confirm' => L10n::t('Delete Album'),
'$confirm_url' => $drop_url,
'$confirm_name' => 'dropalbum',
return;
}
- $dob = $_POST['dob'] ? Strings::escapeHtml(trim($_POST['dob'])) : '0000-00-00';
+ $dob = !empty($_POST['dob']) ? Strings::escapeHtml(trim($_POST['dob'])) : '0000-00-00';
$y = substr($dob, 0, 4);
if ((! ctype_digit($y)) || ($y < 1900)) {
$namechanged = true;
}
- $pdesc = Strings::escapeTags(trim($_POST['pdesc']));
- $gender = Strings::escapeTags(trim($_POST['gender']));
- $address = Strings::escapeTags(trim($_POST['address']));
- $locality = Strings::escapeTags(trim($_POST['locality']));
- $region = Strings::escapeTags(trim($_POST['region']));
- $postal_code = Strings::escapeTags(trim($_POST['postal_code']));
- $country_name = Strings::escapeTags(trim($_POST['country_name']));
- $pub_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['pub_keywords'])));
- $prv_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['prv_keywords'])));
- $marital = Strings::escapeTags(trim($_POST['marital']));
- $howlong = Strings::escapeTags(trim($_POST['howlong']));
+ $pdesc = Strings::escapeTags(trim($_POST['pdesc'] ?? ''));
+ $gender = Strings::escapeTags(trim($_POST['gender'] ?? ''));
+ $address = Strings::escapeTags(trim($_POST['address'] ?? ''));
+ $locality = Strings::escapeTags(trim($_POST['locality'] ?? ''));
+ $region = Strings::escapeTags(trim($_POST['region'] ?? ''));
+ $postal_code = Strings::escapeTags(trim($_POST['postal_code'] ?? ''));
+ $country_name = Strings::escapeTags(trim($_POST['country_name'] ?? ''));
+ $pub_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['pub_keywords'] ?? '')));
+ $prv_keywords = profile_clean_keywords(Strings::escapeTags(trim($_POST['prv_keywords'] ?? '')));
+ $marital = Strings::escapeTags(trim($_POST['marital'] ?? ''));
+ $howlong = Strings::escapeTags(trim($_POST['howlong'] ?? ''));
$with = (!empty($_POST['with']) ? Strings::escapeTags(trim($_POST['with'])) : '');
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
- PConfig::set(local_user(), 'system', 'detailled_profile', (($_POST['detailed_profile'] == 1) ? 1: 0));
+ PConfig::set(local_user(), 'system', 'detailled_profile', !empty($_POST['detailed_profile']) ? 1: 0);
$changes = [];
if ($is_default) {
self::tagToBBCode($doc, 'hr', [], "[hr]", "");
- self::tagToBBCode($doc, 'table', [], "", "");
- self::tagToBBCode($doc, 'tr', [], "\n", "");
- self::tagToBBCode($doc, 'td', [], "\t", "");
- //self::node2BBCode($doc, 'table', array(), "[table]", "[/table]");
- //self::node2BBCode($doc, 'th', array(), "[th]", "[/th]");
- //self::node2BBCode($doc, 'tr', array(), "[tr]", "[/tr]");
- //self::node2BBCode($doc, 'td', array(), "[td]", "[/td]");
- //self::node2BBCode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n");
- //self::node2BBCode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n");
- //self::node2BBCode($doc, 'h3', array(), "\n\n[size=large][b]", "[/b][/size]\n");
- //self::node2BBCode($doc, 'h4', array(), "\n\n[size=medium][b]", "[/b][/size]\n");
- //self::node2BBCode($doc, 'h5', array(), "\n\n[size=small][b]", "[/b][/size]\n");
- //self::node2BBCode($doc, 'h6', array(), "\n\n[size=x-small][b]", "[/b][/size]\n");
+ self::tagToBBCode($doc, 'table', [], "[table]", "[/table]");
+ self::tagToBBCode($doc, 'th', [], "[th]", "[/th]");
+ self::tagToBBCode($doc, 'tr', [], "[tr]", "[/tr]");
+ self::tagToBBCode($doc, 'td', [], "[td]", "[/td]");
self::tagToBBCode($doc, 'h1', [], "[h1]", "[/h1]");
self::tagToBBCode($doc, 'h2', [], "[h2]", "[/h2]");
$condition_string .= " AND ";
}
if (is_array($value)) {
- /* Workaround for MySQL Bug #64791.
- * Never mix data types inside any IN() condition.
- * In case of mixed types, cast all as string.
- * Logic needs to be consistent with DBA::p() data types.
- */
- $is_int = false;
- $is_alpha = false;
- foreach ($value as $single_value) {
- if (is_int($single_value)) {
- $is_int = true;
- } else {
- $is_alpha = true;
+ if (count($value)) {
+ /* Workaround for MySQL Bug #64791.
+ * Never mix data types inside any IN() condition.
+ * In case of mixed types, cast all as string.
+ * Logic needs to be consistent with DBA::p() data types.
+ */
+ $is_int = false;
+ $is_alpha = false;
+ foreach ($value as $single_value) {
+ if (is_int($single_value)) {
+ $is_int = true;
+ } else {
+ $is_alpha = true;
+ }
}
- }
- if ($is_int && $is_alpha) {
- foreach ($value as &$ref) {
- if (is_int($ref)) {
- $ref = (string)$ref;
+ if ($is_int && $is_alpha) {
+ foreach ($value as &$ref) {
+ if (is_int($ref)) {
+ $ref = (string)$ref;
+ }
}
+ unset($ref); //Prevent accidental re-use.
}
- unset($ref); //Prevent accidental re-use.
- }
- $new_values = array_merge($new_values, array_values($value));
- $placeholders = substr(str_repeat("?, ", count($value)), 0, -2);
- $condition_string .= self::quoteIdentifier($field) . " IN (" . $placeholders . ")";
+ $new_values = array_merge($new_values, array_values($value));
+ $placeholders = substr(str_repeat("?, ", count($value)), 0, -2);
+ $condition_string .= self::quoteIdentifier($field) . " IN (" . $placeholders . ")";
+ } else {
+ // Empty value array isn't supported by IN and is logically equivalent to no match
+ $condition_string .= "FALSE";
+ }
} elseif (is_null($value)) {
$condition_string .= self::quoteIdentifier($field) . " IS NULL";
} else {
$apcontact['addr'] = '';
}
+ $apcontact['pubkey'] = null;
if (!empty($compacted['w3id:publicKey'])) {
$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
}
}
DBA::update('user-contact', ['blocked' => $blocked], ['cid' => $cdata['public'], 'uid' => $uid], true);
-
- if ($blocked) {
- // Blocked contact can't be in any group
- self::removeFromGroups($cid);
- }
}
/**
throw new \Exception(L10n::t('Unknown group.'), 404);
}
- $contact = DBA::selectFirst('contact', ['pending', 'blocked', 'deleted'], ['id' => $contact_id, 'uid' => local_user()]);
+ $contact = DBA::selectFirst('contact', ['deleted'], ['id' => $contact_id, 'uid' => local_user()]);
if (!DBA::isResult($contact)) {
throw new \Exception(L10n::t('Contact not found.'), 404);
}
- if ($contact['pending']) {
- throw new \Exception(L10n::t('Contact is unavailable.'), 400);
- }
-
if ($contact['deleted']) {
throw new \Exception(L10n::t('Contact is deleted.'), 410);
}
switch($command) {
case 'add':
- if ($contact['blocked']) {
- throw new \Exception(L10n::t('Contact is blocked, unable to add it to a group.'), 400);
- }
-
if (!Model\Group::addMember($group_id, $contact_id)) {
throw new \Exception(L10n::t('Unable to add the contact to the group.'), 500);
}
+
$message = L10n::t('Contact successfully added to group.');
break;
case 'remove':
if (!Model\Group::removeMember($group_id, $contact_id)) {
throw new \Exception(L10n::t('Unable to remove the contact from the group.'), 500);
}
+
$message = L10n::t('Contact successfully removed from group.');
break;
default:
'localtime' => DateTimeFormat::local($item['created'], 'r'),
'ago' => $item['app'] ? L10n::t('%s from %s', $ago, $item['app']) : $ago,
'app' => $item['app'],
- 'created' => Temporal::getRelativeDate($item['created']),
+ 'created' => $ago,
'lock' => $lock,
'location' => $location_e,
'indent' => $indent,
$record = array_merge($record, ['uid' => $this->logUid, 'process_id' => $this->pid]);
$logMessage = '';
- $logMessage .= DateTimeFormat::utcNow() . ' ';
+ $logMessage .= DateTimeFormat::utcNow(DateTimeFormat::ATOM) . ' ';
$logMessage .= $this->channel . ' ';
$logMessage .= '[' . strtoupper($level) . ']: ';
$logMessage .= $this->psrInterpolate($message, $context) . ' ';
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-05 23:28+0100\n"
-"PO-Revision-Date: 2019-12-20 02:40+0000\n"
+"PO-Revision-Date: 2019-12-23 07:57+0000\n"
"Last-Translator: ozero dien <rgfx0020+misc@gmail.com>\n"
"Language-Team: Japanese (http://www.transifex.com/Friendica/friendica/language/ja/)\n"
"MIME-Version: 1.0\n"
#: src/Model/Contact.php:1260
msgid "Drop Contact"
-msgstr "コンタクトをドロップ"
+msgstr "コンタクトを削除"
#: src/Model/Contact.php:1270 src/Module/Admin/Users.php:286
#: mod/notifications.php:198 mod/notifications.php:292
msgid ""
"Accepting %s as a friend allows %s to subscribe to your posts, and you will "
"also receive updates from them in your news feed."
-msgstr "受け入れ%s友人などができます%sあなたの記事を購読すると、あなたもあなたのニュースフィードにそれらから更新を受信します。"
+msgstr "%s を友達として受け入れた場合、%s はあなたの投稿を購読できます。また、あなたのニュースフィードに彼らの投稿が表示されます。"
#: mod/notifications.php:222
#, php-format
msgid ""
"Accepting %s as a subscriber allows them to subscribe to your posts, but you"
" will not receive updates from them in your news feed."
-msgstr "購読者として%sを受け入れると、投稿を購読できますが、ニュースフィードでそれらから更新を受け取ることはできません。"
+msgstr "%sを購読者として受け入れると、彼らはあなたの投稿を購読できますが、あなたのニュースフィードに彼らの投稿は表示されません。"
#: mod/notifications.php:226
#, php-format
msgid ""
"Accepting %s as a sharer allows them to subscribe to your posts, but you "
"will not receive updates from them in your news feed."
-msgstr "共有者として%sを受け入れると、彼らはあなたの投稿を購読できますが、ニュースフィードでそれらから更新を受け取ることはできません。"
+msgstr "%sを共有者として受け入れると、彼らはあなたの投稿を購読できますが、あなたのニュースフィードに彼らの投稿は表示されません。"
#: mod/notifications.php:237
msgid "Friend"
#: mod/photos.php:1074
msgid "Drop Album"
-msgstr "ã\83\89ã\83ã\83\83ã\83\97ã\82¢ã\83«ã\83\90ã\83 "
+msgstr "ã\82¢ã\83«ã\83\90ã\83 ã\82\92å\89\8aé\99¤"
#: mod/photos.php:1079
msgid "Show Newest First"
$a->strings["Edit groups"] = "グループを編集";
$a->strings["Item filed"] = "提出されたアイテム";
$a->strings["UnFollow"] = "フォロー解除";
-$a->strings["Drop Contact"] = "コンタクトをドロップ";
+$a->strings["Drop Contact"] = "コンタクトを削除";
$a->strings["Approve"] = "承認する";
$a->strings["Organisation"] = "組織";
$a->strings["News"] = "ニュース";
$a->strings["yes"] = "はい";
$a->strings["no"] = "いや";
$a->strings["Shall your connection be bidirectional or not?"] = "接続は双方向ですか?";
-$a->strings["Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed."] = "受け入れ%s友人などができます%sあなたの記事を購読すると、あなたもあなたのニュースフィードにそれらから更新を受信します。";
-$a->strings["Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "購読者として%sを受け入れると、投稿を購読できますが、ニュースフィードでそれらから更新を受け取ることはできません。";
-$a->strings["Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "共有者として%sを受け入れると、彼らはあなたの投稿を購読できますが、ニュースフィードでそれらから更新を受け取ることはできません。";
+$a->strings["Accepting %s as a friend allows %s to subscribe to your posts, and you will also receive updates from them in your news feed."] = "%s を友達として受け入れた場合、%s はあなたの投稿を購読できます。また、あなたのニュースフィードに彼らの投稿が表示されます。";
+$a->strings["Accepting %s as a subscriber allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "%sを購読者として受け入れると、彼らはあなたの投稿を購読できますが、あなたのニュースフィードに彼らの投稿は表示されません。";
+$a->strings["Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed."] = "%sを共有者として受け入れると、彼らはあなたの投稿を購読できますが、あなたのニュースフィードに彼らの投稿は表示されません。";
$a->strings["Friend"] = "ともだち";
$a->strings["Sharer"] = "共有者";
$a->strings["Subscriber"] = "加入者";
$a->strings["Do you really want to delete this photo album and all its photos?"] = "このフォトアルバムとそのすべての写真を本当に削除しますか?";
$a->strings["Delete Album"] = "アルバムを削除";
$a->strings["Edit Album"] = "アルバムを編集";
-$a->strings["Drop Album"] = "ã\83\89ã\83ã\83\83ã\83\97ã\82¢ã\83«ã\83\90ã\83 ";
+$a->strings["Drop Album"] = "ã\82¢ã\83«ã\83\90ã\83 ã\82\92å\89\8aé\99¤";
$a->strings["Show Newest First"] = "最新を最初に表示";
$a->strings["Show Oldest First"] = "最も古いものを最初に表示";
$a->strings["View Photo"] = "写真を見る";