@@ 174-192 (lines=19) @@ | ||
171 | } |
|
172 | break; |
|
173 | ||
174 | case "extension": |
|
175 | $xoops = \Xoops::getInstance(); |
|
176 | if (is_array($value)) { |
|
177 | $text = $value[0]; |
|
178 | $type = $value[1]; |
|
179 | } else { |
|
180 | $text = $value; |
|
181 | $type = 'error'; |
|
182 | } |
|
183 | if ($xoops->isActiveModule($text) == false) { |
|
184 | $this->itemConfigBoxLine[] = array( |
|
185 | 'type' => $type, 'text' => sprintf(\XoopsLocale::EF_EXTENSION_IS_NOT_INSTALLED, $text) |
|
186 | ); |
|
187 | } else { |
|
188 | $this->itemConfigBoxLine[] = array( |
|
189 | 'type' => 'accept', 'text' => sprintf(\XoopsLocale::SF_EXTENSION_IS_INSTALLED, $text) |
|
190 | ); |
|
191 | } |
|
192 | break; |
|
193 | ||
194 | case "module": |
|
195 | $xoops = \Xoops::getInstance(); |
|
@@ 194-212 (lines=19) @@ | ||
191 | } |
|
192 | break; |
|
193 | ||
194 | case "module": |
|
195 | $xoops = \Xoops::getInstance(); |
|
196 | if (is_array($value)) { |
|
197 | $text = $value[0]; |
|
198 | $type = $value[1]; |
|
199 | } else { |
|
200 | $text = $value; |
|
201 | $type = 'error'; |
|
202 | } |
|
203 | if ($xoops->isActiveModule($text) == false) { |
|
204 | $this->itemConfigBoxLine[] = array( |
|
205 | 'type' => $type, 'text' => sprintf(\XoopsLocale::F_MODULE_IS_NOT_INSTALLED, $text) |
|
206 | ); |
|
207 | } else { |
|
208 | $this->itemConfigBoxLine[] = array( |
|
209 | 'type' => 'accept', 'text' => sprintf(\XoopsLocale::F_MODULE_IS_INSTALLED, $text) |
|
210 | ); |
|
211 | } |
|
212 | break; |
|
213 | ||
214 | case "service": |
|
215 | $xoops = \Xoops::getInstance(); |
|
@@ 214-232 (lines=19) @@ | ||
211 | } |
|
212 | break; |
|
213 | ||
214 | case "service": |
|
215 | $xoops = \Xoops::getInstance(); |
|
216 | if (is_array($value)) { |
|
217 | $text = $value[0]; |
|
218 | $type = $value[1]; |
|
219 | } else { |
|
220 | $text = $value; |
|
221 | $type = 'error'; |
|
222 | } |
|
223 | if ($xoops->service($text)->isAvailable()) { |
|
224 | $this->itemConfigBoxLine[] = array( |
|
225 | 'type' => 'accept', 'text' => sprintf(\XoopsLocale::SF_SERVICE_IS_INSTALLED, $text) |
|
226 | ); |
|
227 | } else { |
|
228 | $this->itemConfigBoxLine[] = array( |
|
229 | 'type' => $type, 'text' => sprintf(\XoopsLocale::EF_SERVICE_IS_NOT_INSTALLED, $text) |
|
230 | ); |
|
231 | } |
|
232 | break; |
|
233 | ||
234 | } |
|
235 | return true; |