[TikiWiki-commits] [Git][tikiwiki/tiki][24.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 | <69c62e2d22d8b_3b18f24093863@gitlab-sidekiq-low-urgency-cpu-bound-v2-6b5b56d8f8-qn9bb.mail> |
MAGENE Sem Joel pushed to branch 24.x at Tiki Wiki CMS Groupware / Tiki
Commits:
d82d7868 by MAGENE Sem Joel at 2026-03-27T07:07:24+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
---
* [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
(cherry picked from commit 9bd4d941f071a7460bdf7e472c83e2b9eb86dc6c)
See merge request tikiwiki/tiki!9869
- - - - -
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
=====================================
@@ -17,5 +17,12 @@
<span class="date">{$content.author.date|tiki_long_datetime}</span>
</p>
</div>
+{else}
+<div class="mod-git_detail">
+ <p>
+ <span class="label">{tr}Tiki version:{/tr}</span>
+ <span class="branch">{$content.version}</span>
+ </p>
+</div>
{/if}
{/tikimodule}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d82d7868db86a80f5ab83d6b84e24c643e7aaa1f
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d82d7868db86a80f5ab83d6b84e24c643e7aaa1f
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