Remove --packageID option on cli.php
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 3 Jul 2020 09:20:12 +0000 (11:20 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 3 Jul 2020 09:20:37 +0000 (11:20 +0200)
Resolves #3425

wcfsetup/install/files/cli.php
wcfsetup/install/files/lib/system/CLIWCF.class.php

index b36780114577aad42058b075e68fef67be667409..806f136d728b9fc67a71f3886bb415a8b1cfc1c0 100644 (file)
@@ -8,8 +8,9 @@
  * @package    WoltLabSuite\Core
  */
 if (PHP_SAPI !== 'cli') exit;
-// define the wcf-root-dir
-define('WCF_DIR', dirname(__FILE__).'/');
+
+// include config
+require_once(__DIR__.'/app.config.inc.php');
 
 // initiate wcf core
 require_once(WCF_DIR.'lib/system/WCF.class.php');
index 15353cfae9750da53bdaf6173aaaf6ed37c3fba0..9c354faa5aed80e48272ed3683f371703f1abe40 100644 (file)
@@ -62,13 +62,6 @@ class CLIWCF extends WCF {
                $zendLoader = new ZendLoader([ZendLoader::AUTOREGISTER_ZF => true]);
                $zendLoader->register();
                
-               $argv = new ArgvParser([
-                       'packageID=i' => ''
-               ]);
-               $argv->setOption(ArgvParser::CONFIG_FREEFORM_FLAGS, true);
-               $argv->parse();
-               define('PACKAGE_ID', $argv->packageID ?: 1);
-               
                // disable benchmark
                define('ENABLE_BENCHMARK', 0);