Merge branch 'master' of git://github.com/friendika/friendika

This commit is contained in:
root 2011-01-04 14:21:43 +01:00
commit cbace1639e
8 changed files with 61 additions and 34 deletions

View file

@ -1,6 +1,7 @@
Options -Indexes
AddType application/x-java-archive .jar
AddType audio/ogg .oga
<FilesMatch "\.(out|log)$">
Deny from all

View file

@ -420,9 +420,19 @@ function get_atom_elements($feed,$item) {
$rawverb = $item->get_item_tags(NAMESPACE_ACTIVITY, 'verb');
// select between supported verbs
if($rawverb)
if($rawverb) {
$res['verb'] = unxmlify($rawverb[0]['data']);
}
// translate OStatus unfollow to activity streams if it happened to get selected
if((x($res,'verb')) && ($res['verb'] === 'http://ostatus.org/schema/1.0/unfollow'))
$res['verb'] = ACTIVITY_UNFOLLOW;
$rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'object');

View file

@ -44,6 +44,11 @@
$('#pause').html('');
}
}
if(event.keyCode == '36') {
event.preventDefault();
if(homebase)
document.location = homebase;
}
});
});

View file

@ -173,6 +173,9 @@ if($a->module_loaded) {
}
if(x($_SESSION,'visitor_home'))
$a->page['content'] .= '<script>var homebase="' . $_SESSION['visitor_home'] . '" ; </script>';
if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
}

View file

