current_version; $fetch_ok = $updates->result === 0; // Commits sitting between this working tree and the remote branch. Fields are separated // by \x1f rather than having git build the table markup, because a commit subject comes // from outside this install and used to reach the page as unescaped HTML. $pending_commits = []; $git_log = shell_exec("git log HEAD..$remote_ref --pretty=format:'%h%x1f%ar%x1f%s'"); foreach (explode("\n", trim((string) $git_log)) as $commit_line) { if ($commit_line === '') { continue; } $commit_fields = explode("\x1f", $commit_line, 3); if (count($commit_fields) === 3) { $pending_commits[] = $commit_fields; } } // version_compare, not > - "2.6.10" is less than "2.6.9" as a plain string comparison, so // the plain comparison silently stops offering database updates once a minor reaches 10. $db_update_available = version_compare(LATEST_DATABASE_VERSION, CURRENT_DATABASE_VERSION, '>'); $app_update_available = !empty($pending_commits); ?>
= escapeHtml(implode("\n", $updates->output)) ?>
Check that Git is installed, that the remote is reachable from this server, and that the web server
user can write to the ITFlow directory. The
forum can help - include
your PHP error log and the output above.
= escapeHtml(substr((string) $current_version, 0, 7)) ?>You are up to date
Everything is going to be alright.
Both are pending. Update the application files first - they bring the database migrations that the second step then applies.
= count($pending_commits) ?> commit= count($pending_commits) === 1 ? '' : 's' ?>
behind = escapeHtml("origin/$repo_branch") ?>.
Update App runs git pull. Force Update discards every local change and resets
the files to = escapeHtml("origin/$repo_branch") ?> - use it only when a
normal update will not apply.
Schema is at = escapeHtml(CURRENT_DATABASE_VERSION) ?> and this code expects = escapeHtml(LATEST_DATABASE_VERSION) ?>. Parts of the app will error until this is applied.
Update DatabaseA large instance can take a minute or more. If it fails part way it stops without advancing the recorded version, so it is safe to run again after fixing the cause.
| Commit | When | Description |
|---|---|---|
= escapeHtml($commit[0]) ?> |
= escapeHtml($commit[1]) ?> | = escapeHtml($commit[2]) ?> |