CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

fe_group.patch

Jan Bartels, 2012-03-04 20:35

Download (13.6 kB)

 
class.tx_mail2news_getmail.php (working copy)
99 99
					'imap', 'usessl', 'self_signed_certificate', 'portno', 'delete_after_download', 'delete_rejected_mail')));
100 100
				$processing_parameters = array_intersect_key($ar, array_flip(array('concatenate_text_parts',
101 101
					'max_image_size', 'max_attachment_size', 'imageextensions', 'allowedextensions')));
102
				$record_parameters = array_intersect_key($ar, array_flip(array('record_type', 'default_category',
102
				$record_parameters = array_intersect_key($ar, array_flip(array('record_type', 'default_category', 'fe_group',
103 103
					'default_t3blog_category', 'cruser_id', 'hide_by_default', 'clearCacheCmd')));
104 104

  
105 105
				$importerConf = $this->override_parameters($emConf, $obligatory_parameters);
......
121 121
			// (this is also how the extension worked until version 1.9.6)
122 122
			$this->getmail($emConf);
123 123
		}
124
		
124

  
125 125
	}
126 126

  
127 127
	function override_parameters($emConf, $override) {
......
228 228
						// supply additional fields from configuration defaults
229 229
						'pid' => $conf['pid'],
230 230
						'hidden' => $conf['hide_by_default'],
231
						'cruser_id' => $conf['cruser_id']
231
						'cruser_id' => $conf['cruser_id'],
232
						'fe_group' => $conf['fe_group']
232 233

  
233 234
					);
234 235

  
ext_tables.sql (working copy)
33 33
	cruser_id int(11) DEFAULT '0' NOT NULL,
34 34
	hide_by_default tinyint(3) DEFAULT '0' NOT NULL,
35 35
	clearcachecmd tinytext,
36
	fe_group varchar(100) DEFAULT '0' NOT NULL,
36 37
	
37 38
	PRIMARY KEY (uid),
38 39
	KEY parent (pid)
locallang_db.xml (working copy)
49 49
			<label index="tx_mail2news_importer.news_cruser_id">Backend user ID</label>
50 50
			<label index="tx_mail2news_importer.hide_by_default">Hide new records by default</label>
51 51
			<label index="tx_mail2news_importer.clearcachecmd">Clear cache of these pages</label>
52
			<label index="tx_mail2news_importer.fe_group">FE-group access</label>
52 53
		</languageKey>
53 54
	</data>
54 55
</T3locallang>
tca.php (working copy)
4 4
$TCA['tx_mail2news_importer'] = array (
5 5
	'ctrl' => $TCA['tx_mail2news_importer']['ctrl'],
6 6
	'interface' => array (
7
		'showRecordFieldList' => 'hidden,title,override_sections,allowed_senders,mail_server,mail_username,mail_password,imap,use_ssl,self_signed_certificate,portno,delete_after_download,delete_rejected_mail,concatenate_text_parts,max_image_size,max_attachment_size,imageextensions,attachmentextensions,record_type,category_identifier,subheader_identifier,default_category,news_cruser_id,hide_by_default,clearcachecmd'
7
		'showRecordFieldList' => 'hidden,title,override_sections,allowed_senders,mail_server,mail_username,mail_password,imap,use_ssl,self_signed_certificate,portno,delete_after_download,delete_rejected_mail,concatenate_text_parts,max_image_size,max_attachment_size,imageextensions,attachmentextensions,record_type,category_identifier,subheader_identifier,default_category,fe_group,news_cruser_id,hide_by_default,clearcachecmd'
8 8
	),
9 9
	'feInterface' => $TCA['tx_mail2news_importer']['feInterface'],
10 10
	'columns' => array (
11
		'hidden' => array (		
11
		'hidden' => array (
12 12
			'exclude' => 1,
13 13
			'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
14 14
			'config'  => array (
......
16 16
				'default' => '0'
17 17
			)
18 18
		),
19
		'title' => array (		
20
			'exclude' => 0,		
21
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.title',		
19
		'title' => array (
20
			'exclude' => 0,
21
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.title',
22 22
			'config' => array (
23
				'type' => 'input',	
23
				'type' => 'input',
24 24
				'size' => '30',
25 25
			)
26 26
		),
27
		'override_sections' => array (		
28
			'exclude' => 1,		
29
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.override_sections',		
27
		'override_sections' => array (
28
			'exclude' => 1,
29
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.override_sections',
30 30
			'config' => array (
31 31
				'type' => 'select',
32 32
				'items' => array (
......
39 39
					array('LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.override_sections.I.6', '1'),
40 40
					array('LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.override_sections.I.7', '7'),
41 41
				),
42
				'size' => 1,	
42
				'size' => 1,
43 43
				'maxitems' => 1,
44 44
			)
45 45
		),
46
		'allowed_senders' => array (		
47
			'exclude' => 1,		
48
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.allowed_senders',		
46
		'allowed_senders' => array (
47
			'exclude' => 1,
48
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.allowed_senders',
49 49
			'config' => array (
50
				'type' => 'input',	
51
				'size' => '30',	
50
				'type' => 'input',
51
				'size' => '30',
52 52
				'eval' => 'required',
53 53
			)
54 54
		),
55
		'mail_server' => array (		
56
			'exclude' => 1,		
57
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_server',		
55
		'mail_server' => array (
56
			'exclude' => 1,
57
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_server',
58 58
			'config' => array (
59
				'type' => 'input',	
60
				'size' => '30',	
59
				'type' => 'input',
60
				'size' => '30',
61 61
				'eval' => 'nospace',
62 62
			)
63 63
		),
64
		'mail_username' => array (		
65
			'exclude' => 1,		
66
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_username',		
64
		'mail_username' => array (
65
			'exclude' => 1,
66
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_username',
67 67
			'config' => array (
68
				'type' => 'input',	
69
				'size' => '30',	
68
				'type' => 'input',
69
				'size' => '30',
70 70
				'eval' => 'nospace',
71 71
			)
72 72
		),
73
		'mail_password' => array (		
74
			'exclude' => 1,		
75
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_password',		
73
		'mail_password' => array (
74
			'exclude' => 1,
75
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.mail_password',
76 76
			'config' => array (
77
				'type' => 'input',	
78
				'size' => '30',	
77
				'type' => 'input',
78
				'size' => '30',
79 79
				'eval' => 'nospace,password',
80 80
			)
81 81
		),
82
		'imap' => array (		
83
			'exclude' => 1,		
84
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imap',		
82
		'imap' => array (
83
			'exclude' => 1,
84
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imap',
85 85
			'config' => array (
86 86
				'type' => 'select',
87 87
				'items' => array (
88 88
					array('LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imap.I.0', '0'),
89 89
					array('LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imap.I.1', '1'),
90 90
				),
91
				'size' => 1,	
91
				'size' => 1,
92 92
				'maxitems' => 1,
93 93
			)
94 94
		),
95 95
		'use_ssl' => array (
96
			'exclude' => 1,		
96
			'exclude' => 1,
97 97
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.use_ssl',
98 98
			'config' => array (
99 99
				'type' => 'check',
100 100
			)
101 101
		),
102
		'self_signed_certificate' => array (		
103
			'exclude' => 1,		
104
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.self_signed_certificate',		
102
		'self_signed_certificate' => array (
103
			'exclude' => 1,
104
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.self_signed_certificate',
105 105
			'config' => array (
106 106
				'type' => 'check',
107 107
			)
108 108
		),
109
		'portno' => array (		
110
			'exclude' => 1,		
111
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.portno',		
109
		'portno' => array (
110
			'exclude' => 1,
111
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.portno',
112 112
			'config' => array (
113 113
				'type'     => 'input',
114 114
				'size'     => '4',
......
122 122
				'default' => 0
123 123
			)
124 124
		),
125
		'delete_after_download' => array (		
126
			'exclude' => 1,		
127
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.delete_after_download',		
125
		'delete_after_download' => array (
126
			'exclude' => 1,
127
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.delete_after_download',
128 128
			'config' => array (
129 129
				'type' => 'check',
130 130
			)
131 131
		),
132
		'delete_rejected_mail' => array (		
133
			'exclude' => 1,		
134
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.delete_rejected_mail',		
132
		'delete_rejected_mail' => array (
133
			'exclude' => 1,
134
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.delete_rejected_mail',
135 135
			'config' => array (
136 136
				'type' => 'check',
137 137
			)
138 138
		),
139
		'concatenate_text_parts' => array (		
140
			'exclude' => 1,		
141
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.concatenate_text_parts',		
139
		'concatenate_text_parts' => array (
140
			'exclude' => 1,
141
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.concatenate_text_parts',
142 142
			'config' => array (
143 143
				'type' => 'check',
144 144
			)
145 145
		),
146
		'max_image_size' => array (		
147
			'exclude' => 1,		
148
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.max_image_size',		
146
		'max_image_size' => array (
147
			'exclude' => 1,
148
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.max_image_size',
149 149
			'config' => array (
150 150
				'type'     => 'input',
151 151
				'size'     => '4',
......
159 159
				'default' => 0
160 160
			)
161 161
		),
162
		'max_attachment_size' => array (		
163
			'exclude' => 1,		
164
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.max_attachment_size',		
162
		'max_attachment_size' => array (
163
			'exclude' => 1,
164
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.max_attachment_size',
165 165
			'config' => array (
166 166
				'type'     => 'input',
167 167
				'size'     => '4',
......
175 175
				'default' => 0
176 176
			)
177 177
		),
178
		'imageextensions' => array (		
179
			'exclude' => 1,		
180
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imageextensions',		
178
		'imageextensions' => array (
179
			'exclude' => 1,
180
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.imageextensions',
181 181
			'config' => array (
182
				'type' => 'input',	
183
				'size' => '48',	
184
				'max' => '255',	
185
				'checkbox' => '',	
182
				'type' => 'input',
183
				'size' => '48',
184
				'max' => '255',
185
				'checkbox' => '',
186 186
				'eval' => 'nospace',
187 187
			)
188 188
		),
189
		'attachmentextensions' => array (		
190
			'exclude' => 1,		
191
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.attachmentextensions',		
189
		'attachmentextensions' => array (
190
			'exclude' => 1,
191
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.attachmentextensions',
192 192
			'config' => array (
193
				'type' => 'input',	
194
				'size' => '48',	
195
				'max' => '255',	
196
				'checkbox' => '',	
193
				'type' => 'input',
194
				'size' => '48',
195
				'max' => '255',
196
				'checkbox' => '',
197 197
				'eval' => 'nospace',
198 198
			)
199 199
		),
......
210 210
		),
211 211
//		'default_category' => array (),
212 212
//		'default_t3blog_category' => array (),
213
		'cruser_id' => array (		
214
			'exclude' => 1,		
215
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.news_cruser_id',		
213
		'cruser_id' => array (
214
			'exclude' => 1,
215
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.news_cruser_id',
216 216
			'config' => array (
217 217
				'type' => 'select',
218 218
				'foreign_table' => 'be_users',
......
223 223
				'suppress_icons' => 1,
224 224
			)
225 225
		),
226
		'hide_by_default' => array (		
227
			'exclude' => 1,		
228
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.hide_by_default',		
226
		'hide_by_default' => array (
227
			'exclude' => 1,
228
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.hide_by_default',
229 229
			'config' => array (
230 230
				'type' => 'check',
231 231
			)
232 232
		),
233
		'clearcachecmd' => array (		
234
			'exclude' => 1,		
235
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.clearcachecmd',		
233
		'clearcachecmd' => array (
234
			'exclude' => 1,
235
			'label' => 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.clearcachecmd',
236 236
			'config' => array (
237
				'type' => 'input',	
238
				'size' => '30',	
237
				'type' => 'input',
238
				'size' => '30',
239 239
				'eval' => 'nospace',
240 240
			)
241 241
		)
......
261 261
	$TCA['tx_mail2news_importer']['columns']['default_category']['label'] = 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.default_category';
262 262
	$TCA['tx_mail2news_importer']['columns']['default_category']['config']['minitems'] = 0;
263 263

  
264
	$TCA['tx_mail2news_importer']['showRecordFieldList'] .= ',default_category';
265
	$tabrecord .= ', default_category';
264
	// Copy TCA definition of tt_news fe_group field, and only change the label
265
	$TCA['tx_mail2news_importer']['columns']['fe_group'] = $TCA['tt_news']['columns']['fe_group'];
266
	$TCA['tx_mail2news_importer']['columns']['fe_group']['label'] = 'LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.fe_group';
267
	$TCA['tx_mail2news_importer']['columns']['fe_group']['config']['minitems'] = 0;
268

  
269
	$TCA['tx_mail2news_importer']['showRecordFieldList'] .= ',default_category, fe_group';
270
	$tabrecord .= ', default_category, fe_group';
266 271
}
267 272

  
268 273
if ( t3lib_extMgm::isLoaded('t3blog') ) {
269 274
	$TCA['tx_mail2news_importer']['columns']['record_type']['config']['items'][1] = array('LLL:EXT:mail2news/locallang_db.xml:tx_mail2news_importer.record_type.I.2' , 't3blog');
270
	
275

  
271 276
	// Copy TCA definition of t3blog category field, and only change the label and set it as not-required
272 277
	t3lib_div::loadTCA('tx_t3blog_post');
273 278
	$TCA['tx_mail2news_importer']['columns']['default_t3blog_category'] = $TCA['tx_t3blog_post']['columns']['cat'];