diff --git a/core/upgrade/index.php b/core/upgrade/index.php
index 024be475e8..e7549b7b18 100644
--- a/core/upgrade/index.php
+++ b/core/upgrade/index.php
@@ -133,7 +133,7 @@
require_once("core/groups/permissions_default.php");
message::add($text['message-upgrade_permissions'], null, $message_timeout);
}
-
+
//redirect the browser
header("Location: ".PROJECT_PATH."/core/upgrade/index.php");
exit;
@@ -155,6 +155,11 @@
}
}
+//count upgradeable repos including + main repo
+ $repos_count = 0;
+ if (is_array($updateable_repos)) { $repos_count = @sizeof($updateable_repos); }
+ $repos_count++;
+
//adjust color and initialize step counter
$step = 1;
$step_color = isset($_SESSION['theme']['upgrade_step_color']['text']) ? $_SESSION['theme']['upgrade_step_color']['text'] : color_adjust((!empty($_SESSION['theme']['form_table_label_background_color']['text']) ? $_SESSION['theme']['form_table_label_background_color']['text'] : '#e5e9f0'), -0.1);
@@ -175,74 +180,81 @@
echo " \n";
echo "
\n";
echo "\n";
-
echo $text['description-upgrade'];
echo "
";
if (permission_exists("upgrade_source") && !is_dir("/usr/share/examples/fusionpbx") && is_writeable($_SERVER["PROJECT_ROOT"]."/.git")) {
echo "\n";
- echo "\n";
+ echo "
\n";
echo " | \n";
echo " ".$step." ";
echo " ".$text['label-upgrade_source']." \n";
echo " | \n";
echo " \n";
echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " ".$text['description-all_applications']." (".$repos_count.")\n";
+ echo " \n";
+ echo " | \n";
+ echo "
\n";
+ echo "
\n";
+
+ echo "\n";
+
+ echo "
\n";
+ echo "\n";
+ echo " | \n";
+ echo " ".$text['message-upgrade_manually']."\n";
+ echo " | \n";
+ echo " \n";
+ echo " \n";
echo " \n";
echo " \n";
echo " \n";
- echo " ".$text['description-upgrade_source']." \n";
+ echo " ".$text['description-upgrade_source']." \n";
//show current git version info
chdir($_SERVER["PROJECT_ROOT"]);
exec("git rev-parse --abbrev-ref HEAD 2>&1", $git_current_branch, $branch_return_value);
$git_current_branch = $git_current_branch[0];
exec("git log --pretty=format:'%H' -n 1 2>&1", $git_current_commit, $commit_return_value);
$git_current_commit = $git_current_commit[0];
+
if (!is_numeric($git_current_branch)) {
- echo " ".software::version()." \n";
+ echo " ".software::version()."\n";
}
if ($branch_return_value == 0 && $commit_return_value == 0) {
- echo " ".$git_current_branch."";
+ echo " ".$git_current_branch."";
}
echo " \n";
- if (!empty($updateable_repos)) {
- echo "\n";
- echo " \n";
- echo " \n";
- echo "\n";
- echo " ".$text['description-all_applications']." (".@sizeof($updateable_repos).")\n";
- echo " \n";
- }
echo " | \n";
echo "
\n";
echo "
\n";
- //show optional apps with repos
- if (!empty($updateable_repos)) {
- echo "
\n";
- foreach ($updateable_repos as $repo => $app) {
- $repo_info = git_repo_info($repo);
- $pull_method = substr($repo_info['url'], 0, 4) == 'http' ? 'http' : 'ssh';
- if (!$repo_info) { continue; }
- echo "
\n";
+ foreach ($updateable_repos as $repo => $app) {
+ $repo_info = git_repo_info($repo);
+ $pull_method = substr($repo_info['url'], 0, 4) == 'http' ? 'http' : 'ssh';
+ if (!$repo_info) { continue; }
+ echo "
\n";
}
+ echo "
\n";
+
$step++;
}
@@ -369,4 +381,4 @@
//include the footer
require_once "resources/footer.php";
-?>
\ No newline at end of file
+?>