]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Change inboxes to have 1000 items rather than last full month
authorEvan Prodromou <evan@zhora.(none)>
Tue, 20 Jan 2009 02:37:31 +0000 (21:37 -0500)
committerEvan Prodromou <evan@zhora.(none)>
Tue, 20 Jan 2009 02:37:31 +0000 (21:37 -0500)
scripts/inbox_users.php

index 0543abb2a33bb46e045699ed78faa711192a2167..7b029e142567ae27b14d410fba7e0eec5989a62b 100755 (executable)
@@ -78,11 +78,11 @@ foreach ($ids as $id) {
                                                        'FROM subscription JOIN notice ON subscription.subscribed = notice.profile_id ' .
                                                        'WHERE subscription.subscriber = ' . $user->id . ' ' .
                                                        'AND notice.created >= subscription.created ' .
-                                                       'AND now() - notice.created < ' . (7 * 24 * 3600) . ' ' .
                                                        'AND NOT EXISTS (SELECT user_id, notice_id ' .
                                                        'FROM notice_inbox ' .
                                                        'WHERE user_id = ' . $user->id . ' ' . 
-                                                       'AND notice_id = notice.id)');
+                                                       'AND notice_id = notice.id) ' .
+                                                       'LIMIT 0, 1000');
        
        if (is_null($result) || $result === false) {
                common_log_db_error($inbox, 'INSERT', __FILE__);