Added check for invalid key

Close #895
This commit is contained in:
Lewis Wright 2015-03-30 14:15:32 +01:00 committed by Tobias van Beek
parent 9261f24d25
commit 7f46b650dc

View file

@ -59,13 +59,12 @@
$returnTo = PHPCI_URL . 'settings/github-callback';
$githubUri = 'https://github.com/login/oauth/authorize?client_id='.$id.'&scope=repo&redirect_uri=' . $returnTo;
?>
<?php if (!empty($id) && empty($settings['phpci']['github']['token'])): ?>
<?php if (!empty($id)): ?>
<?php if (empty($githubUser['name']) || empty($settings['phpci']['github']['token'])): ?>
<p class="alert alert-warning clearfix">
<?php Lang::out('github_sign_in', $githubUri); ?>
</p>
<?php endif; ?>
<?php if (!empty($id) && !empty($settings['phpci']['github']['token'])): ?>
<?php else: ?>
<p class="alert alert-success">
<?php Lang::out('github_phpci_linked'); ?>
@ -74,6 +73,7 @@
</strong>
</p>
<?php endif; ?>
<?php endif; ?>
</div>
<div class="col-lg-8">