Skip to content

Commit a4b6a24

Browse files
authored
Merge pull request #2006 from opensource-workshop/2.18.1
Merge v1.18.1 into 2 - composer update
2 parents 549b9d2 + 9db454b commit a4b6a24

File tree

20 files changed

+120
-46
lines changed

20 files changed

+120
-46
lines changed

.github/workflows/laravel_dusk_connect-cms-test-matrix.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ jobs:
7878
run: |
7979
mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
8080
81-
# - name: PHP 7.3 changes database user authentication method
82-
# run: |
83-
# if [[ "$PHP_VERSION" = "7.3" ]]; then
84-
# mysql --user="root" --password="root" -e "alter user 'root'@'localhost' identified with mysql_native_password by 'root';"
85-
# mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
86-
# fi
87-
# env:
88-
# PHP_VERSION: ${{ matrix.php }}
81+
- name: PHP 7.3 changes database user authentication method
82+
run: |
83+
if [[ "$PHP_VERSION" = "7.3" ]]; then
84+
mysql --user="root" --password="root" -e "alter user 'root'@'localhost' identified with mysql_native_password by 'root';"
85+
mysql --user="root" --password="root" -e "SELECT user, host, plugin FROM mysql.user;"
86+
fi
87+
env:
88+
PHP_VERSION: ${{ matrix.php }}
8989

9090
# Composer
9191
- name: Validate composer.json and composer.lock
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace App\Enums;
4+
5+
use App\Enums\EnumsBase;
6+
7+
/**
8+
* スマホメニューの表示形式
9+
*/
10+
final class SmartphoneMenuTemplateType extends EnumsBase
11+
{
12+
// 定数メンバ
13+
const none = '';
14+
const opencurrenttree = 'opencurrenttree';
15+
16+
// key/valueの連想配列
17+
const enum = [
18+
self::none => 'ページをすべて表示する',
19+
self::opencurrenttree => '今いるページ配下を表示する',
20+
];
21+
}

app/Plugins/Manage/CodeManage/CodeManage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ public function downloadCsv($request, $page_id = null, $sub_id = null, $data_out
10971097
$filename = 'codes.csv';
10981098
$headers = [
10991099
'Content-Type' => 'text/csv',
1100-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
1100+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
11011101
];
11021102

11031103
// データ

app/Plugins/Manage/SiteManage/SiteManage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use App\Plugins\Manage\SiteManage\CCPDF;
2222
use App\Enums\BaseLoginRedirectPage;
2323
use App\Enums\StatusType;
24+
use App\Enums\SmartphoneMenuTemplateType;
2425
use App\Utilities\File\FileUtils;
2526

2627
/* 移行データ用 */
@@ -451,11 +452,11 @@ public function update($request, $page_id = null)
451452
'value' => (isset($request->base_touch_callout) ? $request->base_touch_callout : 0)]
452453
);
453454

454-
// スマホメニューのフォーマット
455+
// スマホメニューの表示形式
455456
$configs = Configs::updateOrCreate(
456457
['name' => 'smartphone_menu_template'],
457458
['category' => 'general',
458-
'value' => (isset($request->smartphone_menu_template) ? $request->smartphone_menu_template : "")]
459+
'value' => (isset($request->smartphone_menu_template) ? $request->smartphone_menu_template : SmartphoneMenuTemplateType::none)]
459460
);
460461

461462
// ページ管理画面に戻る

app/Plugins/Manage/UserManage/UserManage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ public function downloadCsv($request, $id = null, $sub_id = null, $data_output_f
16691669
}
16701670
$headers = [
16711671
'Content-Type' => 'text/csv',
1672-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
1672+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
16731673
];
16741674

16751675
// データ

app/Plugins/User/Counters/CountersPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public function downloadCsv($request, $page_id, $frame_id, $id)
461461
$filename = $counter->name . '.csv';
462462
$headers = [
463463
'Content-Type' => 'text/csv',
464-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
464+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
465465
];
466466

467467
// データ

