forked from GNUsocial/gnu-social
fix have_options arguments
This commit is contained in:
parent
010d168aaa
commit
3fc2cfb7f8
@ -20,8 +20,8 @@
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
|
||||
$shortoptions = 'i';
|
||||
$longoptions = array('id');
|
||||
$shortoptions = 'i::';
|
||||
$longoptions = array('id::');
|
||||
|
||||
$helptext = <<<END_OF_FACEBOOK_HELP
|
||||
Daemon script for pushing new notices to Facebook.
|
||||
@ -59,8 +59,8 @@ class FacebookQueueHandler extends QueueHandler
|
||||
|
||||
}
|
||||
|
||||
if (have_option('-i')) {
|
||||
$id = get_option_value('-i');
|
||||
if (have_option('i')) {
|
||||
$id = get_option_value('i');
|
||||
} else if (have_option('--id')) {
|
||||
$id = get_option_value('--id');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -20,13 +20,13 @@
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
|
||||
$shortoptions = 'r';
|
||||
$longoptions = array('resource');
|
||||
$shortoptions = 'r::';
|
||||
$longoptions = array('resource::');
|
||||
|
||||
$helptext = <<<END_OF_JABBER_HELP
|
||||
Daemon script for pushing new notices to Jabber users.
|
||||
|
||||
-r --resource Jabber Resource ID
|
||||
-r --resource Jabber Resource ID (default to config)
|
||||
|
||||
END_OF_JABBER_HELP;
|
||||
|
||||
@ -63,8 +63,8 @@ if (common_config('xmpp','enabled')==false) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if (have_option('-r')) {
|
||||
$resource = get_option_value('-r');
|
||||
if (have_option('r')) {
|
||||
$resource = get_option_value('r');
|
||||
} else if (have_option('--resource')) {
|
||||
$resource = get_option_value('--resource');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
|
||||
$shortoptions = 'i';
|
||||
$longoptions = array('id');
|
||||
$shortoptions = 'i::';
|
||||
$longoptions = array('id::');
|
||||
|
||||
$helptext = <<<END_OF_OMB_HELP
|
||||
Daemon script for pushing new notices to OpenMicroBlogging subscribers.
|
||||
@ -72,8 +72,8 @@ class OmbQueueHandler extends QueueHandler
|
||||
}
|
||||
}
|
||||
|
||||
if (have_option('-i')) {
|
||||
$id = get_option_value('-i');
|
||||
if (have_option('i')) {
|
||||
$id = get_option_value('i');
|
||||
} else if (have_option('--id')) {
|
||||
$id = get_option_value('--id');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
|
||||
$shortoptions = 'i';
|
||||
$longoptions = array('id');
|
||||
$shortoptions = 'i::';
|
||||
$longoptions = array('id::');
|
||||
|
||||
$helptext = <<<END_OF_PING_HELP
|
||||
Daemon script for pushing new notices to ping servers.
|
||||
@ -54,8 +54,8 @@ class PingQueueHandler extends QueueHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (have_option('-i')) {
|
||||
$id = get_option_value('-i');
|
||||
if (have_option('i')) {
|
||||
$id = get_option_value('i');
|
||||
} else if (have_option('--id')) {
|
||||
$id = get_option_value('--id');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
|
||||
|
||||
$shortoptions = 'r';
|
||||
$longoptions = array('resource');
|
||||
$shortoptions = 'r::';
|
||||
$longoptions = array('resource::');
|
||||
|
||||
$helptext = <<<END_OF_PUBLIC_HELP
|
||||
Daemon script for pushing new notices to public XMPP subscribers.
|
||||
@ -61,8 +61,8 @@ if (common_config('xmpp','enabled')==false) {
|
||||
exit();
|
||||
}
|
||||
|
||||
if (have_option('-r')) {
|
||||
$resource = get_option_value('-r');
|
||||
if (have_option('r')) {
|
||||
$resource = get_option_value('r');
|
||||
} else if (have_option('--resource')) {
|
||||
$resource = get_option_value('--resource');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -58,8 +58,8 @@ class SmsQueueHandler extends QueueHandler
|
||||
}
|
||||
}
|
||||
|
||||
if (have_option('-i')) {
|
||||
$id = get_option_value('-i');
|
||||
if (have_option('i')) {
|
||||
$id = get_option_value('i');
|
||||
} else if (have_option('--id')) {
|
||||
$id = get_option_value('--id');
|
||||
} else if (count($args) > 0) {
|
||||
|
@ -35,8 +35,8 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
|
||||
|
||||
$id = null;
|
||||
|
||||
if (have_option('-u')) {
|
||||
$id = get_option_value('-u');
|
||||
if (have_option('u')) {
|
||||
$id = get_option_value('u');
|
||||
} else if (have_option('--start-user-id')) {
|
||||
$id = get_option_value('--start-user-id');
|
||||
} else {
|
||||
|
@ -59,8 +59,8 @@ class TwitterQueueHandler extends QueueHandler
|
||||
|
||||
}
|
||||
|
||||
if (have_option('-i')) {
|
||||
$id = get_option_value('-i');
|
||||
if (have_option('i')) {
|
||||
$id = get_option_value('i');
|
||||
} else if (have_option('--id')) {
|
||||
$id = get_option_value('--id');
|
||||
} else if (count($args) > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user