Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x

This commit is contained in:
Brion Vibber 2010-02-26 12:33:36 -08:00
commit 517fd54b65
16 changed files with 332 additions and 131 deletions

View File

@ -85,7 +85,7 @@ abstract class AuthorizationPlugin extends Plugin
}
function onStartSetApiUser(&$user) {
return $this->onStartSetUser(&$user);
return $this->onStartSetUser($user);
}
function onStartHasRole($profile, $name, &$has_role) {

View File

@ -99,6 +99,10 @@ class ImageFile
if ($info[2] !== IMAGETYPE_GIF &&
$info[2] !== IMAGETYPE_JPEG &&
$info[2] !== IMAGETYPE_BMP &&
$info[2] !== IMAGETYPE_WBMP &&
$info[2] !== IMAGETYPE_XBM &&
$info[2] !== IMAGETYPE_XPM &&
$info[2] !== IMAGETYPE_PNG) {
@unlink($_FILES[$param]['tmp_name']);
@ -146,6 +150,18 @@ class ImageFile
case IMAGETYPE_PNG:
$image_src = imagecreatefrompng($this->filepath);
break;
case IMAGETYPE_BMP:
$image_src = imagecreatefrombmp($this->filepath);
break;
case IMAGETYPE_WBMP:
$image_src = imagecreatefromwbmp($this->filepath);
break;
case IMAGETYPE_XBM:
$image_src = imagecreatefromxbm($this->filepath);
break;
case IMAGETYPE_XPM:
$image_src = imagecreatefromxpm($this->filepath);
break;
default:
throw new Exception(_('Unknown file type'));
return;
@ -153,7 +169,7 @@ class ImageFile
$image_dest = imagecreatetruecolor($size, $size);
if ($this->type == IMAGETYPE_GIF || $this->type == IMAGETYPE_PNG) {
if ($this->type == IMAGETYPE_GIF || $this->type == IMAGETYPE_PNG || $this->type == IMAGETYPE_BMP) {
$transparent_idx = imagecolortransparent($image_src);
@ -176,6 +192,24 @@ class ImageFile
imagecopyresampled($image_dest, $image_src, 0, 0, $x, $y, $size, $size, $w, $h);
if($this->type == IMAGETYPE_BMP) {
//we don't want to save BMP... it's an inefficient, rare, antiquated format
//save png instead
$this->type = IMAGETYPE_PNG;
} else if($this->type == IMAGETYPE_WBMP) {
//we don't want to save WBMP... it's a rare format that we can't guarantee clients will support
//save png instead
$this->type = IMAGETYPE_PNG;
} else if($this->type == IMAGETYPE_XBM) {
//we don't want to save XBM... it's a rare format that we can't guarantee clients will support
//save png instead
$this->type = IMAGETYPE_PNG;
} else if($this->type == IMAGETYPE_XPM) {
//we don't want to save XPM... it's a rare format that we can't guarantee clients will support
//save png instead
$this->type = IMAGETYPE_PNG;
}
$outname = Avatar::filename($this->id,
image_type_to_extension($this->type),
$size,
@ -245,4 +279,101 @@ class ImageFile
return $num;
}
}
}
//PHP doesn't (as of 2/24/2010) have an imagecreatefrombmp so conditionally define one
if(!function_exists('imagecreatefrombmp')){
//taken shamelessly from http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214
function imagecreatefrombmp($p_sFile)
{
// Load the image into a string
$file = fopen($p_sFile,"rb");
$read = fread($file,10);
while(!feof($file)&&($read<>""))
$read .= fread($file,1024);
$temp = unpack("H*",$read);
$hex = $temp[1];
$header = substr($hex,0,108);
// Process the header
// Structure: http://www.fastgraph.com/help/bmp_header_format.html
if (substr($header,0,4)=="424d")
{
// Cut it in parts of 2 bytes
$header_parts = str_split($header,2);
// Get the width 4 bytes
$width = hexdec($header_parts[19].$header_parts[18]);
// Get the height 4 bytes
$height = hexdec($header_parts[23].$header_parts[22]);
// Unset the header params
unset($header_parts);
}
// Define starting X and Y
$x = 0;
$y = 1;
// Create newimage
$image = imagecreatetruecolor($width,$height);
// Grab the body from the image
$body = substr($hex,108);
// Calculate if padding at the end-line is needed
// Divided by two to keep overview.
// 1 byte = 2 HEX-chars
$body_size = (strlen($body)/2);
$header_size = ($width*$height);
// Use end-line padding? Only when needed
$usePadding = ($body_size>($header_size*3)+4);
// Using a for-loop with index-calculation instaid of str_split to avoid large memory consumption
// Calculate the next DWORD-position in the body
for ($i=0;$i<$body_size;$i+=3)
{
// Calculate line-ending and padding
if ($x>=$width)
{
// If padding needed, ignore image-padding
// Shift i to the ending of the current 32-bit-block
if ($usePadding)
$i += $width%4;
// Reset horizontal position
$x = 0;
// Raise the height-position (bottom-up)
$y++;
// Reached the image-height? Break the for-loop
if ($y>$height)
break;
}
// Calculation of the RGB-pixel (defined as BGR in image-data)
// Define $i_pos as absolute position in the body
$i_pos = $i*2;
$r = hexdec($body[$i_pos+4].$body[$i_pos+5]);
$g = hexdec($body[$i_pos+2].$body[$i_pos+3]);
$b = hexdec($body[$i_pos].$body[$i_pos+1]);
// Calculate and draw the pixel
$color = imagecolorallocate($image,$r,$g,$b);
imagesetpixel($image,$x,$height-$y,$color);
// Raise the horizontal position
$x++;
}
// Unset the body / free the memory
unset($body);
// Return image-object
return $image;
}
}

View File

@ -14,12 +14,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:50:48+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:55:22+0000\n"
"Language-Team: French\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: fr\n"
"X-Message-Group: out-statusnet\n"
@ -3984,17 +3984,17 @@ msgstr "Impossible denregistrer labonnement."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Cette action n'accepte que les requêtes de type POST."
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Fichier non trouvé."
msgstr "Profil non-trouvé."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "Vous nêtes pas abonné(e) à ce profil."
msgstr ""
"Vous ne pouvez pas vous abonner à un profil OMB 0.1 distant par cette "
"action."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4816,15 +4816,15 @@ msgstr "Avant"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Impossible de gérer le contenu distant pour le moment."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Impossible de gérer le contenu XML embarqué pour le moment."
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Impossible de gérer le contenu en Base64 embarqué pour le moment."
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5214,7 +5214,6 @@ msgstr[0] "Vous êtes membre de ce groupe :"
msgstr[1] "Vous êtes membre de ces groupes :"
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5267,6 +5266,7 @@ msgstr ""
"d <nickname> <text> - message direct à lutilisateur\n"
"get <nickname> - obtenir le dernier avis de lutilisateur\n"
"whois <nickname> - obtenir le profil de lutilisateur\n"
"lose <nickname> - forcer un utilisateur à arrêter de vous suivre\n"
"fav <nickname> - ajouter de dernier avis de lutilisateur comme favori\n"
"fav #<notice_id> - ajouter lavis correspondant à lidentifiant comme "
"favori\n"
@ -5500,23 +5500,23 @@ msgstr "Erreur système lors du transfert du fichier."
msgid "Not an image or corrupt file."
msgstr "Ceci nest pas une image, ou cest un fichier corrompu."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Format de fichier dimage non supporté."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Fichier perdu."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Type de fichier inconnu"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "Mo"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "Ko"

View File

@ -9,12 +9,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:51:18+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:56:05+0000\n"
"Language-Team: Macedonian\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: mk\n"
"X-Message-Group: out-statusnet\n"
@ -3957,17 +3957,16 @@ msgstr "Не можев да ја зачувам претплатата."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Ова дејство прифаќа само POST-барања"
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Нема таква податотека."
msgstr "Нема таков профил."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "Не сте претплатени на тој профил."
msgstr ""
"Не можете да се претплатите на OMB 0.1 оддалечен профил со ова дејство."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4786,15 +4785,15 @@ msgstr "Пред"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Сè уште не е поддржана обработката на оддалечена содржина."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Сè уште не е поддржана обработката на XML содржина."
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Сè уште не е достапна обработката на вметната Base64 содржина."
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5143,9 +5142,9 @@ msgid "This link is useable only once, and is good for only 2 minutes: %s"
msgstr "Оваа врска може да се употреби само еднаш, и трае само 2 минути: %s"
#: lib/command.php:692
#, fuzzy, php-format
#, php-format
msgid "Unsubscribed %s"
msgstr "Претплатата на %s е откажана"
msgstr "Откажана претплата на %s"
#: lib/command.php:709
msgid "You are not subscribed to anyone."
@ -5178,7 +5177,6 @@ msgstr[0] "Не ни го испративте тој профил."
msgstr[1] "Не ни го испративте тој профил."
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5459,23 +5457,23 @@ msgstr "Системска грешка при подигањето на под
msgid "Not an image or corrupt file."
msgstr "Не е слика или податотеката е пореметена."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Неподдржан фомрат на слики."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Податотеката е изгубена."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Непознат тип на податотека"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "МБ"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "кб"

View File

@ -10,12 +10,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:51:28+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:56:20+0000\n"
"Language-Team: Dutch\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: nl\n"
"X-Message-Group: out-statusnet\n"
@ -3981,17 +3981,17 @@ msgstr "Het was niet mogelijk het abonnement op te slaan."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Deze handeling accepteert alleen POST-verzoeken."
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Het bestand bestaat niet."
msgstr "Het profiel bestaat niet."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "U bent niet geabonneerd op dat profiel."
msgstr ""
"U kunt niet abonneren op een OMB 1.0 profiel van een andere omgeving via "
"deze handeling."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4820,15 +4820,15 @@ msgstr "Eerder"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Het is nog niet mogelijk inhoud uit andere omgevingen te verwerken."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Het is nog niet mogelijk ingebedde XML-inhoud te verwerken"
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Het is nog niet mogelijk ingebedde Base64-inhoud te verwerken"
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5182,9 +5182,9 @@ msgstr ""
"geldig: %s"
#: lib/command.php:692
#, fuzzy, php-format
#, php-format
msgid "Unsubscribed %s"
msgstr "Uw abonnement op %s is opgezegd"
msgstr "Het abonnement van %s is opgeheven"
#: lib/command.php:709
msgid "You are not subscribed to anyone."
@ -5217,7 +5217,6 @@ msgstr[0] "U bent lid van deze groep:"
msgstr[1] "U bent lid van deze groepen:"
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5270,6 +5269,7 @@ msgstr ""
"d <gebruiker> <tekst> - direct bericht aan gebruiker\n"
"get <gebruiker> - laatste mededeling van gebruiker opvragen\n"
"whois <gebruiker> - profielinformatie van gebruiker opvragen\n"
"lose <gebruiker> - zorgt ervoor dat de gebruiker u niet meer volgt\n"
"fav <gebruiker> - laatste mededeling van gebruiker op favorietenlijst "
"zetten\n"
"fav #<mededeling-ID> - mededelingen met aangegeven ID op favorietenlijst "
@ -5501,23 +5501,23 @@ msgstr "Er is een systeemfout opgetreden tijdens het uploaden van het bestand."
msgid "Not an image or corrupt file."
msgstr "Het bestand is geen afbeelding of het bestand is beschadigd."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Niet ondersteund beeldbestandsformaat."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Het bestand is zoekgeraakt."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Onbekend bestandstype"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "MB"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "kB"

View File

@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:51:31+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:56:23+0000\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
@ -19,7 +19,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pl\n"
"X-Message-Group: out-statusnet\n"
@ -1100,7 +1100,7 @@ msgstr "Zmień kolory"
#: actions/designadminpanel.php:510 lib/designsettings.php:191
msgid "Content"
msgstr "Zawartość"
msgstr "Treść"
#: actions/designadminpanel.php:523 lib/designsettings.php:204
msgid "Sidebar"
@ -2160,7 +2160,7 @@ msgstr "Nie można wysłać wiadomości do tego użytkownika."
#: actions/newmessage.php:144 actions/newnotice.php:136 lib/command.php:342
#: lib/command.php:475
msgid "No content!"
msgstr "Brak zawartości."
msgstr "Brak treści."
#: actions/newmessage.php:158
msgid "No recipient specified."
@ -2198,7 +2198,7 @@ msgid ""
"Search for notices on %%site.name%% by their contents. Separate search terms "
"by spaces; they must be 3 characters or more."
msgstr ""
"Wyszukaj wpisy na %%site.name%% według ich zawartości. Oddziel wyszukiwane "
"Wyszukaj wpisy na %%site.name%% według ich treści. Oddziel wyszukiwane "
"terminy spacjami. Terminy muszą mieć trzy znaki lub więcej."
#: actions/noticesearch.php:78
@ -3925,17 +3925,17 @@ msgstr "Nie można zapisać subskrypcji."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Ta czynność przyjmuje tylko żądania POST."
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Nie ma takiego pliku."
msgstr "Nie ma takiego profilu."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "Nie jesteś subskrybowany do tego profilu."
msgstr ""
"Nie można subskrybować zdalnego profilu profilu OMB 0.1 za pomocą tej "
"czynności."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4754,15 +4754,15 @@ msgstr "Wcześniej"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Nie można jeszcze obsługiwać zdalnej treści."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Nie można jeszcze obsługiwać zagnieżdżonej treści XML."
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Nie można jeszcze obsługiwać zagnieżdżonej treści Base64."
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5112,7 +5112,7 @@ msgstr ""
"minuty: %s."
#: lib/command.php:692
#, fuzzy, php-format
#, php-format
msgid "Unsubscribed %s"
msgstr "Usunięto subskrypcję użytkownika %s"
@ -5150,7 +5150,6 @@ msgstr[1] "Jesteś członkiem tych grup:"
msgstr[2] "Jesteś członkiem tych grup:"
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5195,14 +5194,15 @@ msgstr ""
"on - włącza powiadomienia\n"
"off - wyłącza powiadomienia\n"
"help - wyświetla tę pomoc\n"
"follow <pseudonim> - włącza obserwowanie użytkownika\n"
"follow <pseudonim> - subskrybuje użytkownika\n"
"groups - wyświetla listę grup, do których dołączyłeś\n"
"subscriptions - wyświetla listę obserwowanych osób\n"
"subscribers - wyświetla listę osób, które cię obserwują\n"
"leave <pseudonim> - rezygnuje z obserwowania użytkownika\n"
"leave <pseudonim> - usuwa subskrypcję użytkownika\n"
"d <pseudonim> <tekst> - bezpośrednia wiadomość do użytkownika\n"
"get <pseudonim> - zwraca ostatni wpis użytkownika\n"
"whois <pseudonim> - zwraca informacje o profilu użytkownika\n"
"lose <pseudonim> - wymusza użytkownika do zatrzymania obserwowania cię\n"
"fav <pseudonim> - dodaje ostatni wpis użytkownika jako \"ulubiony\"\n"
"fav #<identyfikator_wpisu> - dodaje wpis z podanym identyfikatorem jako "
"\"ulubiony\"\n"
@ -5433,23 +5433,23 @@ msgstr "Błąd systemu podczas wysyłania pliku."
msgid "Not an image or corrupt file."
msgstr "To nie jest obraz lub lub plik jest uszkodzony."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Nieobsługiwany format pliku obrazu."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Utracono plik."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Nieznany typ pliku"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "MB"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "KB"

View File

@ -12,12 +12,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:51:41+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:56:32+0000\n"
"Language-Team: Russian\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ru\n"
"X-Message-Group: out-statusnet\n"
@ -3948,17 +3948,17 @@ msgstr "Не удаётся сохранить подписку."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Это действие принимает только POST-запросы."
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Нет такого файла."
msgstr "Нет такого профиля."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "Вы не подписаны на этот профиль."
msgstr ""
"Вы не можете подписаться на удалённый профиль OMB 0.1 с помощью этого "
"действия."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4774,15 +4774,15 @@ msgstr "Туда"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Пока ещё нельзя обрабатывать удалённое содержимое."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Пока ещё нельзя обрабатывать встроенный XML."
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Пока ещё нельзя обрабатывать встроенное содержание Base64."
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5130,9 +5130,9 @@ msgid "This link is useable only once, and is good for only 2 minutes: %s"
msgstr "Эта ссылка действительна только один раз в течение 2 минут: %s"
#: lib/command.php:692
#, fuzzy, php-format
#, php-format
msgid "Unsubscribed %s"
msgstr "Отписано от %s"
msgstr "Отписано %s"
#: lib/command.php:709
msgid "You are not subscribed to anyone."
@ -5168,7 +5168,6 @@ msgstr[1] "Вы являетесь участником следующих гр
msgstr[2] "Вы являетесь участником следующих групп:"
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5221,6 +5220,7 @@ msgstr ""
"d <nickname> <text> — прямое сообщение пользователю\n"
"get <nickname> — получить последнюю запись от пользователя\n"
"whois <nickname> — получить информацию из профиля пользователя\n"
"lose <nickname> — отменить подписку пользователя на вас\n"
"fav <nickname> — добавить последнюю запись пользователя в число любимых\n"
"fav #<notice_id> — добавить запись с заданным id в число любимых\n"
"repeat #<notice_id> — повторить уведомление с заданным id\n"
@ -5449,23 +5449,23 @@ msgstr "Системная ошибка при загрузке файла."
msgid "Not an image or corrupt file."
msgstr "Не является изображением или повреждённый файл."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Неподдерживаемый формат файла изображения."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Потерян файл."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Неподдерживаемый тип файла"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "МБ"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "КБ"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -5095,23 +5095,23 @@ msgstr ""
msgid "Not an image or corrupt file."
msgstr ""
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr ""
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr ""
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr ""
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr ""
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr ""

View File

@ -10,12 +10,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-02-24 23:49+0000\n"
"PO-Revision-Date: 2010-02-24 23:51:53+0000\n"
"POT-Creation-Date: 2010-02-25 11:54+0000\n"
"PO-Revision-Date: 2010-02-25 11:56:43+0000\n"
"Language-Team: Ukrainian\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.17alpha (r62925); Translate extension (2010-01-16)\n"
"X-Generator: MediaWiki 1.17alpha (r62948); Translate extension (2010-01-16)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: uk\n"
"X-Message-Group: out-statusnet\n"
@ -3934,17 +3934,15 @@ msgstr "Не вдалося зберегти підписку."
#: actions/subscribe.php:77
msgid "This action only accepts POST requests."
msgstr ""
msgstr "Ця дія приймає лише запити POST."
#: actions/subscribe.php:107
#, fuzzy
msgid "No such profile."
msgstr "Такого файлу немає."
msgstr "Немає такого профілю."
#: actions/subscribe.php:117
#, fuzzy
msgid "You cannot subscribe to an OMB 0.1 remote profile with this action."
msgstr "Ви не підписані до цього профілю."
msgstr "Цією дією Ви не зможете підписатися до віддаленого профілю OMB 0.1."
#: actions/subscribe.php:145
msgid "Subscribed"
@ -4757,15 +4755,15 @@ msgstr "Назад"
#: lib/activity.php:382
msgid "Can't handle remote content yet."
msgstr ""
msgstr "Поки що не можу обробити віддалений контент."
#: lib/activity.php:410
msgid "Can't handle embedded XML content yet."
msgstr ""
msgstr "Поки що не можу обробити вбудований XML контент."
#: lib/activity.php:414
msgid "Can't handle embedded Base64 content yet."
msgstr ""
msgstr "Поки що не можу обробити вбудований контент Base64."
#: lib/adminpanelaction.php:96
msgid "You cannot make changes to this site."
@ -5113,9 +5111,9 @@ msgstr ""
"Це посилання можна використати лише раз, воно дійсне протягом 2 хвилин: %s"
#: lib/command.php:692
#, fuzzy, php-format
#, php-format
msgid "Unsubscribed %s"
msgstr "Відписано від %s"
msgstr "Відписано %s"
#: lib/command.php:709
msgid "You are not subscribed to anyone."
@ -5151,7 +5149,6 @@ msgstr[1] "Ви є учасником таких груп:"
msgstr[2] "Ви є учасником таких груп:"
#: lib/command.php:769
#, fuzzy
msgid ""
"Commands:\n"
"on - turn on notifications\n"
@ -5429,23 +5426,23 @@ msgstr "Система відповіла помилкою при заванта
msgid "Not an image or corrupt file."
msgstr "Це не зображення, або файл зіпсовано."
#: lib/imagefile.php:105
#: lib/imagefile.php:109
msgid "Unsupported image file format."
msgstr "Формат зображення не підтримується."
#: lib/imagefile.php:118
#: lib/imagefile.php:122
msgid "Lost our file."
msgstr "Файл втрачено."
#: lib/imagefile.php:150 lib/imagefile.php:197
#: lib/imagefile.php:166 lib/imagefile.php:231
msgid "Unknown file type"
msgstr "Тип файлу не підтримується"
#: lib/imagefile.php:217
#: lib/imagefile.php:251
msgid "MB"
msgstr "Мб"
#: lib/imagefile.php:219
#: lib/imagefile.php:253
msgid "kB"
msgstr "кб"

View File

@ -199,8 +199,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
return false;
throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
}
if($config == null) $this->default_ldap=$ldap;

View File

@ -9,7 +9,10 @@ to the bottom of your config.php
Settings
========
provider_name*: a unique name for this authentication provider.
provider_name*: This is a identifier designated to the connection.
It's how StatusNet will refer to the authentication source.
For the most part, any name can be used, so long as each authentication source has a different identifier.
In most cases there will be only one authentication source used.
authoritative (false): Set to true if LDAP's responses are authoritative
(if authorative and LDAP fails, no other password checking will be done).
autoregistration (false): Set to true if users should be automatically created

View File

@ -167,7 +167,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
return false;
}
if($config == null) $this->default_ldap=$ldap;
@ -185,6 +185,9 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
if($ldap==null) {
$ldap = $this->ldap_get_connection();
}
if(! $ldap) {
throw new Exception("Could not connect to LDAP");
}
$filter = Net_LDAP2_Filter::create($this->attributes['username'], 'equals', $username);
$options = array(
'attributes' => $attributes

View File

@ -11,7 +11,10 @@ You *cannot* use this plugin without the LDAP Authentication plugin
Settings
========
provider_name*: name of the LDAP authentication provider that this plugin works with.
provider_name*: This is a identifier designated to the connection.
It's how StatusNet will refer to the authentication source.
For the most part, any name can be used, so long as each authentication source has a different identifier.
In most cases there will be only one authentication source used.
authoritative (false): should this plugin be authoritative for
authorization?
uniqueMember_attribute ('uniqueMember')*: the attribute of a group

View File

@ -8,7 +8,10 @@ add "addPlugin('reverseUsernameAuthentication', array('setting'=>'value', 'setti
Settings
========
provider_name*: a unique name for this authentication provider.
provider_name*: This is a identifier designated to the connection.
It's how StatusNet will refer to the authentication source.
For the most part, any name can be used, so long as each authentication source has a different identifier.
In most cases there will be only one authentication source used.
password_changeable*: must be set to false. This plugin does not support changing passwords.
authoritative (false): Set to true if this plugin's responses are authoritative (meaning if this fails, do check any other plugins or the internal password database).
autoregistration (false): Set to true if users should be automatically created when they attempt to login.

View File

@ -0,0 +1,57 @@
<?php
/**
* StatusNet, the distributed open-source microblogging tool
*
* Plugin to enable Twitter-like "tab-space" pattern for a user to submit a notice
*
* PHP version 5
*
* LICENCE: This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Plugin
* @package StatusNet
* @author Craig Andrews <candrews@integralblue.com>
* @author Paul Irish <paul.irish@isobar.net>
* @copyright 2009 Craig Andrews http://candrews.integralblue.com
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
class TabFocusPlugin extends Plugin
{
function __construct()
{
parent::__construct();
}
function onEndShowScripts($action)
{
$action->script('plugins/TabFocus/tabfocus.js');
}
function onPluginVersion(&$versions)
{
$versions[] = array('name' => 'TabFocus',
'version' => STATUSNET_VERSION,
'author' => 'Craig Andrews and Paul Irish',
'homepage' => 'http://status.net/wiki/Plugin:TabFocus',
'rawdescription' =>
_m('TabFocus changes the notice form behavior so that, while in the text area, pressing the tab key focuses the "Send" button, matching the behavor of Twitter.'));
return true;
}
}

View File

@ -0,0 +1,7 @@
jQuery(function($){
$('#notice_data-text').bind('keydown',function(e){
if (e.which==9) {
setTimeout(function(){ $('#notice_action-submit').focus(); },15);
}
});
});