瀏覽代碼

Passage PHP 7.4 #287

prodstable
Guillaume Bourgeois 2 年之前
父節點
當前提交
40e5f1cbb1
共有 10 個文件被更改,包括 29374 次插入12 次删除
  1. +1
    -1
      backend/controllers/OrderController.php
  2. +1
    -1
      backend/views/layouts/content.php
  3. +1
    -1
      common/models/CreditHistory.php
  4. +1
    -1
      common/models/Producer.php
  5. +0
    -2
      common/models/ProductDistribution.php
  6. +4
    -1
      composer.json
  7. +0
    -0
      frontend/web/assets/.gitignore
  8. +29358
    -0
      producer/runtime/logs/app.log
  9. +1
    -1
      producer/views/layouts/main.php
  10. +7
    -4
      setPermissionsOpenDistrib.sh

+ 1
- 1
backend/controllers/OrderController.php 查看文件

@@ -825,7 +825,7 @@ class OrderController extends BackendController
if (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/", $date) &&
($idUser || strlen($username)) &&
$pointSale &&
count($products) &&
count(get_object_vars($products)) &&
$distribution) {

$order = new Order;

+ 1
- 1
backend/views/layouts/content.php 查看文件

@@ -57,7 +57,7 @@ use dmstr\widgets\Alert;
} ?>
<?php
if(count($this->buttons)) {
if($this->buttons && count($this->buttons)) {
foreach($this->buttons as $button) {
echo '<a href="'.Yii::$app->urlManagerBackend->createUrl($button['url']).'" class="'.$button['class'].'">'.$button['label'].'</a>' ;
}

+ 1
- 1
common/models/CreditHistory.php 查看文件

@@ -302,7 +302,7 @@ class CreditHistory extends ActiveRecordCommon
}
if($this->type == self::TYPE_PAYMENT || $this->type == self::TYPE_REFUND) {
if(isset($this->order)) {
if(isset($this->order) && isset($this->order->distribution)) {
$str .= '<br />Commande : '.date('d/m/Y',strtotime($this->order->distribution->date)) ;
}
else {

+ 1
- 1
common/models/Producer.php 查看文件

@@ -820,7 +820,7 @@ class Producer extends ActiveRecordCommon

public function isOnlinePaymentActive()
{
return $this->online_payment || ($this->option_stripe_mode_test && Yii::$app->user->identity->status > 10);
return $this->online_payment || ($this->option_stripe_mode_test && !Yii::$app->user->isGuest && Yii::$app->user->identity->status > 10);
}

public function isOnlinePaymentActiveAndTypeOrder()

+ 0
- 2
common/models/ProductDistribution.php 查看文件

@@ -38,8 +38,6 @@ termes.

namespace common\models;

use Yii ;
use yii\base\Object;
use common\components\ActiveRecordCommon ;

/**

+ 4
- 1
composer.json 查看文件

@@ -40,7 +40,10 @@
"codeception/codeception": "^2.3"
},
"config": {
"process-timeout": 1800
"process-timeout": 1800,
"allow-plugins": {
"yiisoft/yii2-composer": true
}
},
"extra": {
"asset-installer-paths": {

+ 0
- 0
frontend/web/assets/.gitignore 查看文件


+ 29358
- 0
producer/runtime/logs/app.log
文件差異過大導致無法顯示
查看文件


+ 1
- 1
producer/views/layouts/main.php 查看文件

@@ -269,7 +269,7 @@ if (!Yii::$app->user->isGuest) {
<h2 id="page-title">
<?= $this->getTitle(); ?>
<?php
if (count($this->buttons)): ?>
if ($this->buttons && count($this->buttons)): ?>
<span id="buttons">
<?php foreach ($this->buttons as $button) {
echo '<a href="' . Yii::$app->urlManagerProducer->createUrl($button['url']) . '" class="' . $button['class'] . '">' . $button['label'] . '</a>';

+ 7
- 4
setPermissionsOpenDistrib.sh 查看文件

@@ -1,12 +1,15 @@
#!/usr/bin/env bash
sudo chown fab:www-data frontend/runtime/ -R

sudo chown guillaume:www-data . -R

sudo chown guillaume:www-data frontend/runtime/ -R
chmod 775 frontend/runtime/

sudo chown fab:www-data frontend/web/assets/ -R
sudo chown guillaume:www-data frontend/web/assets/ -R
sudo chmod 775 frontend/web/assets/ -R

sudo chown fab:www-data backend/runtime/ -R
sudo chown guillaume:www-data backend/runtime/ -R
sudo chmod 775 backend/runtime/ -R

sudo chown fab:www-data backend/web/assets/ -R
sudo chown guillaume:www-data backend/web/assets/ -R
sudo chmod 775 backend/web/assets/ -R

Loading…
取消
儲存