]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
enjitqueuehandler uses functions to check options
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Jun 2009 22:42:16 +0000 (15:42 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Jun 2009 22:42:16 +0000 (15:42 -0700)
scripts/enjitqueuehandler.php

index c17b4e27f4891e920888bd933723d51cedf95be0..2418d2d1c551dd7ce51ed3876bddd5861edcacab 100755 (executable)
@@ -120,15 +120,12 @@ class EnjitQueueHandler extends QueueHandler
 
 }
 
-mb_internal_encoding('UTF-8');
-
-$id = NULL;
-
-foreach ($options as $option) {
-    if ($option[0] == '--id' || $option[0] == '-i') {
-        $id = $option[1];
-        break;
-    }
+if (have_option('-i')) {
+    $id = get_option_value('-i');
+} else if (have_option('--id')) {
+    $id = get_option_value('--id');
+} else {
+    $id = null;
 }
 
 $handler = new EnjitQueueHandler($id);