1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Minor fixes for self updater - more verbose messaging after self update

This commit is contained in:
David Bomba 2021-03-30 18:01:20 +11:00
parent 1af565abd3
commit caf7ad5998
2 changed files with 9 additions and 3 deletions

View File

@ -66,10 +66,16 @@ class SelfUpdateController extends BaseController
$repo = new GitRepository(base_path());
nlog('Are there changes to pull? '.$repo->hasChanges());
$output = '';
try {
$res = $repo->pull();
// $res = $repo->pull();
$output = $repo->execute('pull origin');
} catch (GitException $e) {
nlog($output);
nlog($e->getMessage());
return response()->json(['message'=>$e->getMessage()], 500);
}
@ -78,7 +84,7 @@ class SelfUpdateController extends BaseController
Artisan::call('ninja:post-update');
});
return response()->json(['message' => ''], 200);
return response()->json(['message' => $output], 200);
}
public function checkVersion()

View File

@ -260,7 +260,7 @@ class HtmlEngine
$data['$contact.email'] = ['value' => $this->contact->email, 'label' => ctrans('texts.email')];
$data['$contact.phone'] = ['value' => $this->contact->phone, 'label' => ctrans('texts.phone')];
$data['$contact.name'] = ['value' => isset($this->contact) ? $this->contact->present()->name() : 'no contact name on record', 'label' => ctrans('texts.contact_name')];
$data['$contact.name'] = ['value' => isset($this->contact) ? $this->contact->present()->name() : $this->client->present()->name(), 'label' => ctrans('texts.contact_name')];
$data['$contact.first_name'] = ['value' => isset($this->contact) ? $this->contact->first_name : '', 'label' => ctrans('texts.first_name')];
$data['$contact.last_name'] = ['value' => isset($this->contact) ? $this->contact->last_name : '', 'label' => ctrans('texts.last_name')];