]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
take a command-line argument to start with a particular user ID
authorEvan Prodromou <evan@prodromou.name>
Fri, 14 Nov 2008 01:59:30 +0000 (20:59 -0500)
committerEvan Prodromou <evan@prodromou.name>
Fri, 14 Nov 2008 01:59:30 +0000 (20:59 -0500)
darcs-hash:20081114015930-84dde-c2556e2dd409f4c13f9063d77ad15974e6d0f3c4.gz

scripts/fixup_inboxes.php

index c3ead16bf8827feabae26b8148b5f44a870622dd..ce8196dcdac8e868ab2760f78e6cf881a13de8a5 100755 (executable)
@@ -34,9 +34,16 @@ define('LACONICA', true);
 
 require_once(INSTALLDIR . '/lib/common.php');
 
+$start_at = ($argc > 1) ? $argv[1] : NULL;
+
 common_log(LOG_INFO, 'Updating user inboxes.');
 
 $user = new User();
+
+if ($start_at) {
+       $user->whereAdd('id >= ' . $start_at);
+}
+
 $cnt = $user->find();
 $cache = common_memcache();