Fix broken error reporting in getfile

This commit is contained in:
mkuba50 2019-04-27 21:01:25 +02:00
parent c9a741eaed
commit 5f2493cf2e
3 changed files with 6 additions and 4 deletions

2
api

@ -1 +1 @@
Subproject commit a90dc04636104f9857cf44d41ea29b89efb1cb52
Subproject commit a62526211a949d258acbdc2264fd02f8a18768c5

View File

@ -1,12 +1,14 @@
<?php
$updateId = isset($argv[1]) ? $argv[1] : null;
$file = isset($argv[2]) ? $argv[2] : null;
$file = isset($argv[2]) ? strtolower($argv[2]) : null;
if(empty($updateId)) die('Unspecified update id');
if(empty($file)) die('Unspecified file');
require_once dirname(__FILE__).'/shared/main.php';
require_once dirname(__FILE__).'/api/get.php';
consoleLogger(brand());
$files = uupGetFiles($updateId, 0, 0);
if(isset($files['error'])) {
throwError($files['error']);

View File

@ -1,8 +1,8 @@
<?php
require_once dirname(__FILE__).'/../api/shared/main.php';
function brand($script) {
$projVersion = '1.0.0';
function brand($script = null) {
$projVersion = '1.0.1';
return 'UUP dump standalone v'.$projVersion;
}