app/Plugins/User/Databases/DatabasesPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3145,7 +3145,7 @@ public function downloadCsv($request, $page_id, $frame_id, $id, $data_output_fla
31453145
$filename = $database->databases_name . '.csv';
31463146
$headers = [
31473147
'Content-Type' => 'text/csv',
3148-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
3148+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
31493149
];
31503150

31513151
// データ

app/Plugins/User/Forms/FormsPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2532,7 +2532,7 @@ public function downloadCsv($request, $page_id, $frame_id, $id)
25322532
$filename = $form->forms_name . '.csv';
25332533
$headers = [
25342534
'Content-Type' => 'text/csv',
2535-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
2535+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
25362536
];
25372537

25382538
// データ

app/Plugins/User/Learningtasks/LearningtasksPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,7 @@ public function downloadCsv($request, $page_id, $frame_id, $id)
22192219
$filename = $learningtask->learningtasks_name . '.csv';
22202220
$headers = [
22212221
'Content-Type' => 'text/csv',
2222-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
2222+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
22232223
];
22242224

22252225
// データ
@@ -2826,7 +2826,7 @@ public function downloadCsvExaminations($request, $page_id, $frame_id, $post_id,
28262826
$filename = 'examinations.csv';
28272827
$headers = [
28282828
'Content-Type' => 'text/csv',
2829-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
2829+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
28302830
];
28312831

28322832
// データ

app/Plugins/User/Opacs/OpacsPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2073,7 +2073,7 @@ public function downloadCsvLent($request, $page_id, $frame_id, $id)
20732073
$filename = 'lent_counts.csv';
20742074
$headers = [
20752075
'Content-Type' => 'text/csv',
2076-
'content-Disposition' => 'attachment; filename="'.$filename.'"',
2076+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
20772077
];
20782078

20792079
// データ

composer-dev.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@
6262
},
6363
{
6464
"name": "aws/aws-sdk-php",
65-
"version": "3.304.7",
65+
"version": "3.305.0",
6666
"source": {
6767
"type": "git",
6868
"url": "https://github.com/aws/aws-sdk-php.git",
69-
"reference": "b01905670e952b5c5cdc4902973120f62a14a7f4"
69+
"reference": "6992342acf7dd4501163c6cddabe76c74f2020ad"
7070
},
7171
"dist": {
7272
"type": "zip",
73-
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b01905670e952b5c5cdc4902973120f62a14a7f4",
74-
"reference": "b01905670e952b5c5cdc4902973120f62a14a7f4",
73+
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6992342acf7dd4501163c6cddabe76c74f2020ad",
74+
"reference": "6992342acf7dd4501163c6cddabe76c74f2020ad",
7575
"shasum": ""
7676
},
7777
"require": {
@@ -151,9 +151,9 @@
151151
"support": {
152152
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
153153
"issues": "https://github.com/aws/aws-sdk-php/issues",
154-
"source": "https://github.com/aws/aws-sdk-php/tree/3.304.7"
154+
"source": "https://github.com/aws/aws-sdk-php/tree/3.305.0"
155155
},
156-
"time": "2024-04-18T18:12:29+00:00"
156+
"time": "2024-04-22T18:07:07+00:00"
157157
},
158158
{
159159
"name": "azuyalabs/yasumi",
@@ -6773,16 +6773,16 @@
67736773
},
67746774
{
67756775
"name": "tecnickcom/tcpdf",
6776-
"version": "6.7.4",
6776+
"version": "6.7.5",
67776777
"source": {
67786778
"type": "git",
67796779
"url": "https://github.com/tecnickcom/TCPDF.git",
6780-
"reference": "d4adef47ca21c90e6483d59dcb9e5b1023696937"
6780+
"reference": "951eabf0338ec2522bd0d5d9c79b08a3a3d36b36"
67816781
},
67826782
"dist": {
67836783
"type": "zip",
6784-
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/d4adef47ca21c90e6483d59dcb9e5b1023696937",
6785-
"reference": "d4adef47ca21c90e6483d59dcb9e5b1023696937",
6784+
"url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/951eabf0338ec2522bd0d5d9c79b08a3a3d36b36",
6785+
"reference": "951eabf0338ec2522bd0d5d9c79b08a3a3d36b36",
67866786
"shasum": ""
67876787
},
67886788
"require": {
@@ -6833,15 +6833,15 @@
68336833
],
68346834
"support": {
68356835
"issues": "https://github.com/tecnickcom/TCPDF/issues",
6836-
"source": "https://github.com/tecnickcom/TCPDF/tree/6.7.4"
6836+
"source": "https://github.com/tecnickcom/TCPDF/tree/6.7.5"
68376837
},
68386838
"funding": [
68396839
{
68406840
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&currency_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
68416841
"type": "custom"
68426842
}
68436843
],
6844-
"time": "2024-03-25T23:56:24+00:00"
6844+
"time": "2024-04-20T17:25:10+00:00"
68456845
},
68466846
{
68476847
"name": "tijsverkoyen/css-to-inline-styles",

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@
327327
'BlogNarrowingDownTypeForCreatedId' => \App\Enums\BlogNarrowingDownTypeForCreatedId::class,
328328
'FormAccessLimitType' => \App\Enums\FormAccessLimitType::class,
329329
'EditType' => \App\Enums\EditType::class,
330+
'SmartphoneMenuTemplateType' => \App\Enums\SmartphoneMenuTemplateType::class,
330331

331332
// utils
332333
'DateUtils' => \App\Utilities\Date\DateUtils::class,

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.18.0',
15+
'cc_version' => '2.18.1',
1616

1717
'show_cc_version' => true,
1818
];
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
6+
use App\Enums\SmartphoneMenuTemplateType;
7+
8+
class InitializeSmartphoneMenuDefaults extends Migration
9+
{
10+
/**
11+
* Run the migrations.
12+
*
13+
* @return void
14+
*/
15+
public function up()
16+
{
17+
Schema::table('configs', function (Blueprint $table) {
18+
// nameにsmartphone_menu_templateが存在しなければ、valueをopencurrenttreeに設定したレコードを追加
19+
$config = DB::table('configs')->where('name', 'smartphone_menu_template')->first();
20+
if (empty($config)) {
21+
DB::table('configs')->insert([
22+
'name' => 'smartphone_menu_template',
23+
'value' => SmartphoneMenuTemplateType::opencurrenttree,
24+
'category' => 'general',
25+
]);
26+
}
27+
});
28+
}
29+
30+
/**
31+
* Reverse the migrations.
32+
*
33+
* @return void
34+
*/
35+
public function down()
36+
{
37+
Schema::table('configs', function (Blueprint $table) {
38+
// 既存レコードを削除する恐れがある為、down()は空のままにしておく
39+
});
40+
}
41+
}

resources/views/layouts/app.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@
159159
@foreach($page_list as $page_obj)
160160

161161
{{-- スマホメニューテンプレート(default) --}}
162-
@if (Configs::getConfigsValue($cc_configs, 'smartphone_menu_template', '') == '')
162+
@if (Configs::getConfigsValue($cc_configs, 'smartphone_menu_template', SmartphoneMenuTemplateType::none) == SmartphoneMenuTemplateType::none)
163163
{{-- default メニュー --}}
164164
@include('layouts.default_menu')
165-
@elseif (Configs::getConfigsValue($cc_configs, 'smartphone_menu_template') == 'opencurrenttree')
165+
@elseif (Configs::getConfigsValue($cc_configs, 'smartphone_menu_template') == SmartphoneMenuTemplateType::opencurrenttree)
166166
{{-- opencurrenttree メニュー --}}
167167
@include('layouts.opencurrenttree_menu')
168168
@endif

resources/views/plugins/manage/page/page_form.blade.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@
441441
<input name="base_display_flag" value="1" type="checkbox" class="custom-control-input" id="base_display_flag">
442442
@endif
443443
<label class="custom-control-label" for="base_display_flag" id="label_base_display_flag">表示する</label>
444+
<small class="form-text text-muted">※ 本設定は、スマホメニューと、メニュープラグインのページ表示条件で「ページ管理の条件」を選択した場合のメニュー表示に反映されます。</small>
444445
</div>
445446
</div>
446447
</div>

resources/views/plugins/manage/site/pdf/base_main.blade.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@
107107
<td>@php echo implode(', ', $image_nosaves); @endphp</td>
108108
</tr>
109109
<tr nobr="true">
110-
<td>スマホメニューのフォーマット</td>
111-
<td>{{Configs::getConfigsValue($configs, 'smartphone_menu_template', null)}}</td>
110+
<td>スマホメニューの表示形式</td>
111+
@php
112+
$smartphone_menu_template_type = Configs::getConfigsValue($configs, 'smartphone_menu_template', SmartphoneMenuTemplateType::none);
113+
@endphp
114+
<td>{{SmartphoneMenuTemplateType::getDescription($smartphone_menu_template_type)}}</td>
112115
</tr>
113116
</table>

resources/views/plugins/manage/site/site.blade.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,18 @@ class="custom-control-input"
387387
<small class="form-text text-muted">画像の保存機能を無効化するものを選択</small>
388388
</div>
389389

390-
{{-- スマホメニューのフォーマット --}}
390+
{{-- スマホメニューの表示形式 --}}
391391
<div class="form-group">
392-
<label class="col-form-label">スマホメニューのフォーマット</label>
392+
<label class="col-form-label">スマホメニューの表示形式</label>
393393
<select name="smartphone_menu_template" class="form-control">
394-
<option value=""@if(Configs::getConfigsValueAndOld($configs, "smartphone_menu_template") == "") selected @endif>default</option>
395-
<option value="opencurrenttree"@if(Configs::getConfigsValueAndOld($configs, "smartphone_menu_template") == "opencurrenttree") selected @endif>opencurrenttree</option>
394+
@foreach (SmartphoneMenuTemplateType::enum as $key => $value)
395+
<option
396+
value="{{ $key }}"
397+
@if(Configs::getConfigsValueAndOld($configs, "smartphone_menu_template") == $key) selected @endif
398+
>
399+
{{ SmartphoneMenuTemplateType::getDescription($key) }}
400+
</option>
401+
@endforeach
396402
</select>
397403
</div>
398404

tests/Browser/Manage/PageManageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function edit()
112112
},
113113
{"path": "manage/page/edit/images/edit2",
114114
"name": "ページ編集2",
115-
"comment": "<ul class=\"mb-0\"><li>テーマとレイアウトはページ毎に設定することもできます。</li><li>メニュー表示はメニューの基本設定で表示するか否かを指定できます。</li><li>IPアドレス制限は、このページを閲覧する際の閲覧元のIPアドレスを制限します。その他、様々な設定が可能です。</li></ul>"
115+
"comment": "<ul class=\"mb-0\"><li>テーマとレイアウトはページ毎に設定することもできます。</li><li>メニュー表示の設定は下記に反映されます。<ul><li>スマホのメニュー表示</li><li>メニュープラグインのページ表示条件で「ページ管理の条件」を選択した場合のメニュー表示</li></ul></li><li>IPアドレス制限は、このページを閲覧する際の閲覧元のIPアドレスを制限します。その他、様々な設定が可能です。</li></ul>"
116116
}
117117
]', null, 3, 'basic');
118118
}

0 commit comments

Comments
 (0)