From 964efa9c1f6d52677a51ea52e2957f1ab1e63617 Mon Sep 17 00:00:00 2001
From: Myron Turner <turnermm02@shaw.ca>
Date: Wed, 12 Jul 2017 17:41:33 -0500
Subject: [PATCH] using $options->getCmd to retrieve show-pages parameter

---
 bin/wantedpages.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index edded6a22..a7f0ab70d 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -44,14 +44,15 @@ class WantedPagesCLI extends DokuCLI {
      * @return void
      */
     protected function main(DokuCLI_Options $options) {
-        global $argc, $argv;
 
         if($options->args) {
             $startdir = dirname(wikiFN($options->args[0].':xxx'));
         } else {
             $startdir = dirname(wikiFN('xxx'));
         }
-        if($argv[1] == 'show-pages' || $argv[2] == 'show-pages') {
+        
+        $cmd = $options->getCmd();
+        if($cmd == 'show-pages') {
             $this->show_pages = true;
         }
 
-- 
GitLab