Skip to content

Commit 3406eb2

Browse files
authored
Merge pull request #1969 from opensource-workshop/2.17.1
Merge v1.17.1 into 2
2 parents ffd13fc + 9324611 commit 3406eb2

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

app/Plugins/Manage/UserManage/UserManage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,8 @@ public function uploadCsv($request, $page_id = null)
19271927
// 状態
19281928
$status_col_no = array_search('status', $import_column_col_no);
19291929
$user->status = $csv_columns[$status_col_no];
1930+
// 項目セットID
1931+
$user->columns_set_id = $request->columns_set_id;
19301932

19311933
$user->save();
19321934

app/Plugins/User/Calendars/CalendarsPlugin.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
use Illuminate\Support\Collection;
66
use Illuminate\Support\Facades\Auth;
77
use Illuminate\Support\Facades\DB;
8-
use Illuminate\Support\Facades\Log;
98
use Illuminate\Support\Facades\Validator;
109

11-
//use Carbon\Carbon;
12-
1310
use App\Enums\StatusType;
1411

1512
use App\Models\Common\Buckets;
@@ -37,12 +34,6 @@
3734
*/
3835
class CalendarsPlugin extends UserPluginBase
3936
{
40-
/* DB migrate
41-
php artisan make:migration create_calendars --create=calendars
42-
php artisan make:migration create_calendar_posts --create=calendar_posts
43-
php artisan make:migration create_calendar_frames --create=calendar_frames
44-
*/
45-
4637
/* オブジェクト変数 */
4738

4839
/**
@@ -65,7 +56,7 @@ public function getPublicFunctions()
6556
}
6657

6758
/**
68-
* 権限定義
59+
* 権限定義
6960
*/
7061
public function declareRole()
7162
{
@@ -130,18 +121,20 @@ private function getPluginBucket($bucket_id)
130121
}
131122

132123
/**
133-
* POST一覧取得
124+
* POST一覧取得
134125
*/
135126
private function getPosts($from_date, $to_date)
136127
{
137128
// データ取得
138129
$posts_query = CalendarPost::select('calendar_posts.*')
139-
->join('calendars', function ($join) {
140-
$join->on('calendars.id', '=', 'calendar_posts.calendar_id')
141-
->where('calendars.bucket_id', '=', $this->frame->bucket_id);
142-
})
143-
->where('calendar_posts.start_date', '<=', $to_date)
144-
->where('calendar_posts.end_date', '>=', $from_date);
130+
->join('calendars', function ($join) {
131+
$join->on('calendars.id', '=', 'calendar_posts.calendar_id')
132+
->where('calendars.bucket_id', '=', $this->frame->bucket_id);
133+
})
134+
->where('calendar_posts.start_date', '<=', $to_date)
135+
->where('calendar_posts.end_date', '>=', $from_date)
136+
->orderBy('calendar_posts.start_date')
137+
->orderBy('calendar_posts.start_time');
145138

146139
// 権限によって表示する記事を絞る
147140
$posts_query = $this->appendAuthWhereBase($posts_query, 'calendar_posts');
@@ -316,7 +309,6 @@ public function index($request, $page_id, $frame_id)
316309
return $this->view('index', [
317310
'dates' => $dates,
318311
'posts' => $posts,
319-
// 'current_ym_first' => strtotime(session('calendar_year') . "/" . session('calendar_month') . "/01"),
320312
'current_ym_first' => strtotime(session($session_year_name) . "/" . session($session_month_name) . "/" . session($session_day_name)),
321313
'current_month' => session($session_month_name),
322314
'plugin_frame' => $plugin_frame,

config/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|
1313
*/
1414

15-
'cc_version' => '2.17.0',
15+
'cc_version' => '2.17.1',
1616

1717
'show_cc_version' => true,
1818
];

0 commit comments

Comments
 (0)