Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1044 from gburton/1.0.7.16
Browse files Browse the repository at this point in the history
1.0.7.16
  • Loading branch information
ecartz authored Feb 24, 2021
2 parents d31f384 + bcb2c78 commit 39c6bd7
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 198 deletions.
Binary file modified admin/images/oscommerce.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

146 changes: 0 additions & 146 deletions admin/includes/modules/dashboard/d_partner_news.php

This file was deleted.

4 changes: 4 additions & 0 deletions admin/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
$actionRecorder->_user_id = $_SESSION['admin']['id'];
$actionRecorder->record();

$OSCOM_Hooks->call('login', 'processActionSuccess');

if (isset($_SESSION['redirect_origin'])) {
$page = $redirect_origin['page'];
$get_string = http_build_query($redirect_origin['get']);
Expand All @@ -68,6 +70,8 @@
tep_redirect(tep_href_link('index.php'));
}
}

$OSCOM_Hooks->call('login', 'processActionFail');
}

if (isset($_POST['username'])) {
Expand Down
2 changes: 1 addition & 1 deletion admin/newsletters.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
} elseif ($action == 'preview') {
$nID = tep_db_prepare_input($_GET['nID']);

$newsletter_query = tep_db_query("SELCT title, content, module FROM newsletters WHERE newsletters_id = " . (int)$nID);
$newsletter_query = tep_db_query("SELECT title, content, module FROM newsletters WHERE newsletters_id = " . (int)$nID);
$newsletter = tep_db_fetch_array($newsletter_query);

$nInfo = new objectInfo($newsletter);
Expand Down
10 changes: 5 additions & 5 deletions admin/products_attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
<h1 class="display-4"><?= HEADING_TITLE_OPT ?></h1>

<?php
$options = "SELECT * FROM products_options WHERE language_id = " . (int)$_SESSION['languages_id'] . " ORDER BY sort_order";
$options_split = new splitPageResults($option_page, MAX_ROW_LISTS_OPTIONS, $options, $options_query_numrows);
$options_sql = "SELECT * FROM products_options WHERE language_id = " . (int)$_SESSION['languages_id'] . " ORDER BY sort_order";
$options_split = new splitPageResults($option_page, MAX_ROW_LISTS_OPTIONS, $options_sql, $options_query_numrows);
?>

<p class="my-2 text-right mr-2"><?= $options_split->display_links($options_query_numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $option_page, 'value_page=' . $value_page . '&attribute_page=' . $attribute_page, 'option_page') ?></p>
Expand All @@ -488,8 +488,8 @@
<tbody>
<?php
$next_id = 1;
$options = tep_db_query($options);
while ($options_values = $options->fetch_assoc()) {
$options_query = tep_db_query($options_sql);
while ($options_values = $options_query->fetch_assoc()) {
if (($action == 'update_option') && ($_GET['option_id'] == $options_values['products_options_id'])) {
$inputs = $sort = '';
foreach ($languages as $l) {
Expand Down Expand Up @@ -755,7 +755,7 @@
<div class="col-3">
<select name="option_id" class="form-control">
<?php
$options = tep_db_query("SELECT * FROM products_options WHERE language_id = '" . $_SESSION['languages_id'] . "' ORDER BY products_options_name");
$options = tep_db_query("SELECT products_options_id, products_options_name FROM products_options WHERE language_id = '" . $_SESSION['languages_id'] . "' ORDER BY products_options_name");
while ($options_values = $options->fetch_assoc()) {
echo '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
}
Expand Down
4 changes: 0 additions & 4 deletions ext/jquery/jquery-2.2.3.min.js

This file was deleted.

Binary file modified images/store_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions includes/modules/order_total/ot_shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ function process() {
$shipping_tax_description = tep_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);

$order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
if (!isset($order->info['tax_groups']["$shipping_tax_description"])) {
Guarantor::guarantee_subarray($order->info, 'tax_groups')["$shipping_tax_description"] = 0;
}
$order->info['tax_groups']["$shipping_tax_description"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
$order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

Expand Down
35 changes: 20 additions & 15 deletions includes/system/versioned/1.0.5.6/page_selection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
CE Phoenix, E-Commerce made Easy
https://phoenixcart.org
Copyright (c) 2020 osCommerce
Copyright (c) 2021 Phoenix Cart
Released under the GNU General Public License
*/
Expand All @@ -32,21 +32,26 @@ public static function _show_pages($text) {
}

public static function _edit_pages($values, $key) {
global $PHP_SELF;

$file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
$files_array = [];
if ($dir = @dir(DIR_FS_CATALOG)) {
while ($file = $dir->read()) {
if (!is_dir(DIR_FS_CATALOG . $file)) {
if (substr($file, strrpos($file, '.')) == $file_extension) {
$files_array[] = $file;
}
}

// main files
foreach (new DirectoryIterator(DIR_FS_CATALOG) as $file) {
if ($file->isFile() && ($file->getExtension() == 'php')) {
$files_array[] = $file->getFilename();
}
}

// ext files
$dir = new RecursiveDirectoryIterator(DIR_FS_CATALOG . 'ext/modules/content/');
$iterator = new RecursiveIteratorIterator($dir);

foreach ($iterator as $file) {
if ($file->isFile() && ($file->getExtension() == 'php')) {
$files_array[] = $file->getFilename();
}
sort($files_array);
$dir->close();
}

$files_array = array_unique($files_array);

$values_array = explode(';', $values);

Expand Down
2 changes: 1 addition & 1 deletion includes/version.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.7.15
1.0.7.16
5 changes: 1 addition & 4 deletions install/phoenix.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ INSERT INTO configuration (configuration_title, configuration_key, configuration
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_TAGS_TABLE_CLICK_JQUERY_SORT_ORDER', '800', 'Sort order of display. Lowest is displayed first.', '6', '0', now());

# Administration Tool Dashboard
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_ADMIN_DASHBOARD_INSTALLED', 'd_orders.php;d_customers.php;d_phoenix_addons.php;d_security_checks.php;d_latest_news.php;d_admin_logins.php;d_version_check.php;d_reviews.php;d_partner_news.php', 'List of Administration Tool Dashboard module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_ADMIN_DASHBOARD_INSTALLED', 'd_orders.php;d_customers.php;d_phoenix_addons.php;d_security_checks.php;d_latest_news.php;d_admin_logins.php;d_version_check.php;d_reviews.php', 'List of Administration Tool Dashboard module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Orders Module', 'MODULE_ADMIN_DASHBOARD_ORDERS_STATUS', 'True', 'Do you want to show the latest orders on the dashboard?', '6', '1', 'tep_cfg_select_option([\'True\', \'False\'], ', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Orders to display', 'MODULE_ADMIN_DASHBOARD_ORDERS_DISPLAY', '5', 'This number of Orders will display, ordered by most recent.', '6', '2', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_ORDERS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '3', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now());
Expand Down Expand Up @@ -1454,9 +1454,6 @@ insert into configuration (configuration_title, configuration_key, configuration
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Reviews to display', 'MODULE_ADMIN_DASHBOARD_REVIEWS_DISPLAY', '5', 'This number of Reviews will display, ordered by latest added.', '6', '2', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_REVIEWS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '1', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_REVIEWS_SORT_ORDER', '800', 'Sort order of display. Lowest is displayed first.', '6', '0', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Partner News Module', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_STATUS', 'True', 'Do you want to show the latest osCommerce Partner News on the dashboard?', '6', '1', 'tep_cfg_select_option([\'True\', \'False\'], ', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_CONTENT_WIDTH', '6', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option([\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'], ', now());
insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ADMIN_DASHBOARD_PARTNER_NEWS_SORT_ORDER', '1100', 'Sort order of display. Lowest is displayed first.', '6', '3', now());

# Boxes
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Installed Modules', 'MODULE_BOXES_INSTALLED', 'bm_categories.php;bm_manufacturers.php;bm_whats_new.php;bm_order_history.php;bm_best_sellers.php;bm_reviews.php', 'List of box module filenames separated by a semi-colon. This is automatically updated. No need to edit.', '6', '0', now());
Expand Down
10 changes: 5 additions & 5 deletions templates/default/includes/ext/modules/content/reviews/write.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
?>

<div class="row">
<h1 class="display-4 col-sm-8"><?= $product_info['products_name'] ?></h1>
<h2 class="display-4 col-sm-4 text-left text-sm-right"><?= $products_price ?></h2>
<h1 class="display-4 col-sm-8"><?= $product->get('name') ?></h1>
<h2 class="display-4 col-sm-4 text-left text-sm-right"><?= $product->hype_price() ?></h2>
</div>

<?= tep_draw_form('review', tep_href_link('ext/modules/content/reviews/write.php', 'action=process&products_id=' . (int)$_GET['products_id']), 'post', 'enctype="multipart/form-data"', true) ?>

<div class="alert alert-warning" role="alert">
<?= sprintf(TEXT_REVIEW_WRITING, htmlspecialchars($customer->get_short_name()), $product_info['products_name']) ?>
<?= sprintf(TEXT_REVIEW_WRITING, htmlspecialchars($customer->get('short_name')), $product->get('name')) ?>
</div>

<div class="form-group row">
Expand Down Expand Up @@ -69,8 +69,8 @@
<hr>

<div class="row">
<div class="col-sm-8"><?= $product_info['products_description'] ?>...</div>
<div class="col-sm-4"><?= tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name'])) ?></div>
<div class="col-sm-8"><?= $product->get('description') ?>...</div>
<div class="col-sm-4"><?= tep_image('images/' . $product->get('image'), htmlspecialchars($product->get('name'))) ?></div>
</div>

</form>
Expand Down

0 comments on commit 39c6bd7

Please sign in to comment.