diff --git a/Data Admin/duplication_combine.php b/Data Admin/duplication_combine.php index 09f881d..3aff87a 100644 --- a/Data Admin/duplication_combine.php +++ b/Data Admin/duplication_combine.php @@ -31,10 +31,6 @@ } else { $page->breadcrumbs->add(__('Combine Similar Fields', 'Data Admin')); - if (isset($_GET['return'])) { - returnProcess($guid, $_GET['return'], null, null); - } - echo '
'; echo __("With user-entered data it's common to end up with a variety of details that all mean the same thing or are spelled incorrectly. These discrepancies can have an effect on reports generated. Use the tool below to help find and combine fields with similar data.", 'Data Admin'); echo '
'; @@ -45,7 +41,7 @@ $form = Form::create('combineFieldsFilder', $session->get('absoluteURL').'/index.php?q=/modules/Data Admin/duplication_combine.php'); $form->addHiddenValue('address', $session->get('address')); - + $tableData = include __DIR__ . '/src/CombineableFields.php'; // Build a set of options for the chained selects @@ -79,20 +75,20 @@ $row = $form->addRow(); $row->addLabel('mode', __('Mode')); $row->addRadio('mode')->fromArray(array('Assisted' => __('Assisted'), 'Manual' => __('Manual')))->checked($mode); - + $row = $form->addRow(); $row->addFooter(); $row->addSubmit(); - + echo $form->getOutput(); // Validate against data set to prevent unwanted values in SQL query if (!empty($fieldName) && array_key_exists($tableName, $tableData) && array_key_exists($fieldName, $tableData[$tableName]['fields'])) { if ($mode == 'Assisted') { $sql = "SELECT DISTINCT match1.`$fieldName` as matched, match2.`$fieldName` as value - FROM `$tableName` as match1, `$tableName` as match2 - WHERE match2.`$fieldName` LIKE CONCAT('%', match1.`$fieldName`, '%') - AND LENGTH(match1.`$fieldName`) < LENGTH(match2.`$fieldName`) + FROM `$tableName` as match1, `$tableName` as match2 + WHERE match2.`$fieldName` LIKE CONCAT('%', match1.`$fieldName`, '%') + AND LENGTH(match1.`$fieldName`) < LENGTH(match2.`$fieldName`) AND LENGTH(match1.`$fieldName`) > 2 AND (match1.`$fieldName` <> match2.`$fieldName`) AND match1.`$fieldName` <> '' @@ -100,7 +96,7 @@ } else { $sql = "SELECT `$fieldName` as value, count(*) as count FROM `$tableName` GROUP BY value ORDER BY value"; } - + $result = $pdo->executeQuery(array(), $sql); echo '';
diff --git a/Data Admin/settings.php b/Data Admin/settings.php
index 615a879..386741a 100644
--- a/Data Admin/settings.php
+++ b/Data Admin/settings.php
@@ -31,10 +31,6 @@
} else {
$page->breadcrumbs->add(__('Data Admin Settings', 'Data Admin'));
- if (isset($_GET['return'])) {
- returnProcess($guid, $_GET['return'], null, null);
- }
-
$trueIcon = "";
$falseIcon = "
";
@@ -145,7 +141,7 @@
-
+
get('absoluteURL').'/modules/'.$session->get('module').'/settingsProcess.php');
diff --git a/Data Admin/snapshot_manage.php b/Data Admin/snapshot_manage.php
index 93ab47d..5684f56 100644
--- a/Data Admin/snapshot_manage.php
+++ b/Data Admin/snapshot_manage.php
@@ -35,10 +35,6 @@
echo __("Manage Snapshots", 'Data Admin') ;
echo "" ;
- if (isset($_GET["return"])) {
- returnProcess($guid, $_GET["return"], null, null);
- }
-
echo "
'; @@ -92,7 +92,7 @@ $row = $form->addRow()->addClass('oneColumnOptions'); $row->addLabel('nameFormat', __('Name Format'))->description(__('What format are the names currently in?')); $row->addSelect('nameFormat')->fromArray($formats)->required()->placeholder(); - + $row = $form->addRow()->addClass('oneColumnOptions'); $row->addLabel('nameColumn', __('Name Column'))->description(__('What column are the names in?')); $row->addSelect('nameColumn')->fromArray($columns)->required()->placeholder(); @@ -120,6 +120,6 @@ $row = $form->addRow(); $row->addFooter(); $row->addSubmit(); - + echo $form->getOutput(); }