Skip to content

Commit

Permalink
Merge branch 'verson3.316'
Browse files Browse the repository at this point in the history
  • Loading branch information
ClicShopping committed Mar 7, 2022
2 parents 2202baa + d1621c1 commit b802594
Show file tree
Hide file tree
Showing 49 changed files with 479 additions and 140 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@

-------------
Version 3.316
Automatic install detection for the first installation
code refactoring
add support menu with wiki link (technical doc)
error template updated
librairies updated.

-------------
Version 3.315
Ckeditor version updated
Librairies updated
Expand Down
23 changes: 13 additions & 10 deletions ClicShoppingAdmin/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@
switch ($action) {
case 'process':
$CLICSHOPPING_Hooks->call('PreAction', 'Process');
$username = '';
$password = '';

if (isset($_SESSION['redirect_origin']) && isset($_SESSION['redirect_origin']['auth_user']) && !isset($_POST['username'])) {
if (isset($_SESSION['redirect_origin'], $_SESSION['redirect_origin']['auth_user']) && !isset($_POST['username'])) {
$username = HTML::sanitize($_SESSION['redirect_origin']['auth_user']);
$password = HTML::sanitize($_SESSION['redirect_origin']['auth_pw']);
} else {
Expand Down Expand Up @@ -145,14 +147,15 @@
$first_name = HTML::sanitize($_POST['first_name']);

if (!empty($username)) {
$CLICSHOPPING_Db->save('administrators', [
'user_name' => $username,
'user_password' => Hash::encrypt($password),
'name' => $name,
'first_name' => $first_name,
'access' => 1
]
);
$insert_array = [
'user_name' => $username,
'user_password' => Hash::encrypt($password),
'name' => $name,
'first_name' => $first_name,
'access' => 1
];

$CLICSHOPPING_Db->save('administrators', $insert_array);
}
}

Expand All @@ -178,7 +181,7 @@
$Qcheck->bindValue(':user_name', $username);
$Qcheck->execute();

if ($Qcheck->rowCount() == 1 && Is::EmailAddress($username)) {
if ($Qcheck->rowCount() === 1 && Is::EmailAddress($username)) {
$new_password = Hash::getRandomString(ENTRY_PASSWORD_MIN_LENGTH);
$crypted_password = Hash::encrypt($new_password);

Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 18 additions & 7 deletions error_documents/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
*/

use ClicShopping\OM\HTTP;
use ClicShopping\OM\CLICSHOPPING;

define('CLICSHOPPING_BASE_DIR', realpath(__DIR__ . '/../includes/ClicShopping/') . '/');

require_once(CLICSHOPPING_BASE_DIR . 'OM/CLICSHOPPING.php');
spl_autoload_register('ClicShopping\OM\CLICSHOPPING::autoload');

CLICSHOPPING::initialize();

CLICSHOPPING::loadSite('Shop');

http_response_code(404);
?>
Expand All @@ -22,9 +32,8 @@
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<!-- CSS only -->
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

<script src="https://kit.fontawesome.com/89fdf54890.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
</head>
<body>
<div class="text-center" style="padding-top:150px;">
Expand All @@ -41,14 +50,12 @@
<h1>This Page is Missing</h1>
<p>It looks like this page is missing. Please continue back to our website and try again.</p>
<p style="margin-top: 40px;">
<php echo HTML::button(
'Return to website', null, CLICSHOPPING::link(), null, 'primary'); ?>
<?php echo HTML::button('Return to website', null, CLICSHOPPING::link(), null, 'primary'); ?>
</p>

</div>
<div class="error-actions">
<br/><br/>
<i class="fas fa-home"></i> <span style="text-decoration:none;"><a
<i class="bi bi-house"></i><span style="text-decoration:none;"><a
href="<?php echo HTTP::redirect(HTTP::getShopUrlDomain() . 'index.php'); ?>">Go to the web store</a></span>
</div>
</div>
Expand All @@ -58,5 +65,9 @@
</div>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<?php
exit;
?>
</body>
</html>

13 changes: 3 additions & 10 deletions error_documents/error_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
*/
?>

<!DOCTYPE html>
<html>
<head>
Expand All @@ -19,22 +18,16 @@
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<!-- CSS only -->
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<base href="<?php echo $_SERVER['HTTP_HOST']; ?>">

<script src="https://kit.fontawesome.com/89fdf54890.js" crossorigin="anonymous"></script>
<title>Template problem !</title>
</head>
<body>
<div style="padding-top:100px;"></div>
<div class="alert alert-warning" role="alert">
<div class="text-center">Le nom de ce template n'existe pas ou plus. Veuillez changer le nom du template.</div>
<div class="text-center" style="padding-top:10px">This template name does'nt exist. Please change your template
name.
</div>
<div class="text-center" style="padding-top:50px;"><a href="<?php echo $_SERVER['HTTP_HOST']; ?>"><img
src="images/logo_clicshopping.webp" alt="ClicShopping"></a></div>
<div class="text-center" style="padding-top:10px">This template name does'nt exist. Please change your template name.</div>
<div class="text-center" style="padding-top:50px;"><a href="<?php echo $_SERVER['HTTP_HOST']; ?>"><img src="images/logo_clicshopping.webp" alt="ClicShopping"></a></div>
</div>
</body>
<!-- JavaScript Bundle with Popper -->
Expand Down
9 changes: 2 additions & 7 deletions error_documents/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Maintenance</title>
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<!-- CSS only -->
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

<script src="https://kit.fontawesome.com/89fdf54890.js" crossorigin="anonymous"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
</head>
<body>
<div class="text-center" style="padding-top:150px;">
Expand All @@ -37,8 +33,7 @@
<div class="jumbotron" style="margin-top: 40px;">
<h1>We'll be back soon!</h1>
<p>We're currently working on and improving our website. We'll be back in a few moments..</p>
<p
style="margin-top: 40px;"><?php echo HTML::button('Return to website', null, CLICSHOPPING::link(), 'primary', null, 'sm'); ?></p>
<p style="margin-top: 40px;"><?php echo HTML::button('Return to website', null, CLICSHOPPING::link(), 'primary', null, 'sm'); ?></p>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0',
'reference' => '05f582da528242505480bfdbdbb0385c87c25215',
'name' => '__root__',
),
'versions' =>
Expand All @@ -42,7 +42,7 @@ class InstalledVersions
'aliases' =>
array (
),
'reference' => '5d0e3be779bce467ecda590f9004e08b709992d0',
'reference' => '05f582da528242505480bfdbdbb0385c87c25215',
),
'darkghosthunter/preloader' =>
array (
Expand Down Expand Up @@ -100,12 +100,12 @@ class InstalledVersions
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.5.4',
'version' => '6.5.4.0',
'pretty_version' => 'v6.6.0',
'version' => '6.6.0.0',
'aliases' =>
array (
),
'reference' => 'c0d9f7dd3c2aa247ca44791e9209233829d82285',
'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1',
),
'phpxmlrpc/phpxmlrpc' =>
array (
Expand Down Expand Up @@ -152,12 +152,12 @@ class InstalledVersions
),
'stripe/stripe-php' =>
array (
'pretty_version' => 'v7.114.0',
'version' => '7.114.0.0',
'pretty_version' => 'v7.116.0',
'version' => '7.116.0.0',
'aliases' =>
array (
),
'reference' => '63be231686c6874befb5b3a47fb8effb4c30b78b',
'reference' => '7a39f594f213ed3f443a95adf769d1ecbc8393e7',
),
'stymiee/email-validator' =>
array (
Expand Down
28 changes: 14 additions & 14 deletions includes/ClicShopping/External/vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -464,17 +464,17 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.5.4",
"version_normalized": "6.5.4.0",
"version": "v6.6.0",
"version_normalized": "6.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285"
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c0d9f7dd3c2aa247ca44791e9209233829d82285",
"reference": "c0d9f7dd3c2aa247ca44791e9209233829d82285",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"shasum": ""
},
"require": {
Expand All @@ -501,7 +501,7 @@
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2022-02-17T08:19:04+00:00",
"time": "2022-02-28T15:31:21+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -533,7 +533,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.4"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
},
"funding": [
{
Expand Down Expand Up @@ -745,17 +745,17 @@
},
{
"name": "stripe/stripe-php",
"version": "v7.114.0",
"version_normalized": "7.114.0.0",
"version": "v7.116.0",
"version_normalized": "7.116.0.0",
"source": {
"type": "git",
"url": "https://github.com/stripe/stripe-php.git",
"reference": "63be231686c6874befb5b3a47fb8effb4c30b78b"
"reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/63be231686c6874befb5b3a47fb8effb4c30b78b",
"reference": "63be231686c6874befb5b3a47fb8effb4c30b78b",
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a39f594f213ed3f443a95adf769d1ecbc8393e7",
"reference": "7a39f594f213ed3f443a95adf769d1ecbc8393e7",
"shasum": ""
},
"require": {
Expand All @@ -770,7 +770,7 @@
"phpunit/phpunit": "^5.7 || ^9.0",
"squizlabs/php_codesniffer": "^3.3"
},
"time": "2022-02-15T22:48:31+00:00",
"time": "2022-03-02T15:51:15+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -802,7 +802,7 @@
],
"support": {
"issues": "https://github.com/stripe/stripe-php/issues",
"source": "https://github.com/stripe/stripe-php/tree/v7.114.0"
"source": "https://github.com/stripe/stripe-php/tree/v7.116.0"
},
"install-path": "../stripe/stripe-php"
},
Expand Down
Loading

0 comments on commit b802594

Please sign in to comment.