@ -73,6 +73,7 @@ function dfrn_poll_init(&$a) {
if((int) $xml->status == 1) {
$_SESSION['authenticated'] = 1;
$_SESSION['visitor_id'] = $r[0]['id'];
$_SESSION['visitor_home'] = $r[0]['url'];
notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL);
// Visitors get 1 day session.
$session_id = session_id();
@ -386,6 +387,7 @@ function dfrn_poll_content(&$a) {
if(((int) $xml->status == 0) && ($xml->challenge == $hash) && ($xml->sec == $sec)) {
$_SESSION['authenticated'] = 1;
$_SESSION['visitor_id'] = $r[0]['id'];
$_SESSION['visitor_home'] = $r[0]['url'];
notice( $r[0]['username'] . t(' welcomes ') . $r[0]['name'] . EOL);
// Visitors get 1 day session.
$session_id = session_id();

View file

@ -131,19 +131,18 @@ function item_post(&$a) {
/**
*
* If a photo was uploaded into the message using the ajax uploader,
* it can be seen by anybody. Set the permissions to match the message.
* Ideally this should be done when the photo was uploaded, but the permissions
* may not have been set at that time, and passing the permission arrays via
* javascript to the ajax upload is going to be a challenge.
* This is a compromise. Granted there is a window of time when the photo
* is public. You are welcome to suggest other ways to fix this.
* When a photo was uploaded into the message using the (profile wall) ajax
* uploader, The permissions are initially set to disallow anybody but the
* owner from seeing it. This is because the permissions may not yet have been
* set for the post. If it's private, the photo permissions should be set
* appropriately. But we didn't know the final permissions on the post until
* now. So now we'll look for links of uploaded messages that are in the
* post and set them to the same permissions as the post itself.
*
*/
$match = null;
if($private) {
if(preg_match_all("/\[img\](.+?)\[\/img\]/",$body,$match)) {
$images = $match[1];
if(count($images)) {
@ -165,7 +164,7 @@ function item_post(&$a) {
}
}
}
}
/**

View file

@ -76,7 +76,7 @@ function wall_upload_post(&$a) {
$smallest = 0;
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0 );
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, '<0>');
if(! $r) {
echo ( t('Image upload failed.') . EOL);
@ -85,14 +85,14 @@ function wall_upload_post(&$a) {
if($width > 640 || $height > 640) {
$ph->scaleImage(640);
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1 );
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, '<0>');
if($r)
$smallest = 1;
}
if($width > 320 || $height > 320) {
$ph->scaleImage(320);
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2 );
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, '<0>' );
if($r)
$smallest = 2;
}

View file

@ -80,10 +80,11 @@ $a->strings['Profile not found.'] = 'Profilo non trovato.';
$a->strings['Response from remote site was not understood.'] = 'La risposta dal sito remota non è stata capita.';
$a->strings['Unexpected response from remote site: '] = 'Risposta dal sito remoto inaspettata: ';
$a->strings["Confirmation completed successfully."] = "Conferma completata con successo.";
$a->strings['Remote site reported: '] = 'Il sito remoto riporsta: ';
$a->strings['Remote site reported: '] = 'Il sito remoto riporta: ';
$a->strings["Temporary failure. Please wait and try again."] = "Errore temporaneo. Attendi e riprova.";
$a->strings["Introduction failed or was revoked."] = "La presentazione &egrave; fallita o &egrave; stata revocata.";
$a->strings['Unable to set contact photo.'] = 'Impossibile impostare la foto del contatto.';
$a->strings['is now friends with'] = 'ora &egrave; amico di';
$a->strings['No user record found for '] = 'Nessun utente trovato per ';
$a->strings['Our site encryption key is apparently messed up.'] = 'La nostra chiave di criptazione del sito e\' apparentemente incasinata.';
$a->strings['Empty site URL was provided or URL could not be decrypted by us.'] = 'E\' stato fornito un indirizzo vuoto o non possiamo decriptare l\'indirizzo.';
@ -108,6 +109,9 @@ $a->strings["not found at the given location."] = "non trovato alla posizione da
$a->strings["Introduction complete."] = "Presentazione completa.";
$a->strings['Unrecoverable protocol error.'] = 'Errore di protocollo non recuperabile.';
$a->strings['Profile unavailable.'] = 'Profilo non disponibile.';
$a->strings['has received too many connection requests today.'] = 'ha ricevuto troppe connessioni oggi.';
$a->strings['Spam protection measures have been invoked.'] = 'Sono state attivate le misure di protezione contro lo spam.';
$a->strings['Friends are advised to please try again in 24 hours.'] = 'Gli amici sono pregati di riprovare tra 24 ore.';
$a->strings["Invalid locator"] = "Invalid locator";
$a->strings["Unable to resolve your name at the provided location."] = "Impossibile risolvere il tuo nome nella posizione indicata.";
$a->strings['You have already introduced yourself here.'] = 'Ti sei gi&agrave; presentato qui.';
@ -136,6 +140,7 @@ $a->strings['Global Directory'] = 'Elenco Globale';
$a->strings['Item not found.'] = 'Elemento non trovato.';
$a->strings['Private Message'] = 'Messaggio privato';
$a->strings['This is you'] = 'Questo sei tu';
$a->strings['View $name\'s profile'] = 'Guarda il profilo di $name';
$a->strings['Item has been removed.'] = 'L\'elemento &egrave; stato rimosso.';
$a->strings['The profile address specified does not provide adequate information.'] = 'L\'indirizzo del profilo specificato non fornisce adeguate informazioni';
$a->strings['Limited profile. This person will be unable to receive direct/personal notifications from you.'] = 'Profilo limitato. Questa persona non sara\' in grado di ricevere nofiche dirette/personali da te.';
@ -163,6 +168,7 @@ $a->strings['This is required. Please adjust the configuration file .htconfig.ph
$a->strings['The command line version of PHP on your system does not have "register_argc_argv" enabled.'] = 'La versione da riga di comando di PHP nel sistema non ha abilitato "register_argc_argv".';
$a->strings['This is required for message delivery to work.'] = 'Ci&oacute; &egrave; richiesto per far funzionare la consegna dei messaggi.';
$a->strings['Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys'] = 'Errore: la funzione "openssl_pkey_new" in questo sistema non &egrave; in grado di generare le chiavi di criptazione';
$a->strings['If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".'] = 'Se stai eseguendo friendika su windows, guarda "http://www.php.net/manual/en/openssl.installation.php".';
$a->strings['Error: Apache webserver mod-rewrite module is required but not installed.'] = 'Errore: il modulo mod-rewrite di Apache &egreve; richiesto ma non installato';
$a->strings['Error: libCURL PHP module required but not installed.'] = 'Errore: il modulo libCURL di PHP &egrave; richiesto ma non installato.';
$a->strings['Error: GD graphics PHP module with JPEG support required but not installed.'] = 'Errore: Il modulo GD graphics di PHP con supporto a JPEG &egrave; richiesto ma non installato.';
@ -223,6 +229,7 @@ $a->strings['Message not available.'] = 'Messaggio non disponibile.';
$a->strings['Delete message'] = 'Cancella messaggio';
$a->strings['Send Reply'] = 'Invia risposta';
$a->strings['No such group'] = 'Nessun gruppo';
$a->strings['Group is empty'] = 'Il gruppo &egrave; vuoto';
$a->strings['Group: '] = 'Gruppo: ';
$a->strings['Invalid request identifier.'] = 'Identificativo richiesta invalido.';
$a->strings['Discard'] = 'Scarta';
@ -344,8 +351,8 @@ $a->strings['Logged out.'] = 'Sei uscito.';
$a->strings['Unknown | Not categorised'] = 'Sconosciuto | non categorizzato';
$a->strings['Block immediately'] = 'Blocca immediatamente';
$a->strings['Shady, spammer, self-marketer'] = 'Shady, spammer, self-marketer';
$a->strings['Known to me, but no opinion'] = 'Lo conosco, ma non ho oppiniioni';
$a->strings['OK, probably harmless'] = 'OK, probabilmente innocuo';
$a->strings['Known to me, but no opinion'] = 'Lo conosco, ma non ho oppinioni';
$a->strings['OK, probably harmless'] = 'E\' ok, probabilmente innocuo';
$a->strings['Reputable, has my trust'] = 'Rispettabile, ha la mia fiducia';
$a->strings['Frequently'] = 'Frequentemente';
$a->strings['Hourly'] = 'Ogni ora';