Commit 4908e93c04f619e0948fb26d3b0eec834fbde5f4

Authored by alex
2 parents 9c253d8a 8e33baf9

Merge remote-tracking branch 'origin/master'

@@ -186,16 +186,16 @@ @@ -186,16 +186,16 @@
186 }, 186 },
187 { 187 {
188 "name": "bower-asset/bootstrap-daterangepicker", 188 "name": "bower-asset/bootstrap-daterangepicker",
189 - "version": "v3.0.1", 189 + "version": "v3.0.2",
190 "source": { 190 "source": {
191 "type": "git", 191 "type": "git",
192 "url": "https://github.com/dangrossman/daterangepicker.git", 192 "url": "https://github.com/dangrossman/daterangepicker.git",
193 - "reference": "b17e061234bf80df062cd9f83ce2f422b15c3006" 193 + "reference": "fba7dc416be6b38a6b2051cf6bdc84920f8cd6f7"
194 }, 194 },
195 "dist": { 195 "dist": {
196 "type": "zip", 196 "type": "zip",
197 - "url": "https://api.github.com/repos/dangrossman/daterangepicker/zipball/b17e061234bf80df062cd9f83ce2f422b15c3006",  
198 - "reference": "b17e061234bf80df062cd9f83ce2f422b15c3006", 197 + "url": "https://api.github.com/repos/dangrossman/daterangepicker/zipball/fba7dc416be6b38a6b2051cf6bdc84920f8cd6f7",
  198 + "reference": "fba7dc416be6b38a6b2051cf6bdc84920f8cd6f7",
199 "shasum": null 199 "shasum": null
200 }, 200 },
201 "require": { 201 "require": {
@@ -883,16 +883,16 @@ @@ -883,16 +883,16 @@
883 }, 883 },
884 { 884 {
885 "name": "google/apiclient-services", 885 "name": "google/apiclient-services",
886 - "version": "v0.58", 886 + "version": "v0.60",
887 "source": { 887 "source": {
888 "type": "git", 888 "type": "git",
889 "url": "https://github.com/google/google-api-php-client-services.git", 889 "url": "https://github.com/google/google-api-php-client-services.git",
890 - "reference": "e21760a34daea7bc29e2866b62f8c8db4e91228d" 890 + "reference": "80404044884da8ed7e6fcbd4fa96e2ad7db46e94"
891 }, 891 },
892 "dist": { 892 "dist": {
893 "type": "zip", 893 "type": "zip",
894 - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/e21760a34daea7bc29e2866b62f8c8db4e91228d",  
895 - "reference": "e21760a34daea7bc29e2866b62f8c8db4e91228d", 894 + "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/80404044884da8ed7e6fcbd4fa96e2ad7db46e94",
  895 + "reference": "80404044884da8ed7e6fcbd4fa96e2ad7db46e94",
896 "shasum": "" 896 "shasum": ""
897 }, 897 },
898 "require": { 898 "require": {
@@ -916,7 +916,7 @@ @@ -916,7 +916,7 @@
916 "keywords": [ 916 "keywords": [
917 "google" 917 "google"
918 ], 918 ],
919 - "time": "2018-05-06T00:22:52+00:00" 919 + "time": "2018-05-19T00:23:51+00:00"
920 }, 920 },
921 { 921 {
922 "name": "google/auth", 922 "name": "google/auth",
@@ -2643,16 +2643,16 @@ @@ -2643,16 +2643,16 @@
2643 }, 2643 },
2644 { 2644 {
2645 "name": "tinymce/tinymce", 2645 "name": "tinymce/tinymce",
2646 - "version": "4.7.12", 2646 + "version": "4.7.13",
2647 "source": { 2647 "source": {
2648 "type": "git", 2648 "type": "git",
2649 "url": "https://github.com/tinymce/tinymce-dist.git", 2649 "url": "https://github.com/tinymce/tinymce-dist.git",
2650 - "reference": "914887eeeb9a28034045879defa09defccf7c68a" 2650 + "reference": "2d2cd37932279723b4a5e4d259bc94123acbe666"
2651 }, 2651 },
2652 "dist": { 2652 "dist": {
2653 "type": "zip", 2653 "type": "zip",
2654 - "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/914887eeeb9a28034045879defa09defccf7c68a",  
2655 - "reference": "914887eeeb9a28034045879defa09defccf7c68a", 2654 + "url": "https://api.github.com/repos/tinymce/tinymce-dist/zipball/2d2cd37932279723b4a5e4d259bc94123acbe666",
  2655 + "reference": "2d2cd37932279723b4a5e4d259bc94123acbe666",
2656 "shasum": "" 2656 "shasum": ""
2657 }, 2657 },
2658 "type": "component", 2658 "type": "component",
@@ -2685,7 +2685,7 @@ @@ -2685,7 +2685,7 @@
2685 "tinymce", 2685 "tinymce",
2686 "wysiwyg" 2686 "wysiwyg"
2687 ], 2687 ],
2688 - "time": "2018-05-03T13:38:00+00:00" 2688 + "time": "2018-05-16T04:27:27+00:00"
2689 }, 2689 },
2690 { 2690 {
2691 "name": "tubalmartin/cssmin", 2691 "name": "tubalmartin/cssmin",
@@ -3576,22 +3576,22 @@ @@ -3576,22 +3576,22 @@
3576 }, 3576 },
3577 { 3577 {
3578 "name": "codeception/phpunit-wrapper", 3578 "name": "codeception/phpunit-wrapper",
3579 - "version": "7.1.1", 3579 + "version": "7.1.2",
3580 "source": { 3580 "source": {
3581 "type": "git", 3581 "type": "git",
3582 "url": "https://github.com/Codeception/phpunit-wrapper.git", 3582 "url": "https://github.com/Codeception/phpunit-wrapper.git",
3583 - "reference": "33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc" 3583 + "reference": "374dd623668a0028e29c95b362e20d03f8c4e65b"
3584 }, 3584 },
3585 "dist": { 3585 "dist": {
3586 "type": "zip", 3586 "type": "zip",
3587 - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc",  
3588 - "reference": "33e8ccf2f7abf5c031eeae9802b821d30ec0f7fc", 3587 + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/374dd623668a0028e29c95b362e20d03f8c4e65b",
  3588 + "reference": "374dd623668a0028e29c95b362e20d03f8c4e65b",
3589 "shasum": "" 3589 "shasum": ""
3590 }, 3590 },
3591 "require": { 3591 "require": {
3592 "phpunit/php-code-coverage": "^6.0", 3592 "phpunit/php-code-coverage": "^6.0",
3593 "phpunit/phpunit": "^7.1", 3593 "phpunit/phpunit": "^7.1",
3594 - "sebastian/comparator": "^2.0", 3594 + "sebastian/comparator": "^3.0",
3595 "sebastian/diff": "^3.0" 3595 "sebastian/diff": "^3.0"
3596 }, 3596 },
3597 "require-dev": { 3597 "require-dev": {
@@ -3615,20 +3615,20 @@ @@ -3615,20 +3615,20 @@
3615 } 3615 }
3616 ], 3616 ],
3617 "description": "PHPUnit classes used by Codeception", 3617 "description": "PHPUnit classes used by Codeception",
3618 - "time": "2018-04-20T10:17:13+00:00" 3618 + "time": "2018-05-17T08:30:48+00:00"
3619 }, 3619 },
3620 { 3620 {
3621 "name": "codeception/stub", 3621 "name": "codeception/stub",
3622 - "version": "1.0.2", 3622 + "version": "1.0.4",
3623 "source": { 3623 "source": {
3624 "type": "git", 3624 "type": "git",
3625 "url": "https://github.com/Codeception/Stub.git", 3625 "url": "https://github.com/Codeception/Stub.git",
3626 - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99" 3626 + "reference": "681b62348837a5ef07d10d8a226f5bc358cc8805"
3627 }, 3627 },
3628 "dist": { 3628 "dist": {
3629 "type": "zip", 3629 "type": "zip",
3630 - "url": "https://api.github.com/repos/Codeception/Stub/zipball/95fb7a36b81890dd2e5163e7ab31310df6f1bb99",  
3631 - "reference": "95fb7a36b81890dd2e5163e7ab31310df6f1bb99", 3630 + "url": "https://api.github.com/repos/Codeception/Stub/zipball/681b62348837a5ef07d10d8a226f5bc358cc8805",
  3631 + "reference": "681b62348837a5ef07d10d8a226f5bc358cc8805",
3632 "shasum": "" 3632 "shasum": ""
3633 }, 3633 },
3634 "require": { 3634 "require": {
@@ -3648,7 +3648,7 @@ @@ -3648,7 +3648,7 @@
3648 "MIT" 3648 "MIT"
3649 ], 3649 ],
3650 "description": "Flexible Stub wrapper for PHPUnit's Mock Builder", 3650 "description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
3651 - "time": "2018-02-18T13:56:56+00:00" 3651 + "time": "2018-05-17T09:31:08+00:00"
3652 }, 3652 },
3653 { 3653 {
3654 "name": "codeception/verify", 3654 "name": "codeception/verify",
@@ -4441,16 +4441,16 @@ @@ -4441,16 +4441,16 @@
4441 }, 4441 },
4442 { 4442 {
4443 "name": "phpunit/phpunit", 4443 "name": "phpunit/phpunit",
4444 - "version": "7.1.4", 4444 + "version": "7.1.5",
4445 "source": { 4445 "source": {
4446 "type": "git", 4446 "type": "git",
4447 "url": "https://github.com/sebastianbergmann/phpunit.git", 4447 "url": "https://github.com/sebastianbergmann/phpunit.git",
4448 - "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb" 4448 + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435"
4449 }, 4449 },
4450 "dist": { 4450 "dist": {
4451 "type": "zip", 4451 "type": "zip",
4452 - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6d51299e307dc510149e0b7cd1931dd11770e1cb",  
4453 - "reference": "6d51299e307dc510149e0b7cd1931dd11770e1cb", 4452 + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ca64dba53b88aba6af32aebc6b388068db95c435",
  4453 + "reference": "ca64dba53b88aba6af32aebc6b388068db95c435",
4454 "shasum": "" 4454 "shasum": ""
4455 }, 4455 },
4456 "require": { 4456 "require": {
@@ -4469,7 +4469,7 @@ @@ -4469,7 +4469,7 @@
4469 "phpunit/php-text-template": "^1.2.1", 4469 "phpunit/php-text-template": "^1.2.1",
4470 "phpunit/php-timer": "^2.0", 4470 "phpunit/php-timer": "^2.0",
4471 "phpunit/phpunit-mock-objects": "^6.1.1", 4471 "phpunit/phpunit-mock-objects": "^6.1.1",
4472 - "sebastian/comparator": "^2.1 || ^3.0", 4472 + "sebastian/comparator": "^3.0",
4473 "sebastian/diff": "^3.0", 4473 "sebastian/diff": "^3.0",
4474 "sebastian/environment": "^3.1", 4474 "sebastian/environment": "^3.1",
4475 "sebastian/exporter": "^3.1", 4475 "sebastian/exporter": "^3.1",
@@ -4517,7 +4517,7 @@ @@ -4517,7 +4517,7 @@
4517 "testing", 4517 "testing",
4518 "xunit" 4518 "xunit"
4519 ], 4519 ],
4520 - "time": "2018-04-18T13:41:53+00:00" 4520 + "time": "2018-04-29T15:09:19+00:00"
4521 }, 4521 },
4522 { 4522 {
4523 "name": "phpunit/phpunit-mock-objects", 4523 "name": "phpunit/phpunit-mock-objects",
@@ -4622,30 +4622,30 @@ @@ -4622,30 +4622,30 @@
4622 }, 4622 },
4623 { 4623 {
4624 "name": "sebastian/comparator", 4624 "name": "sebastian/comparator",
4625 - "version": "2.1.3", 4625 + "version": "3.0.0",
4626 "source": { 4626 "source": {
4627 "type": "git", 4627 "type": "git",
4628 "url": "https://github.com/sebastianbergmann/comparator.git", 4628 "url": "https://github.com/sebastianbergmann/comparator.git",
4629 - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" 4629 + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5"
4630 }, 4630 },
4631 "dist": { 4631 "dist": {
4632 "type": "zip", 4632 "type": "zip",
4633 - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",  
4634 - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", 4633 + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/ed5fd2281113729f1ebcc64d101ad66028aeb3d5",
  4634 + "reference": "ed5fd2281113729f1ebcc64d101ad66028aeb3d5",
4635 "shasum": "" 4635 "shasum": ""
4636 }, 4636 },
4637 "require": { 4637 "require": {
4638 - "php": "^7.0",  
4639 - "sebastian/diff": "^2.0 || ^3.0", 4638 + "php": "^7.1",
  4639 + "sebastian/diff": "^3.0",
4640 "sebastian/exporter": "^3.1" 4640 "sebastian/exporter": "^3.1"
4641 }, 4641 },
4642 "require-dev": { 4642 "require-dev": {
4643 - "phpunit/phpunit": "^6.4" 4643 + "phpunit/phpunit": "^7.1"
4644 }, 4644 },
4645 "type": "library", 4645 "type": "library",
4646 "extra": { 4646 "extra": {
4647 "branch-alias": { 4647 "branch-alias": {
4648 - "dev-master": "2.1.x-dev" 4648 + "dev-master": "3.0-dev"
4649 } 4649 }
4650 }, 4650 },
4651 "autoload": { 4651 "autoload": {
@@ -4682,7 +4682,7 @@ @@ -4682,7 +4682,7 @@
4682 "compare", 4682 "compare",
4683 "equality" 4683 "equality"
4684 ], 4684 ],
4685 - "time": "2018-02-01T13:46:46+00:00" 4685 + "time": "2018-04-18T13:33:00+00:00"
4686 }, 4686 },
4687 { 4687 {
4688 "name": "sebastian/diff", 4688 "name": "sebastian/diff",
frontend/controllers/BlogController.php
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 use common\models\blog\Category; 6 use common\models\blog\Category;
7 use common\models\blog\Tag; 7 use common\models\blog\Tag;
8 use yii\data\ActiveDataProvider; 8 use yii\data\ActiveDataProvider;
  9 + use yii\db\ActiveQuery;
9 use yii\web\Controller; 10 use yii\web\Controller;
10 use yii\web\NotFoundHttpException; 11 use yii\web\NotFoundHttpException;
11 12
@@ -47,7 +48,9 @@ @@ -47,7 +48,9 @@
47 ) 48 )
48 ->with( 49 ->with(
49 [ 50 [
50 - 'categories.language', 51 + 'categories' => function (ActiveQuery $query){
  52 + $query->with('language')->where(['status' => true]);
  53 + },
51 ] 54 ]
52 55
53 ) 56 )
@@ -123,7 +126,9 @@ @@ -123,7 +126,9 @@
123 ->where(['status' => true]) 126 ->where(['status' => true])
124 ->orderBy([ 'sort' => SORT_ASC ]) 127 ->orderBy([ 'sort' => SORT_ASC ])
125 ->one(); 128 ->one();
126 - 129 + if (empty($model)){
  130 + throw new NotFoundHttpException();
  131 + }
127 $dataProvider = new ActiveDataProvider( 132 $dataProvider = new ActiveDataProvider(
128 [ 133 [
129 'query' => $model->getArticles() 134 'query' => $model->getArticles()
@@ -188,9 +193,15 @@ @@ -188,9 +193,15 @@
188 ->with( 193 ->with(
189 [ 194 [
190 'language', 195 'language',
191 - 'categories.language',  
192 ] 196 ]
193 - ) 197 + )->with(
  198 + [
  199 + 'categories' => function (ActiveQuery $query){
  200 + $query->with('language')->where(['status' => true]);
  201 + },
  202 + ]
  203 +
  204 + )
194 ->where(['blog_article.status' => true]) 205 ->where(['blog_article.status' => true])
195 ->orderBy( 206 ->orderBy(
196 [ 207 [
@@ -229,10 +240,16 @@ @@ -229,10 +240,16 @@
229 ->with( 240 ->with(
230 [ 241 [
231 'language', 242 'language',
232 - 'categories.language',  
233 'tags.language', 243 'tags.language',
234 ] 244 ]
235 - ) 245 + )->with(
  246 + [
  247 + 'categories' => function (ActiveQuery $query){
  248 + $query->with('language')->where(['status' => true]);
  249 + },
  250 + ]
  251 +
  252 + )
236 ->andWhere([ 'status' => true ]) 253 ->andWhere([ 'status' => true ])
237 ->one(); 254 ->one();
238 255
frontend/views/site/index.php
@@ -16,8 +16,9 @@ @@ -16,8 +16,9 @@
16 <!-- *** HOMEPAGE CAROUSEL *** 16 <!-- *** HOMEPAGE CAROUSEL ***
17 _________________________________________________________ --> 17 _________________________________________________________ -->
18 18
19 - <div class="home-carousel" <?=$slides[0]->background !== null ? ' style="background: url('.$slides[0]->background->getUrl().') center center repeat;"' : ''?>>  
20 - 19 +<!-- <div class="home-carousel" --><?//=$slides[0]->background !== null ? ' style="background: url('.$slides[0]->background->getUrl().') center center repeat;"' : ''?><!-->
  20 + <div class="home-carousel">
  21 +
21 <div class="dark-mask"></div> 22 <div class="dark-mask"></div>
22 23
23 <div class="container"> 24 <div class="container">
frontend/web/css/style.blue.css
@@ -3,4 +3,4 @@ @@ -3,4 +3,4 @@
3 * http://geedmo.github.com/yamm3 3 * http://geedmo.github.com/yamm3
4 * 4 *
5 * @geedmo - Licensed under the MIT license 5 * @geedmo - Licensed under the MIT license
6 - */.yamm .nav,.yamm .collapse,.yamm .dropup.use-yamm,.yamm .dropdown.use-yamm{position:static}.yamm .container{position:relative}.yamm .dropdown-menu{left:auto}.yamm .nav.navbar-right .dropdown-menu{left:auto;right:0}.yamm .yamm-content{padding:20px 30px}.yamm .dropdown.yamm-fw .dropdown-menu{left:15px;right:15px}#back-to-top{background-color:#294d76;}#back-to-top:hover{background-color:#2e6a98;}  
7 \ No newline at end of file 6 \ No newline at end of file
  7 + */.yamm .nav,.yamm .collapse,.yamm .dropup.use-yamm,.yamm .dropdown.use-yamm{position:static}.yamm .container{position:relative}.yamm .dropdown-menu{left:auto}.yamm .nav.navbar-right .dropdown-menu{left:auto;right:0}.yamm .yamm-content{padding:20px 30px}.yamm .dropdown.yamm-fw .dropdown-menu{left:15px;right:15px}#back-to-top{background-color:#294d76;}#back-to-top:hover{background-color:#2e6a98;}.home-carousel{background:none !important;}.home-carousel .dark-mask {background:#578bc5;opacity:1;}#top .social a,#top .social {color:#fff}#top {background: #999;}.contact a {font-weight:700;color:#2f5a89;}
8 \ No newline at end of file 8 \ No newline at end of file