aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorFrançois LASSERRE2014-07-23 15:00:21 +0200
committerFrançois LASSERRE2014-07-23 15:00:21 +0200
commit0999d9ece348c3593ec717be1074a5833ec9f779 (patch)
tree0d31b05c96575fbae8101a415e494e383cbf16c1 /inc
parentconf: replace [] by array() to support PHP < 5.4 (diff)
downloadapt-panopticon_cgp-0999d9ece348c3593ec717be1074a5833ec9f779.zip
apt-panopticon_cgp-0999d9ece348c3593ec717be1074a5833ec9f779.tar.gz
apt-panopticon_cgp-0999d9ece348c3593ec717be1074a5833ec9f779.tar.bz2
apt-panopticon_cgp-0999d9ece348c3593ec717be1074a5833ec9f779.tar.xz
Update html.inc.php
Fix a link when no class selected.
Diffstat (limited to 'inc')
-rw-r--r--inc/html.inc.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index b8d2f82..9107269 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -128,7 +128,7 @@ function plugins_list($host, $selected_plugins = array()) {
128 echo '<h2>Plugins</h2>'; 128 echo '<h2>Plugins</h2>';
129 echo '<ul>'; 129 echo '<ul>';
130 130
131 printf("<li><a %s href=\"%shost.php?h=%s\">overview</a></li>\n", 131 printf("<li><a %shref=\"%shost.php?h=%s\">overview</a></li>\n",
132 selected_overview($selected_plugins), 132 selected_overview($selected_plugins),
133 htmlentities($CONFIG['weburl']), 133 htmlentities($CONFIG['weburl']),
134 urlencode($host) 134 urlencode($host)
@@ -137,7 +137,7 @@ function plugins_list($host, $selected_plugins = array()) {
137 # first the ones defined as ordered 137 # first the ones defined as ordered
138 foreach($CONFIG['overview'] as $plugin) { 138 foreach($CONFIG['overview'] as $plugin) {
139 if (in_array($plugin, $plugins)) { 139 if (in_array($plugin, $plugins)) {
140 printf("<li><a %s href=\"%shost.php?h=%s&amp;p=%s\">%s</a></li>\n", 140 printf("<li><a %shref=\"%shost.php?h=%s&amp;p=%s\">%s</a></li>\n",
141 selected_plugin($plugin, $selected_plugins), 141 selected_plugin($plugin, $selected_plugins),
142 htmlentities($CONFIG['weburl']), 142 htmlentities($CONFIG['weburl']),
143 urlencode($host), 143 urlencode($host),
@@ -150,7 +150,7 @@ function plugins_list($host, $selected_plugins = array()) {
150 # other plugins 150 # other plugins
151 foreach($plugins as $plugin) { 151 foreach($plugins as $plugin) {
152 if (!in_array($plugin, $CONFIG['overview'])) { 152 if (!in_array($plugin, $CONFIG['overview'])) {
153 printf("<li><a %s href=\"%shost.php?h=%s&amp;p=%s\">%s</a></li>\n", 153 printf("<li><a %shref=\"%shost.php?h=%s&amp;p=%s\">%s</a></li>\n",
154 selected_plugin($plugin, $selected_plugins), 154 selected_plugin($plugin, $selected_plugins),
155 htmlentities($CONFIG['weburl']), 155 htmlentities($CONFIG['weburl']),
156 urlencode($host), 156 urlencode($host),
@@ -166,21 +166,21 @@ function plugins_list($host, $selected_plugins = array()) {
166 166
167function selected_overview($selected_plugins) { 167function selected_overview($selected_plugins) {
168 if (count($selected_plugins) > 1) { 168 if (count($selected_plugins) > 1) {
169 return 'class="selected"'; 169 return 'class="selected" ';
170 } 170 }
171 return ''; 171 return '';
172} 172}
173 173
174function selected_plugin($plugin, $selected_plugins) { 174function selected_plugin($plugin, $selected_plugins) {
175 if (in_array($plugin, $selected_plugins)) { 175 if (in_array($plugin, $selected_plugins)) {
176 return 'class="selected"'; 176 return 'class="selected" ';
177 } 177 }
178 return ''; 178 return '';
179} 179}
180 180
181function selected_timerange($value1, $value2) { 181function selected_timerange($value1, $value2) {
182 if ($value1 == $value2) { 182 if ($value1 == $value2) {
183 return 'class="selected"'; 183 return 'class="selected" ';
184 } 184 }
185 return ''; 185 return '';
186} 186}