aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-11-17 05:58:26 -0500
committerAndrew Manning <tamanning@zoho.com>2016-11-17 05:58:26 -0500
commit20db8bbe2ef02190f405e8ee516afadf3a8c9b98 (patch)
treea11c66094ae920a7f73236287f706abe1251e22d /include/widgets.php
parent154923ca7dafdf75e52fa9b4100b77435a181773 (diff)
downloadvolse-hubzilla-20db8bbe2ef02190f405e8ee516afadf3a8c9b98.tar.gz
volse-hubzilla-20db8bbe2ef02190f405e8ee516afadf3a8c9b98.tar.bz2
volse-hubzilla-20db8bbe2ef02190f405e8ee516afadf3a8c9b98.zip
Highlight active wiki in list in preparation for removing active wiki name from content section header to make room for page list viewer
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 84f224c7e..e74f2c58b 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -941,8 +941,20 @@ function widget_wiki_list($arr) {
// Not the channel owner
$owner_acl = $x = array();
}
-
+ if(argc()>1) {
+ $activeWikiURLname = argv(2);
+ } else {
+ $activeWikiURLname = '';
+ }
+ logger($activeWikiURLname, LOGGER_DEBUG);
$wikis = wiki_list($channel, get_observer_hash());
+ foreach($wikis['wikis'] as &$w) {
+ if($w['urlName'] === $activeWikiURLname) {
+ $w['active'] = true;
+ } else {
+ $w['active'] = false;
+ }
+ }
if ($wikis) {
return replace_macros(get_markup_template('wikilist.tpl'), array(
'$header' => t('Wiki List'),