[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in...
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <691e4a7c143e4_2ad41084500d4@gitlab-sidekiq-low-urgency-cpu-bound-v2-6df8d84988-5vdmv.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
344fe305 by Sammy Ndabo at 2025-11-19T22:44:41+00:00
[FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in...
---
* [FIX] Sefurl.php: ensure non-null source value is provided in handle method
* [ENH] tiki-admingroups.tpl: add message and link to configure Homegroup for undefined group homepage
* [FIX] tiki-admingroups.tpl: prevent rendering of empty group homepage links in admin groups template
See merge request tikiwiki/tiki!9025
- - - - -
2 changed files:
- lib/smarty_tiki/Modifier/Sefurl.php
- templates/tiki-admingroups.tpl
Changes:
=====================================
lib/smarty_tiki/Modifier/Sefurl.php
=====================================
@@ -11,6 +11,11 @@ class Sefurl
{
public function handle($source, $type = 'wiki', $with_next = '', $all_langs = '', $with_title = 'y', $title = '')
{
+
+ if ($source === null) {
+ throw new \InvalidArgumentException('sefurl modifier requires a non-null source value.');
+ }
+
global $prefs;
$wikilib = \TikiLib::lib('wiki');
$tikilib = \TikiLib::lib('tiki');
=====================================
templates/tiki-admingroups.tpl
=====================================
@@ -98,7 +98,17 @@
{if $prefs.useGroupHome eq 'y'}
<td class="text">
- <a class="link" href="{$users[user].groupHome|sefurl}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
+ {if !empty($users[user].groupHome)}
+ <a class="link" href="{$users[user].groupHome|sefurl}" title="{tr}Group Homepage{/tr}">{tr}{$users[user].groupHome}{/tr}</a>
+ {else}
+ <span class="text-muted">
+ {tr}Group homepage is not defined{/tr}.
+ <a class="btn btn-link p-0 align-baseline"
+ href="tiki-admingroups.php?group={$users[user].groupName|escape:"url"}{if $prefs.feature_tabs ne 'y'}#tab2{/if}">
+ {tr}Configure{/tr}
+ </a>
+ </span>
+ {/if}
</td>
{/if}
@@ -446,7 +456,7 @@
<label for="anniversaryId">{tr}Anniversary{/tr}</label>
<input type="text" name="anniversary" id="anniversaryId" class="form-control" value="{if is_array($group_info)}{$group_info.anniversary|escape}{else}{/if}">
<div class="form-text">{tr}Use MMDD to specify an annual date as of which all users will be unassigned from the group, or DD to specify a monthly date.{/tr}</div>
- <label>{tr}Or{/tr}</label><br>
+ <label>{tr}Or{/tr}</label><br>
<label>{tr}Number of Days{/tr}</label>
<input type="text" class="form-control" name="expireAfter" value="{if is_array($group_info)}{$group_info.expireAfter|escape}{else}{/if}">
<div class="form-text">
@@ -830,7 +840,7 @@
<div class="mb-3 row">
<label class="col-sm-3 col-form-label">
{tr}CSV File{/tr}
- <a title="{tr}Help{/tr}" {popup text='user<br>user1<br>user2'}>{icon name='help'}</a>
+ <a title="{tr}Help{/tr}" {popup text='user<br>user1<br>user2'}>{icon name='help'}</a>
</label>
<div class="col-sm-7">
<input name="csvlist" type="file" accept=".csv" class="form-control">
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/344fe30554b2dcdc0fdbb0117e5820d6fa9e2619
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/344fe30554b2dcdc0fdbb0117e5820d6fa9e2619
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs