Skip to content

Commit

Permalink
v4.0.34 Update download path to account for change in ZC 1.5.5
Browse files Browse the repository at this point in the history
Update download locations as a result of the removal of DIR_WS_HTTPS_ADMIN and to handle/address HTTPS_SERVER being removed.  In ZC 1.5.5, all admin side server paths were combined into a single "series" of a path where HTTP_SERVER . DIR_WS_ADMIN would represent either the http: or https: path whichever was chosen.  The configure.php file offers a description to add a definition for the constant HTTPS_SERVER if desired/necessary; however, DIR_WS_ADMIN is now auto-detected and therefore there is no DIR_WS_HTTPS_ADMIN "needed".  Older versions of ZC offered all four constants for definition.

The primary effect of the associated modification is that now if the admin is offered securely through https:, files stored in the catalog will only be offered securely if ENABLE_SSL_CATALOG as defined in admin/includes/configure.php (or an override) has set that specifically to 'true' (case sensitive).
  • Loading branch information
mc12345678 committed Mar 19, 2016
1 parent 62b7b6b commit b99b732
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions admin/easypopulate_4.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
// $Id: easypopulate_4.php, v4.0.33 02-29-2016 mc12345678 $
// $Id: easypopulate_4.php, v4.0.34 03-19-2016 mc12345678 $

// CSV VARIABLES - need to make this configurable in the ADMIN
// $csv_delimiter = "\t"; // "\t" = tab AND "," = COMMA
Expand Down Expand Up @@ -78,7 +78,7 @@
//$sql_fail_test == true; // used to cause an sql error on new product upload - tests error handling & logs
/* Test area end */

$curver = '4.0.33a';
$curver = '4.0.34';
$message = '';
if (IS_ADMIN_FLAG) {
$new_version_details = plugin_version_check_for_updates(2069, $curver);
Expand All @@ -88,7 +88,7 @@
}

// Current EP Version - Modded by mc12345678 after Chadd had done so much
$curver = $curver . ' - Beta 02-29-2016' . $message;
$curver = $curver . ' - Beta 03-19-2016' . $message;
$display_output = ''; // results of import displayed after script run
$ep_dltype = NULL;
$ep_stack_sql_error = false; // function returns true on any 1 error, and notifies user of an error
Expand Down Expand Up @@ -666,13 +666,13 @@ function init()

echo "<td align=center>" . zen_draw_form('delete_form', basename($_SERVER['SCRIPT_NAME']), /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL') . zen_draw_hidden_field('delete', urlencode($files[$val[$i]]), /*$parameters = */'') . zen_draw_input_field('delete_button', EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DELETE, /*$parameters = */'', /*$required = */false, /*$type = */'submit') . "</form></td>";
/* echo "<td align=center><a href=\"" . $_SERVER['SCRIPT_NAME'] . "?delete=" . urlencode($files[$val[$i]]) . "\">" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DELETE . "</a></td>";*/
echo "<td align=center><a href=\"" . ($request_type == 'SSL' ? (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* Storeside */ HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG : /*Admin Side */ HTTPS_SERVER . DIR_WS_HTTPS_ADMIN) : (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* Storeside */ HTTP_CATALOG_SERVER . DIR_WS_CATALOG : /*Admin Side */ HTTP_SERVER . DIR_WS_ADMIN)) . $tempdir . $files[$val[$i]] . "\" target=_blank>" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DOWNLOAD . "</a></td></tr>\n";
echo "<td align=center><a href=\"" . (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* BOF Storeside */ defined('ENABLE_SSL_CATALOG') && ENABLE_SSL_CATALOG === 'true' ? HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_CATALOG_SERVER . DIR_WS_CATALOG /* EOF Storeside */ : /* BOF Adminside */ (defined('ENABLE_SSL_ADMIN') && ENABLE_SSL_ADMIN === 'true' ? (defined('HTTPS_SERVER') ? HTTPS_SERVER : HTTP_SERVER) . (defined('DIR_WS_HTTPS_ADMIN') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN) : HTTP_SERVER . DIR_WS_ADMIN) /* EOF Adminside */) . $tempdir . $files[$val[$i]] . "\" target=_blank>" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DOWNLOAD . "</a></td></tr>\n";
} else {
echo "<td>&nbsp;</td>\n";
echo "<td>&nbsp;</td>\n";
// echo "<td align=center><a href=\"" . $_SERVER['SCRIPT_NAME'] . "?delete=" . urlencode($files[$val[$i]]) . "\">" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DELETE . "</a></td>";
echo "<td align=center>" . zen_draw_form('delete_form', basename($_SERVER['SCRIPT_NAME']), /*$parameters = */'', 'post', /*$params =*/ '', $request_type == 'SSL') . zen_draw_hidden_field('delete', urlencode($files[$val[$i]]), /*$parameters = */'') . zen_draw_input_field('delete_button', EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DELETE, /*$parameters = */'', /*$required = */false, /*$type = */'submit') . "</form></td>";
echo "<td align=center><a href=\"" . ($request_type == 'SSL' ? (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* Storeside */ HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG : /*Admin Side */ HTTPS_SERVER . DIR_WS_HTTPS_ADMIN) : (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* Storeside */ HTTP_CATALOG_SERVER . DIR_WS_CATALOG : /*Admin Side */ HTTP_SERVER . DIR_WS_ADMIN)) . $tempdir . $files[$val[$i]] . "\" target=_blank>" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DOWNLOAD . "</a></td></tr>\n";
echo "<td align=center><a href=\"" . (EP4_ADMIN_TEMP_DIRECTORY !== 'true' ? /* BOF Storeside */ defined('ENABLE_SSL_CATALOG') && ENABLE_SSL_CATALOG === 'true' ? HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_CATALOG_SERVER . DIR_WS_CATALOG /* EOF Storeside */ : /* BOF Adminside */ (defined('ENABLE_SSL_ADMIN') && ENABLE_SSL_ADMIN === 'true' ? (defined('HTTPS_SERVER') ? HTTPS_SERVER : HTTP_SERVER) . (defined('DIR_WS_HTTPS_ADMIN') ? DIR_WS_HTTPS_ADMIN : DIR_WS_ADMIN) : HTTP_SERVER . DIR_WS_ADMIN) /* EOF Adminside */) . $tempdir . $files[$val[$i]] . "\" target=_blank>" . EASYPOPULATE_4_DISPLAY_EXPORT_FILE_DOWNLOAD . "</a></td></tr>\n";
}
}
} // End loop within a filetype
Expand Down

0 comments on commit b99b732

Please sign in to comment.