Merge remote-tracking branch 'upstream/develop' into 1602-mixed-content
This commit is contained in:
commit
2eb461ed2c
4 changed files with 65 additions and 59 deletions
|
@ -161,10 +161,7 @@
|
|||
if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
logger('API_login: ' . print_r($_SERVER,true), LOGGER_DEBUG);
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
die((api_error($a, 'json', "This api requires login")));
|
||||
|
||||
//die('This api requires login');
|
||||
throw new UnauthorizedException("This API requires login");
|
||||
}
|
||||
|
||||
$user = $_SERVER['PHP_AUTH_USER'];
|
||||
|
@ -216,8 +213,9 @@
|
|||
if((! $record) || (! count($record))) {
|
||||
logger('API_login failure: ' . print_r($_SERVER,true), LOGGER_DEBUG);
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
die('This api requires login');
|
||||
#header('HTTP/1.0 401 Unauthorized');
|
||||
#die('This api requires login');
|
||||
throw new UnauthorizedException("This API requires login");
|
||||
}
|
||||
|
||||
authenticate_success($record); $_SESSION["allow_api"] = true;
|
||||
|
@ -331,7 +329,8 @@
|
|||
*
|
||||
* @param Api $a
|
||||
* @param string $type Return type (xml, json, rss, as)
|
||||
* @param string $error Error message
|
||||
* @param HTTPException $error Error object
|
||||
* @return strin error message formatted as $type
|
||||
*/
|
||||
function api_error(&$a, $type, $e) {
|
||||
$error = ($e->getMessage()!==""?$e->getMessage():$e->httpdesc);
|
||||
|
@ -903,7 +902,8 @@
|
|||
|
||||
if ($posts_day > $throttle_day) {
|
||||
logger('Daily posting limit reached for user '.api_user(), LOGGER_DEBUG);
|
||||
die(api_error($a, $type, sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
|
||||
#die(api_error($a, $type, sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day)));
|
||||
throw new TooManyRequestsException(sprintf(t("Daily posting limit of %d posts reached. The post was rejected."), $throttle_day));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -922,7 +922,9 @@
|
|||
|
||||
if ($posts_week > $throttle_week) {
|
||||
logger('Weekly posting limit reached for user '.api_user(), LOGGER_DEBUG);
|
||||
die(api_error($a, $type, sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
|
||||
#die(api_error($a, $type, sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week)));
|
||||
throw new TooManyRequestsException(sprintf(t("Weekly posting limit of %d posts reached. The post was rejected."), $throttle_week));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -941,7 +943,8 @@
|
|||
|
||||
if ($posts_month > $throttle_month) {
|
||||
logger('Monthly posting limit reached for user '.api_user(), LOGGER_DEBUG);
|
||||
die(api_error($a, $type, sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
|
||||
#die(api_error($a, $type, sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month)));
|
||||
throw new TooManyRequestsException(sprintf(t("Monthly posting limit of %d posts reached. The post was rejected."), $throttle_month));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1809,7 +1812,7 @@
|
|||
$action_argv_id=2;
|
||||
if ($a->argv[1]=="1.1") $action_argv_id=3;
|
||||
|
||||
if ($a->argc<=$action_argv_id) die(api_error($a, $type, t("Invalid request.")));
|
||||
if ($a->argc<=$action_argv_id) throw new BadRequestException("Invalid request.");
|
||||
$action = str_replace(".".$type,"",$a->argv[$action_argv_id]);
|
||||
if ($a->argc==$action_argv_id+2) {
|
||||
$itemid = intval($a->argv[$action_argv_id+1]);
|
||||
|
|
|
@ -438,6 +438,7 @@ function poco_last_updated($profile, $force = false) {
|
|||
|
||||
$noscrape = json_decode($noscraperet["body"], true);
|
||||
|
||||
if (is_array($noscrape)) {
|
||||
$contact = array("url" => $profile,
|
||||
"network" => $server[0]["network"],
|
||||
"generation" => $gcontacts[0]["generation"]);
|
||||
|
@ -473,12 +474,14 @@ function poco_last_updated($profile, $force = false) {
|
|||
unset($noscrape["dfrn-poll"]);
|
||||
|
||||
$contact = array_merge($contact, $noscrape);
|
||||
|
||||
update_gcontact($contact);
|
||||
|
||||
return $noscrape["updated"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we only can poll the feed, then we only do this once a while
|
||||
if (!$force AND !poco_do_update($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"]))
|
||||
|
|
|
@ -16,7 +16,7 @@ msgstr ""
|
|||
"Project-Id-Version: friendica\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-01-24 06:49+0100\n"
|
||||
"PO-Revision-Date: 2016-01-30 08:43+0000\n"
|
||||
"PO-Revision-Date: 2016-02-16 10:29+0000\n"
|
||||
"Last-Translator: Sandro Santilli <strk@keybit.net>\n"
|
||||
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -41,8 +41,8 @@ msgstr "Forum"
|
|||
#, php-format
|
||||
msgid "%d contact edited."
|
||||
msgid_plural "%d contacts edited."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "%d contatto modificato."
|
||||
msgstr[1] "%d contatti modificati"
|
||||
|
||||
#: mod/contacts.php:159 mod/contacts.php:383
|
||||
msgid "Could not access contact record."
|
||||
|
@ -887,7 +887,7 @@ msgstr "Rimuovi"
|
|||
|
||||
#: mod/ostatus_subscribe.php:14
|
||||
msgid "Subscribing to OStatus contacts"
|
||||
msgstr ""
|
||||
msgstr "Iscrizione a contatti OStatus"
|
||||
|
||||
#: mod/ostatus_subscribe.php:25
|
||||
msgid "No contact provided."
|
||||
|
@ -1943,7 +1943,7 @@ msgstr "Ispeziona Coda di invio"
|
|||
|
||||
#: mod/admin.php:163 mod/admin.php:354
|
||||
msgid "Federation Statistics"
|
||||
msgstr ""
|
||||
msgstr "Statistiche sulla Federazione"
|
||||
|
||||
#: mod/admin.php:177 mod/admin.php:188 mod/admin.php:1792
|
||||
msgid "Logs"
|
||||
|
@ -1951,7 +1951,7 @@ msgstr "Log"
|
|||
|
||||
#: mod/admin.php:178 mod/admin.php:1859
|
||||
msgid "View Logs"
|
||||
msgstr ""
|
||||
msgstr "Vedi i log"
|
||||
|
||||
#: mod/admin.php:179
|
||||
msgid "probe address"
|
||||
|
@ -1982,7 +1982,7 @@ msgid ""
|
|||
"This page offers you some numbers to the known part of the federated social "
|
||||
"network your Friendica node is part of. These numbers are not complete but "
|
||||
"only reflect the part of the network your node is aware of."
|
||||
msgstr ""
|
||||
msgstr "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza."
|
||||
|
||||
#: mod/admin.php:348
|
||||
msgid ""
|
||||
|
|
|
@ -8,8 +8,8 @@ function string_plural_select_it($n){
|
|||
$a->strings["Network:"] = "Rete:";
|
||||
$a->strings["Forum"] = "Forum";
|
||||
$a->strings["%d contact edited."] = array(
|
||||
0 => "",
|
||||
1 => "",
|
||||
0 => "%d contatto modificato.",
|
||||
1 => "%d contatti modificati",
|
||||
);
|
||||
$a->strings["Could not access contact record."] = "Non è possibile accedere al contatto.";
|
||||
$a->strings["Could not locate selected profile."] = "Non riesco a trovare il profilo selezionato.";
|
||||
|
@ -186,7 +186,7 @@ $a->strings["Tag removed"] = "Tag rimosso";
|
|||
$a->strings["Remove Item Tag"] = "Rimuovi il tag";
|
||||
$a->strings["Select a tag to remove: "] = "Seleziona un tag da rimuovere: ";
|
||||
$a->strings["Remove"] = "Rimuovi";
|
||||
$a->strings["Subscribing to OStatus contacts"] = "";
|
||||
$a->strings["Subscribing to OStatus contacts"] = "Iscrizione a contatti OStatus";
|
||||
$a->strings["No contact provided."] = "Nessun contatto disponibile.";
|
||||
$a->strings["Couldn't fetch information for contact."] = "Non è stato possibile recuperare le informazioni del contatto.";
|
||||
$a->strings["Couldn't fetch friends for contact."] = "Non è stato possibile recuperare gli amici del contatto.";
|
||||
|
@ -419,16 +419,16 @@ $a->strings["Themes"] = "Temi";
|
|||
$a->strings["Additional features"] = "Funzionalità aggiuntive";
|
||||
$a->strings["DB updates"] = "Aggiornamenti Database";
|
||||
$a->strings["Inspect Queue"] = "Ispeziona Coda di invio";
|
||||
$a->strings["Federation Statistics"] = "";
|
||||
$a->strings["Federation Statistics"] = "Statistiche sulla Federazione";
|
||||
$a->strings["Logs"] = "Log";
|
||||
$a->strings["View Logs"] = "";
|
||||
$a->strings["View Logs"] = "Vedi i log";
|
||||
$a->strings["probe address"] = "controlla indirizzo";
|
||||
$a->strings["check webfinger"] = "verifica webfinger";
|
||||
$a->strings["Admin"] = "Amministrazione";
|
||||
$a->strings["Plugin Features"] = "Impostazioni Plugins";
|
||||
$a->strings["diagnostics"] = "diagnostiche";
|
||||
$a->strings["User registrations waiting for confirmation"] = "Utenti registrati in attesa di conferma";
|
||||
$a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = "";
|
||||
$a->strings["This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of."] = "Questa pagina offre alcuni numeri riguardo la porzione del social network federato di cui il tuo nodo Friendica fa parte. Questi numeri non sono completi ma riflettono esclusivamente la porzione di rete di cui il tuo nodo e' a conoscenza.";
|
||||
$a->strings["The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here."] = "";
|
||||
$a->strings["Administration"] = "Amministrazione";
|
||||
$a->strings["Currently this node is aware of %d nodes from the following platforms:"] = "";
|
||||
|
|
Loading…
Reference in a new issue