summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fixup_utf8.php2
-rwxr-xr-xscripts/queuedaemon.php11
-rwxr-xr-xscripts/useremail.php25
-rwxr-xr-xscripts/xmppdaemon.php11
4 files changed, 44 insertions, 5 deletions
diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php
index 30befadfd..2af6f9cb0 100755
--- a/scripts/fixup_utf8.php
+++ b/scripts/fixup_utf8.php
@@ -249,7 +249,7 @@ class UTF8FixerUpper
$sql = 'SELECT id, fullname, location, description FROM user_group ' .
'WHERE LENGTH(fullname) != CHAR_LENGTH(fullname) '.
'OR LENGTH(location) != CHAR_LENGTH(location) '.
- 'OR LENGTH(description) != CHAR_LENGTH(description) ';
+ 'OR LENGTH(description) != CHAR_LENGTH(description) '.
'AND modified < "'.$this->max_date.'" '.
'ORDER BY modified DESC';
diff --git a/scripts/queuedaemon.php b/scripts/queuedaemon.php
index 6dba16f95..582a3dd88 100755
--- a/scripts/queuedaemon.php
+++ b/scripts/queuedaemon.php
@@ -105,7 +105,7 @@ class QueueDaemon extends SpawningDaemon
{
$this->log(LOG_INFO, 'checking for queued notices');
- $master = new QueueMaster($this->get_id());
+ $master = new QueueMaster($this->get_id(), $this->processManager());
$master->init($this->allsites);
try {
$master->service();
@@ -125,6 +125,14 @@ class QueueDaemon extends SpawningDaemon
class QueueMaster extends IoMaster
{
+ protected $processManager;
+
+ function __construct($id, $processManager)
+ {
+ parent::__construct($id);
+ $this->processManager = $processManager;
+ }
+
/**
* Initialize IoManagers which are appropriate to this instance.
*/
@@ -135,6 +143,7 @@ class QueueMaster extends IoMaster
$qm = QueueManager::get();
$qm->setActiveGroup('main');
$managers[] = $qm;
+ $managers[] = $this->processManager;
}
Event::handle('EndQueueDaemonIoManagers', array(&$managers));
diff --git a/scripts/useremail.php b/scripts/useremail.php
index 6676a87c8..0a59d36f8 100755
--- a/scripts/useremail.php
+++ b/scripts/useremail.php
@@ -53,7 +53,17 @@ if (have_option('i', 'id')) {
if (!empty($user)) {
if (empty($user->email)) {
- print "No email registered for user '$user->nickname'\n";
+ # Check for unconfirmed emails
+ $unconfirmed_email = new Confirm_address();
+ $unconfirmed_email->user_id = $user->id;
+ $unconfirmed_email->address_type = 'email';
+ $unconfirmed_email->find(true);
+
+ if (empty($unconfirmed_email->address)) {
+ print "No email registered for user '$user->nickname'\n";
+ } else {
+ print "Unconfirmed Adress: $unconfirmed_email->address\n";
+ }
} else {
print "$user->email\n";
}
@@ -65,7 +75,18 @@ if (have_option('e', 'email')) {
$user->email = get_option_value('e', 'email');
$user->find(false);
if (!$user->fetch()) {
- print "No users with email $user->email\n";
+ # Check unconfirmed emails
+ $unconfirmed_email = new Confirm_address();
+ $unconfirmed_email->address = $user->email;
+ $unconfirmed_email->address_type = 'email';
+ $unconfirmed_email->find(true);
+
+ if (empty($unconfirmed_email->user_id)) {
+ print "No users with email $user->email\n";
+ } else {
+ $user=User::staticGet('id', $unconfirmed_email->user_id);
+ print "Unconfirmed Address: $user->id $user->nickname\n";
+ }
exit(0);
}
do {
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index 9302f0c43..26c7991b8 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -55,7 +55,7 @@ class XMPPDaemon extends SpawningDaemon
{
common_log(LOG_INFO, 'Waiting to listen to XMPP and queues');
- $master = new XmppMaster($this->get_id());
+ $master = new XmppMaster($this->get_id(), $this->processManager());
$master->init($this->allsites);
$master->service();
@@ -68,6 +68,14 @@ class XMPPDaemon extends SpawningDaemon
class XmppMaster extends IoMaster
{
+ protected $processManager;
+
+ function __construct($id, $processManager)
+ {
+ parent::__construct($id);
+ $this->processManager = $processManager;
+ }
+
/**
* Initialize IoManagers for the currently configured site
* which are appropriate to this instance.
@@ -79,6 +87,7 @@ class XmppMaster extends IoMaster
$qm->setActiveGroup('xmpp');
$this->instantiate($qm);
$this->instantiate(XmppManager::get());
+ $this->instantiate($this->processManager);
}
}
}