#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'i:n:af'; $longoptions = array('id=', 'nickname=', 'all', 'force'); $helptext = <<find()) { while ($user->fetch()) { initializeInbox($user); } } } else { show_help(); exit(1); } } catch (Exception $e) { print $e->getMessage()."\n"; exit(1); } function initializeInbox($user) { if (!have_option('q', 'quiet')) { print "Initializing inbox for $user->nickname..."; } $inbox = Inbox::staticGet('user_id', $user_id); if (!empty($inbox)) { if (!have_option('q', 'quiet')) { print "SKIP\n"; } } else { $inbox = Inbox::initialize($user_id); if (!have_option('q', 'quiet')) { if (empty($inbox)) { print "ERR\n"; } else { print "DONE\n"; } } } }