We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 085406ea authored by Sarven Capadisli's avatar Sarven Capadisli

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

parents acc48289 fba840ed
......@@ -56,6 +56,22 @@ class Inbox extends Memcached_DataObject
*/
static function initialize($user_id)
{
$inbox = Inbox::fromNoticeInbox($user_id);
unset($inbox->fake);
$result = $inbox->insert();
if (!$result) {
common_log_db_error($inbox, 'INSERT', __FILE__);
return null;
}
return $inbox;
}
static function fromNoticeInbox($user_id)
{
$ids = array();
......@@ -80,13 +96,7 @@ class Inbox extends Memcached_DataObject
$inbox->user_id = $user_id;
$inbox->notice_ids = call_user_func_array('pack', array_merge(array('N*'), $ids));
$result = $inbox->insert();
if (!$result) {
common_log_db_error($inbox, 'INSERT', __FILE__);
return null;
}
$inbox->fake = true;
return $inbox;
}
......@@ -95,7 +105,7 @@ class Inbox extends Memcached_DataObject
{
$inbox = Inbox::staticGet('user_id', $user_id);
if (empty($inbox)) {
if (empty($inbox) || $inbox->fake) {
$inbox = Inbox::initialize($user_id);
}
......@@ -133,9 +143,11 @@ class Inbox extends Memcached_DataObject
$inbox = Inbox::staticGet('user_id', $user_id);
if (empty($inbox)) {
$inbox = Inbox::initialize($user_id);
$inbox = Inbox::fromNoticeInbox($user_id);
if (empty($inbox)) {
return array();
} else {
$inbox->encache();
}
}
......
create table user_location_prefs (
user_id integer not null comment 'user who has the preference' references user (id),
share_location tinyint default 1 comment 'Whether to share location data',
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified',
constraint primary key (user_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
create table inbox (
user_id integer not null comment 'user receiving the notice' references user (id),
notice_ids blob comment 'packed list of notice ids',
constraint primary key (user_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
......@@ -150,7 +150,7 @@ function checkMirror($action_obj, $args)
{
global $config;
static $alwaysRW = array('session', 'remember_me', 'inbox');
static $alwaysRW = array('session', 'remember_me');
if (common_config('db', 'mirror') && $action_obj->isReadOnly($args)) {
if (is_array(common_config('db', 'mirror'))) {
......
......@@ -22,7 +22,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
//exit with 200 response, if this is checking fancy from the installer
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
define('STATUSNET_VERSION', '0.9.0rc2');
define('STATUSNET_VERSION', '0.9.0rc3');
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
define('STATUSNET_CODENAME', 'Stand');
......@@ -136,7 +136,6 @@ try {
exit;
}
// XXX: other formats here
define('NICKNAME_FMT', VALIDATE_NUM.VALIDATE_ALPHA_LOWER);
......@@ -99,8 +99,8 @@ class DBQueueManager extends QueueManager
$this->_fail($notice, $queue);
}
} else {
$this->_log(LOG_INFO, "[$queue:notice $notice->id] No handler for queue $queue");
$this->_fail($notice, $queue);
$this->_log(LOG_INFO, "[$queue:notice $notice->id] No handler for queue $queue; discarding.");
$this->_done($notice, $queue);
}
return true;
}
......
......@@ -173,10 +173,8 @@ function common_ensure_session()
}
if (array_key_exists(session_name(), $_GET)) {
$id = $_GET[session_name()];
common_log(LOG_INFO, 'Setting session from GET parameter: '.$id);
} else if (array_key_exists(session_name(), $_COOKIE)) {
$id = $_COOKIE[session_name()];
common_log(LOG_INFO, 'Setting session from COOKIE: '.$id);
}
if (isset($id)) {
session_id($id);
......
......@@ -9,12 +9,12 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-01-11 23:25+0000\n"
"PO-Revision-Date: 2010-01-11 23:26:04+0000\n"
"POT-Creation-Date: 2010-01-13 22:04+0000\n"
"PO-Revision-Date: 2010-01-13 22:04:40+0000\n"
"Language-Team: Arabic\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: MediaWiki 1.16alpha (r60950); Translate extension (2010-01-04)\n"
"X-Generator: MediaWiki 1.16alpha (r61027); Translate extension (2010-01-04)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ar\n"
"X-Message-Group: out-statusnet\n"
......@@ -45,10 +45,10 @@ msgstr "لا صفحة كهذه"
#: actions/replies.php:73 actions/repliesrss.php:38
#: actions/showfavorites.php:105 actions/userbyid.php:74
#: actions/usergroups.php:91 actions/userrss.php:38 actions/xrds.php:71
#: lib/command.php:163 lib/command.php:311 lib/command.php:364
#: lib/command.php:410 lib/command.php:471 lib/command.php:527
#: lib/command.php:163 lib/command.php:302 lib/command.php:355
#: lib/command.php:401 lib/command.php:462 lib/command.php:518
#: lib/galleryaction.php:59 lib/mailbox.php:82 lib/profileaction.php:77
#: lib/subs.php:34 lib/subs.php:116
#: lib/subs.php:34 lib/subs.php:125
msgid "No such user."
msgstr "لا مستخدم كهذا."
......@@ -379,7 +379,7 @@ msgstr ""
msgid "You have been blocked from that group by the admin."
msgstr ""
#: actions/apigroupjoin.php:138 actions/joingroup.php:128
#: actions/apigroupjoin.php:138 actions/joingroup.php:124
#, fuzzy, php-format
msgid "Could not join user %1$s to group %2$s."
msgstr "تعذّر إنشاء المجموعة."
......@@ -388,7 +388,7 @@ msgstr "تعذّر إنشاء المجموعة."
msgid "You are not a member of this group."
msgstr ""
#: actions/apigroupleave.php:124 actions/leavegroup.php:127
#: actions/apigroupleave.php:124 actions/leavegroup.php:119
#, fuzzy, php-format
msgid "Could not remove user %1$s from group %2$s."
msgstr "تعذّر إنشاء المجموعة."
......@@ -678,7 +678,7 @@ msgstr "فشل حفظ معلومات المنع."
#: actions/grouplogo.php:99 actions/groupmembers.php:83
#: actions/grouprss.php:98 actions/groupunblock.php:86
#: actions/joingroup.php:83 actions/leavegroup.php:83 actions/makeadmin.php:86
#: actions/showgroup.php:137 lib/command.php:212 lib/command.php:263
#: actions/showgroup.php:137 lib/command.php:212 lib/command.php:260
msgid "No such group."
msgstr "لا مجموعة كهذه."
......@@ -1616,7 +1616,7 @@ msgstr "دعوة مستخدمين جدد"
msgid "You are already subscribed to these users:"
msgstr ""
#: actions/invite.php:131 actions/invite.php:139 lib/command.php:315
#: actions/invite.php:131 actions/invite.php:139 lib/command.php:306
#, php-format
msgid "%1$s (%2$s)"
msgstr "%1$s (%2$s)"
......@@ -1657,7 +1657,7 @@ msgstr "رسالة شخصية"
msgid "Optionally add a personal message to the invitation."
msgstr ""
#: actions/invite.php:197 lib/messageform.php:178 lib/noticeform.php:234
#: actions/invite.php:197 lib/messageform.php:178 lib/noticeform.php:237
msgid "Send"
msgstr "أرسل"
......@@ -1701,7 +1701,7 @@ msgstr ""
msgid "You must be logged in to join a group."
msgstr ""
#: actions/joingroup.php:135
#: actions/joingroup.php:131
#, fuzzy, php-format
msgid "%1$s joined group %2$s"
msgstr "%s انضم إلى مجموعة %s"
......@@ -1710,15 +1710,11 @@ msgstr "%s انضم إلى مجموعة %s"
msgid "You must be logged in to leave a group."
msgstr ""
#: actions/leavegroup.php:90 lib/command.php:268
#: actions/leavegroup.php:90 lib/command.php:265
msgid "You are not a member of that group."
msgstr "لست عضوا في تلك المجموعة."
#: actions/leavegroup.php:119 lib/command.php:278
msgid "Could not find membership record."
msgstr ""
#: actions/leavegroup.php:134
#: actions/leavegroup.php:127
#, fuzzy, php-format
msgid "%1$s left group %2$s"
msgstr "%s انضم إلى مجموعة %s"
......@@ -1815,12 +1811,12 @@ msgstr "استخدم هذا النموذج لإنشاء مجموعة جديدة.
msgid "New message"
msgstr "رسالة جديدة"
#: actions/newmessage.php:121 actions/newmessage.php:161 lib/command.php:367
#: actions/newmessage.php:121 actions/newmessage.php:161 lib/command.php:358
msgid "You can't send a message to this user."
msgstr ""
#: actions/newmessage.php:144 actions/newnotice.php:136 lib/command.php:351
#: lib/command.php:484
#: actions/newmessage.php:144 actions/newnotice.php:136 lib/command.php:342
#: lib/command.php:475
msgid "No content!"
msgstr "لا محتوى!"
......@@ -1828,7 +1824,7 @@ msgstr "لا محتوى!"
msgid "No recipient specified."
msgstr "لا مستلم حُدّد."
#: actions/newmessage.php:164 lib/command.php:370
#: actions/newmessage.php:164 lib/command.php:361
msgid ""
"Don't send a message to yourself; just say it to yourself quietly instead."
msgstr ""
......@@ -3820,8 +3816,23 @@ msgstr ""
msgid "A file this large would exceed your monthly quota of %d bytes."
msgstr ""
#: classes/Group_member.php:41
#, fuzzy
msgid "Group join failed."
msgstr "ملف المجموعة الشخصي"
#: classes/Group_member.php:53
#, fuzzy
msgid "Not part of group."
msgstr "تعذر تحديث المجموعة."
#: classes/Group_member.php:60
#, fuzzy
msgid "Group leave failed."
msgstr "ملف المجموعة الشخصي"
#: classes/Login_token.php:76
#, fuzzy, php-format
#, php-format
msgid "Could not create login token for %s"
msgstr "لم يمكن إنشاء توكن الولوج ل%s"
......@@ -3837,49 +3848,49 @@ msgstr "تعذّر إدراج الرسالة."
msgid "Could not update message with new URI."
msgstr ""
#: classes/Notice.php:172
#: classes/Notice.php:171
#, php-format
msgid "DB error inserting hashtag: %s"
msgstr ""
#: classes/Notice.php:226
#: classes/Notice.php:225
msgid "Problem saving notice. Too long."
msgstr "مشكلة في حفظ الإشعار. طويل جدًا."
#: classes/Notice.php:230
#: classes/Notice.php:229
msgid "Problem saving notice. Unknown user."
msgstr "مشكلة في حفظ الإشعار. مستخدم غير معروف."
#: classes/Notice.php:235
#: classes/Notice.php:234
msgid ""
"Too many notices too fast; take a breather and post again in a few minutes."
msgstr ""
#: classes/Notice.php:241
#: classes/Notice.php:240
msgid ""
"Too many duplicate messages too quickly; take a breather and post again in a "
"few minutes."
msgstr ""
#: classes/Notice.php:247
#: classes/Notice.php:246
msgid "You are banned from posting notices on this site."
msgstr ""
#: classes/Notice.php:309 classes/Notice.php:334
#: classes/Notice.php:305 classes/Notice.php:330
msgid "Problem saving notice."
msgstr "مشكلة أثناء حفظ الإشعار."
#: classes/Notice.php:1034
#: classes/Notice.php:1052
#, php-format
msgid "DB error inserting reply: %s"
msgstr ""
#: classes/Notice.php:1359
#: classes/Notice.php:1423
#, php-format
msgid "RT @%1$s %2$s"
msgstr "آر تي @%1$s %2$s"
#: classes/User.php:368
#: classes/User.php:382
#, php-format
msgid "Welcome to %1$s, @%2$s!"
msgstr "أهلا بكم في %1$s يا @%2$s!"
......@@ -4207,14 +4218,13 @@ msgstr ""
"المشتركون: %2$s\n"
"الإشعارات: %3$s"
#: lib/command.php:152 lib/command.php:399 lib/command.php:460
#: lib/command.php:152 lib/command.php:390 lib/command.php:451
#, fuzzy
msgid "Notice with that id does not exist"
msgstr "لا ملف بهذه الهوية."
#: lib/command.php:168 lib/command.php:415 lib/command.php:476
#: lib/command.php:532
#, fuzzy
#: lib/command.php:168 lib/command.php:406 lib/command.php:467
#: lib/command.php:523
msgid "User has no last notice"
msgstr "ليس للمستخدم إشعار أخير"
......@@ -4227,145 +4237,144 @@ msgstr ""
msgid "You are already a member of that group"
msgstr "لست عضوا في تلك المجموعة."
#: lib/command.php:234
#: lib/command.php:231
#, fuzzy, php-format
msgid "Could not join user %s to group %s"
msgstr "تعذّر إنشاء المجموعة."
#: lib/command.php:239
#, fuzzy, php-format
#: lib/command.php:236
#, php-format
msgid "%s joined group %s"
msgstr "%s انضم إلى مجموعة %s"
#: lib/command.php:284
#: lib/command.php:275
#, fuzzy, php-format
msgid "Could not remove user %s to group %s"
msgstr "تعذّر إنشاء المجموعة."
#: lib/command.php:289
#: lib/command.php:280
#, fuzzy, php-format
msgid "%s left group %s"
msgstr "%s انضم إلى مجموعة %s"
#: lib/command.php:318
#, fuzzy, php-format
#: lib/command.php:309
#, php-format
msgid "Fullname: %s"
msgstr "الاسم الكامل: %s"
#: lib/command.php:321 lib/mail.php:254
#: lib/command.php:312 lib/mail.php:254
#, php-format
msgid "Location: %s"
msgstr "الموقع: %s"
#: lib/command.php:324 lib/mail.php:256
#: lib/command.php:315 lib/mail.php:256
#, php-format
msgid "Homepage: %s"
msgstr "الصفحة الرئيسية: %s"
#: lib/command.php:327
#: lib/command.php:318
#, php-format
msgid "About: %s"
msgstr "عن: %s"
#: lib/command.php:358
#: lib/command.php:349
#, php-format
msgid "Message too long - maximum is %d characters, you sent %d"
msgstr ""
#: lib/command.php:376
#: lib/command.php:367
#, fuzzy, php-format
msgid "Direct message to %s sent"
msgstr "رسالة مباشرة %s"
#: lib/command.php:378
#: lib/command.php:369
msgid "Error sending direct message."
msgstr ""
#: lib/command.php:422
#: lib/command.php:413
#, fuzzy
msgid "Cannot repeat your own notice"
msgstr "لا يمكنك تكرار ملحوظتك الخاصة."
#: lib/command.php:427
#, fuzzy
#: lib/command.php:418
msgid "Already repeated that notice"
msgstr "كرر بالفعل هذه الملاحظة."
msgstr "كرر بالفعل هذا الإشعار"
#: lib/command.php:435
#, fuzzy, php-format
#: lib/command.php:426
#, php-format
msgid "Notice from %s repeated"
msgstr "الإشعار من %s مكرر"
#: lib/command.php:437
#: lib/command.php:428
msgid "Error repeating notice."
msgstr "خطأ تكرار الإشعار."
#: lib/command.php:491
#: lib/command.php:482
#, php-format
msgid "Notice too long - maximum is %d characters, you sent %d"
msgstr ""
#: lib/command.php:500
#, fuzzy, php-format
#: lib/command.php:491
#, php-format
msgid "Reply to %s sent"
msgstr "رُد على رسالة %s"
#: lib/command.php:502
#: lib/command.php:493
msgid "Error saving notice."
msgstr "خطأ أثناء حفظ الإشعار."
#: lib/command.php:556
#: lib/command.php:547
msgid "Specify the name of the user to subscribe to"
msgstr ""
#: lib/command.php:563
#: lib/command.php:554
#, php-format
msgid "Subscribed to %s"
msgstr "مُشترك ب%s"
#: lib/command.php:584
#: lib/command.php:575
msgid "Specify the name of the user to unsubscribe from"
msgstr ""
#: lib/command.php:591
#: lib/command.php:582
#, php-format
msgid "Unsubscribed from %s"
msgstr ""
#: lib/command.php:609 lib/command.php:632
#: lib/command.php:600 lib/command.php:623
msgid "Command not yet implemented."
msgstr ""
#: lib/command.php:612
#: lib/command.php:603
msgid "Notification off."
msgstr ""
#: lib/command.php:614
#: lib/command.php:605
msgid "Can't turn off notification."
msgstr ""
#: lib/command.php:635
#: lib/command.php:626
msgid "Notification on."
msgstr ""
#: lib/command.php:637
#: lib/command.php:628
msgid "Can't turn on notification."
msgstr ""
#: lib/command.php:650
#: lib/command.php:641
msgid "Login command is disabled"
msgstr ""
#: lib/command.php:661
#: lib/command.php:652
#, php-format
msgid "This link is useable only once, and is good for only 2 minutes: %s"
msgstr ""
#: lib/command.php:677
#: lib/command.php:668
msgid "You are not subscribed to anyone."
msgstr "لست مُشتركًا بأي أحد."
#: lib/command.php:679
#: lib/command.php:670
msgid "You are subscribed to this person:"
msgid_plural "You are subscribed to these people:"
msgstr[0] "لست مشتركًا بأحد."
......@@ -4375,11 +4384,11 @@ msgstr[3] "أنت مشترك بهؤلاء الأشخاص:"
msgstr[4] ""
msgstr[5] ""
#: lib/command.php:699
#: lib/command.php:690
msgid "No one is subscribed to you."
msgstr "لا أحد مشترك بك."
#: lib/command.php:701
#: lib/command.php:692
msgid "This person is subscribed to you:"
msgid_plural "These people are subscribed to you:"
msgstr[0] "لا أحد مشترك بك."
......@@ -4389,11 +4398,11 @@ msgstr[3] "هؤلاء الأشخاص مشتركون بك:"
msgstr[4] ""
msgstr[5] ""
#: lib/command.php:721
#: lib/command.php:712
msgid "You are not a member of any groups."
msgstr "لست عضوًا في أي مجموعة."
#: lib/command.php:723
#: lib/command.php:714
msgid "You are a member of this group:"
msgid_plural "You are a member of these groups:"
msgstr[0] "لست عضوًا في أي مجموعة."
......@@ -4403,7 +4412,7 @@ msgstr[3] "أنت عضو في هذه المجموعات:"
msgstr[4] ""
msgstr[5] ""
#: lib/command.php:737
#: lib/command.php:728
msgid ""
"Commands:\n"
"on - turn on notifications\n"
......@@ -4444,19 +4453,19 @@ msgid ""
"tracking - not yet implemented.\n"
msgstr ""
#: lib/common.php:199
#: lib/common.php:131
msgid "No configuration file found. "
msgstr ""
#: lib/common.php:200
#: lib/common.php:132
msgid "I looked for configuration files in the following places: "
msgstr ""
#: lib/common.php:201
#: lib/common.php:134
msgid "You may wish to run the installer to fix this."
msgstr ""
#: lib/common.php:202
#: lib/common.php:135
msgid "Go to the installer."
msgstr "اذهب إلى المُثبّت."
......@@ -4654,11 +4663,16 @@ msgstr "ميجابايت"
msgid "kB"
msgstr "كيلوبايت"
#: lib/jabber.php:191
#: lib/jabber.php:202
#, php-format
msgid "[%s]"
msgstr "[%s]"
#: lib/jabber.php:385
#, fuzzy, php-format
msgid "Unknown inbox source %d."
msgstr "لغة غير معروفة \"%s\""
#: lib/joinform.php:114
msgid "Join"
msgstr "انضم"
......@@ -4961,15 +4975,21 @@ msgstr "أرفق ملفًا"
msgid "Share my location"
msgstr "لم يمكن حفظ تفضيلات الموقع."
#: lib/noticeform.php:214
#: lib/noticeform.php:215
#, fuzzy
msgid "Do not share my location"
msgstr "لم يمكن حفظ تفضيلات الموقع."
#: lib/noticeform.php:215
#: lib/noticeform.php:216
msgid "Hide this info"
msgstr ""
#: lib/noticeform.php:217
msgid ""
"Sorry, retrieving your geo location is taking longer than expected, please "
"try again later"
msgstr ""
#: lib/noticelist.php:428
#, php-format