diff --git a/_admin.php b/_admin.php
index 39626cc..54ce2ed 100644
--- a/_admin.php
+++ b/_admin.php
@@ -1,15 +1,15 @@
blog->settings->tweakStores->file_pattern;
$combo = self::comboModules($modules, $excludes);
+ # zip file url pattern
+ $file_pattern = $core->blog->settings->tweakStores->file_pattern;
+
# generate xml code
if (!empty($_POST['buildxml_id']) && in_array($_POST['buildxml_id'], $combo)) {
$xml_content = tweakStores::generateXML($_POST['buildxml_id'], $modules[$_POST['buildxml_id']], $file_pattern);
@@ -75,11 +77,17 @@ class tweakStoresBehaviors
}
}
}
-
echo
'
' .
'
' . __('Tweak third-party repositories') . '
';
+ if (!empty($_POST['write_xml'])) {
+ if ($core->error->flag()) {
+ echo '
' . implode(' ', $core->error->getErrors()) . '
';
+ } else {
+ echo '
' . __('File successfully write') . '
';
+ }
+ }
if (count($combo) < 2) {
echo
'
' . __('There are no module to tweak') . '
' .
@@ -87,65 +95,44 @@ class tweakStoresBehaviors
return;
}
-/*
- echo
- '
';
-//*/
- echo
- '
';
-
+ if (empty($file_pattern)) {
+ echo sprintf(
+ '
%s
',
+ $core->adminurl->get('admin.plugins', ['module' => 'tweakStores', 'conf' => 1, 'redir' => $page_url]),
+ __('You must configure zip file pattern to complete xml code automaticaly.')
+ );
+ } else {
+ echo
+ '
';
+ }
if (!empty($_POST['buildxml_id'])) {
echo
'
';
}
echo
- '
' .
- (empty($file_pattern) ?
- __('You must configure zip file pattern to complete xml code automaticaly.') :
- __('You can edit zip file pattern from configuration page.')
- ). '
' .
'
';
}