From 7725be7d6845ca3cba134a937d42c6552919b24f Mon Sep 17 00:00:00 2001
From: Jean-Christian Denis
Date: Fri, 5 Nov 2021 01:16:44 +0100
Subject: [PATCH] add checked url to ui
---
_admin.php | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/_admin.php b/_admin.php
index 20f6c6c..e35266e 100644
--- a/_admin.php
+++ b/_admin.php
@@ -71,10 +71,10 @@ class tweakStoresBehaviors
$file_pattern = $core->blog->settings->tweakStores->file_pattern;
# check dcstore repo
- $file_content = '';
+ $url = '';
if (!empty($_POST['checkxml_id']) && in_array($_POST['checkxml_id'], $combo)) {
if (empty($modules[$_POST['checkxml_id']]['repository'])) {
- $file_content = __('This module has no repository set in its _define.php file.');
+ $url = __('This module has no repository set in its _define.php file.');
} else {
try {
$url = $modules[$_POST['checkxml_id']]['repository'];
@@ -146,15 +146,18 @@ class tweakStoresBehaviors
$core->formNonce() . '
' .
'';
- if (!empty($file_content)) {
+ if (!empty($url)) {
echo
'' .
'
' . __('Repositiory contents') . '
' .
- '
' . form::textArea('file_xml', 165, 14, [
- 'default' => html::escapeHTML(str_replace('><', ">\n<", $file_content)),
- 'class' => 'maximal',
- 'extra_html' => 'readonly="true"'
- ]) . '
' .
+ '
' . $url . '
' .
+ (empty($file_content) ? '' :
+ '
' . form::textArea('file_xml', 165, 14, [
+ 'default' => html::escapeHTML(str_replace('><', ">\n<", $file_content)),
+ 'class' => 'maximal',
+ 'extra_html' => 'readonly="true"'
+ ]) . '
'
+ ) .
'
';
}