Skip to content

Commit

Permalink
CLI tries to lookup previous argument's value when looking up photogr…
Browse files Browse the repository at this point in the history
…apher

A bug in the CLI caused Zoph to try to lookup the value for the argument
before --photographer instead of the value after it.

Also fixed an issue where the CLI was trying to find the CLI verbosity
setting in the "old" location (settings object) instead of the new
location (conf object).

Fixes #38
  • Loading branch information
jeroenrnl committed Feb 3, 2013
1 parent 6a3cc78 commit d28c575
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions php/cli/arguments.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ private function lookup() {
}
break;
case "photographer":
$name=$arg;
if(self::$command=="new" || (conf::get("import.cli.add.auto") && !person::getByName($name))) {
$vars["_new_photographer"][]=$name;
} else {
Expand Down
2 changes: 1 addition & 1 deletion php/util.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ function get_filetype($mime) {
function create_dir($directory) {
if (file_exists($directory) == false) {
if (@mkdir($directory, octdec(conf::get("import.dirmode")))) {
if(!defined("CLI") || settings::$importVerbose>=1) {
if(!defined("CLI") || conf::get("import.cli.verbose")>=1) {
log::msg(translate("Created directory") . ": $directory", log::NONE, log::GENERAL);
}
return true;
Expand Down

0 comments on commit d28c575

Please sign in to comment.