[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][ENH] Improve Module Git details: show clearer message when not a Git install
"MAGENE Sem Joel \(@Jomagene\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69c579c8a6055_3b18ee9464481@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f5d575569-6t752.mail> |
MAGENE Sem Joel pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
9bd4d941 by MAGENE Sem Joel at 2026-03-26T18:16:43+00:00
[BP][ENH] Improve Module Git details: show clearer message when not a Git install
---
* [BP][ENH] Improve Module Git details: show clearer message when not a Git install
---
* [ENH] Improve Module Git details: show clearer message when not a Git install
---
* [FIX] Git detail msg when git in not installed
* Improve Module Git details: show clearer message when not a Git install
See merge request tikiwiki/tiki!8554
(cherry picked from commit cf862a4211e7b0ab68c58f02e2c87d22aca37773)
See merge request tikiwiki/tiki!9863
(cherry picked from commit b00db0de1afa72bc5a35b8920da5b8ca4c953f49)
See merge request tikiwiki/tiki!9864
- - - - -
2 changed files:
- modules/mod-func-git_detail.php
- templates/modules/mod-git_detail.tpl
Changes:
=====================================
modules/mod-func-git_detail.php
=====================================
@@ -33,6 +33,9 @@ function module_git_detail($mod_reference, $module_params)
$gitlib = TikiLib::lib('git');
$error = '';
$content = [];
+ include_once('lib/setup/twversion.class.php');
+ $TWV = new TWVersion();
+ $version = $TWV->getVersion();
try {
$content = $gitlib->get_info();
@@ -44,6 +47,16 @@ function module_git_detail($mod_reference, $module_params)
$error = $e->getMessage();
}
+ if (empty($content)) {
+ $content = [
+ 'version' => $version,
+ 'commit' => 'N/A',
+ 'date' => 'N/A',
+ 'branch' => 'N/A',
+ 'remote' => 'N/A',
+ ];
+ }
+
$smarty->assign('error', $error);
$smarty->assign('content', $content);
}
=====================================
templates/modules/mod-git_detail.tpl
=====================================
@@ -18,6 +18,8 @@ style="{$module_params.style}"
<span class="date">{tr}from{/tr} {$content.mdate|tiki_short_datetime}</span>
</div>
{else}
- {tr}No Git checkout or unable to determine last update{/tr}
+ <div class="mod-git_detail cvsup">
+ <span class="label">{tr}Tiki version:{/tr} {$content.version}
+ </div>
{/if}
{/tikimodule}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9bd4d941f071a7460bdf7e472c83e2b9eb86dc6c
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9bd4d941f071a7460bdf7e472c83e2b9eb86dc6c
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs