Kaynağa Gözat

Merge pull request #966 from visuddhinanda/laravel

配置文件变更 redis.prefix
visuddhinanda 3 yıl önce
ebeveyn
işleme
fe6407397f

+ 2 - 1
.env.example

@@ -31,6 +31,7 @@ MEMCACHED_HOST=127.0.0.1
 REDIS_HOST=127.0.0.1
 REDIS_HOST=127.0.0.1
 REDIS_PASSWORD=null
 REDIS_PASSWORD=null
 REDIS_PORT=6379
 REDIS_PORT=6379
+REDIS_PREFIX=localhost://
 
 
 MAIL_MAILER=smtp
 MAIL_MAILER=smtp
 MAIL_HOST=mailhog
 MAIL_HOST=mailhog
@@ -62,4 +63,4 @@ ASSETS_SERVER="https://assets-hk.wikipali.org"
 SNOWFLAKE_DATA_CENTER_ID=1
 SNOWFLAKE_DATA_CENTER_ID=1
 SNOWFLAKE_WORKER_ID=1
 SNOWFLAKE_WORKER_ID=1
 
 
-REDIS_NAMESPACE=
+

+ 3 - 2
app/Http/Controllers/ProgressChapterController.php

@@ -59,8 +59,7 @@ class ProgressChapterController extends Controller
                     # code...
                     # code...
                     $aChannel[] = $channel->uid;
                     $aChannel[] = $channel->uid;
                 }
                 }
-                $chapters = ProgressChapter::select($selectCol)
-                                        ->whereIn('progress_chapters.channel_id', $aChannel)
+                $chapters = ProgressChapter::whereIn('progress_chapters.channel_id', $aChannel)
                                         ->leftJoin('pali_texts', function($join)
                                         ->leftJoin('pali_texts', function($join)
                                                 {
                                                 {
                                                     $join->on('progress_chapters.book', '=', 'pali_texts.book');
                                                     $join->on('progress_chapters.book', '=', 'pali_texts.book');
@@ -69,6 +68,8 @@ class ProgressChapterController extends Controller
                                         ->where('progress','>',0.85)
                                         ->where('progress','>',0.85)
                                         ->orderby('progress_chapters.created_at','desc')
                                         ->orderby('progress_chapters.created_at','desc')
                                         ->get();
                                         ->get();
+				$all_count = ProgressChapter::whereIn('progress_chapters.channel_id', $aChannel)
+									->where('progress','>',0.85)->count();
                 break;
                 break;
             case 'tag':
             case 'tag':
                 $tm = (new TagMap)->getTable();
                 $tm = (new TagMap)->getTable();

+ 5 - 0
change-logs.md

@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 
 ## [Unreleased]
 ## [Unreleased]
 
 
+## [1.0.10] - 2022-07-31
+
+- rename REDIS_NAMESPACE to REDIS_PREFIX  .env.example
+- rename Redis['namespace'] to Redis['prefix'] config.sample.php
+ 
 ## [1.0.9] - 2022-02-24
 ## [1.0.9] - 2022-02-24
 
 
 - add SCHEDULE_EMAIL_OUTPUTTO to .env
 - add SCHEDULE_EMAIL_OUTPUTTO to .env

+ 1 - 1
public/app/config.sample.php

@@ -46,7 +46,7 @@ define("Redis",[
 	"host" => "127.0.0.1",
 	"host" => "127.0.0.1",
 	"port" => 6379,
 	"port" => 6379,
 	"password" => "",
 	"password" => "",
-	"namespace"=>"aaa://"
+	"prefix="=>"localhost://"
 ]);
 ]);
 
 
 #目录设置,不能更改
 #目录设置,不能更改

+ 1 - 1
public/app/uhome/uhome.js

@@ -47,7 +47,7 @@ function render_palicanon_chapter_list(data){
                 title = 'unkow';
                 title = 'unkow';
             }
             }
             html += "<div class='title'>"+link+title+"</a>"+"<tag>"+"</tag></div>";
             html += "<div class='title'>"+link+title+"</a>"+"<tag>"+"</tag></div>";
-            html += "<div class='path'>长部>沙门果经"+"</div>";
+            html += "<div class='path'>"+iterator.path+"</div>";
             html += "<div class='date'> 创建:"+iterator.created_at+" 更新:"+iterator.updated_at+"</div>";
             html += "<div class='date'> 创建:"+iterator.created_at+" 更新:"+iterator.updated_at+"</div>";
             html += "</div>";
             html += "</div>";
         }
         }