Prechádzať zdrojové kódy

Added more YII_ENV constants.

Qiang Xue 12 rokov pred
rodič
commit
7f05967cf5
2 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 1 1
      config/web.php
  2. 1 1
      controllers/SiteController.php

+ 1 - 1
config/web.php

@@ -7,7 +7,7 @@ return array(
 	'modules' => array(
 		'debug' => array(
 			'class' => 'yii\debug\Module',
-			'enabled' => YII_DEBUG && YII_ENV === 'dev',
+			'enabled' => YII_DEBUG && YII_ENV_DEV,
 		),
 	),
 	'components' => array(

+ 1 - 1
controllers/SiteController.php

@@ -14,7 +14,7 @@ class SiteController extends Controller
 		return array(
 			'captcha' => array(
 				'class' => 'yii\web\CaptchaAction',
-				'fixedVerifyCode' => YII_ENV === 'test' ? 'testme' : null,
+				'fixedVerifyCode' => YII_ENV_DEV ? 'testme' : null,
 			),
 		);
 	}