Skip to content

Commit

Permalink
Update is only a simulation
Browse files Browse the repository at this point in the history
Added that the update call will only simulate the install in this example.
  • Loading branch information
thelfensdrfer authored Oct 18, 2016
1 parent 192a078 commit d9e9d13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions example/client/update/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@
}, $update->getVersionsToUpdate()));
echo '</pre>';

// This call will only simulate an update.
// Set the first argument (simulate) to "false" to install the update
// i.e. $update->update(false);
$result = $update->update();
if ($result === true) {
echo 'Update successful<br>';
echo 'Update simulation successful<br>';
} else {
echo 'Update failed: ' . $result . '!<br>';
echo 'Update simulation failed: ' . $result . '!<br>';

if ($result = AutoUpdate::ERROR_SIMULATE) {
echo '<pre>';
Expand Down

0 comments on commit d9e9d13

Please sign in to comment.