-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSiteSetting4authFixture.php
More file actions
86 lines (77 loc) · 2.08 KB
/
SiteSetting4authFixture.php
File metadata and controls
86 lines (77 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/**
* SiteSettingFixture
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
App::uses('SiteSetting4testFixture', 'SiteManager.Test/Fixture');
/**
* SiteSettingFixture
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @package NetCommons\SiteManager\Test\Fixture
*/
class SiteSetting4authFixture extends SiteSetting4testFixture {
/**
* Model name
*
* @var string
*/
public $name = 'SiteSetting';
/**
* Full Table Name
*
* @var string
*/
public $table = 'site_settings';
/**
* Records
*
* @var array
*/
public $records = array();
/**
* Initialize the fixture.
*
* @return void
*/
public function init() {
parent::init();
$targets = array(
// * パスワード再発行
// ** 新規パスワード通知の件名
'ForgotPass.issue_mail_subject',
// ** パスワード通知メールの本文
'ForgotPass.issue_mail_body',
// ** 新規パスワード発行の件名
'ForgotPass.request_mail_subject',
// ** パスワード発行メールの本文
'ForgotPass.request_mail_body',
// * 入会設定
// ** 利用許諾文
'AutoRegist.disclaimer',
// ** 会員登録承認メールの件名
'AutoRegist.approval_mail_subject',
// ** 会員登録承認メールの本文
'AutoRegist.approval_mail_body',
// ** 会員登録受付メールの件名
'AutoRegist.acceptance_mail_subject',
// ** 会員登録受付メールの本文
'AutoRegist.acceptance_mail_body',
);
foreach ([5, 6, 7, 8, 9, 10, 11, 12, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36] as $index) {
if (in_array($this->records[$index]['key'], $targets, true)) {
$records = $this->records[$index];
$records['value'] = $records['key'] . ' ' . $records['language_id'];
$this->records[$index] = $records;
}
}
if ($this->records[21]['key'] === 'AutoRegist.use_automatic_register') {
$this->records[21]['value'] = '1';
}
}
}