PluginProbe ʕ •ᴥ•ʔ
Brevo – Email, SMS, Web Push, Chat, and more. / 3.1.81
Brevo – Email, SMS, Web Push, Chat, and more. v3.1.81
2.9.13 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.2 3.1.20 3.1.21 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.1.29 3.1.3 3.1.30 3.1.31 3.1.32 3.1.33 3.1.34 3.1.35 3.1.36 3.1.37 3.1.38 3.1.39 3.1.4 3.1.40 3.1.41 3.1.42 3.1.43 3.1.44 3.1.45 3.1.46 3.1.47 3.1.48 3.1.49 3.1.5 3.1.50 3.1.51 3.1.52 3.1.53 3.1.54 3.1.55 3.1.56 3.1.57 3.1.58 3.1.59 3.1.6 3.1.60 3.1.61 3.1.62 3.1.63 3.1.64 3.1.65 3.1.66 3.1.67 3.1.68 3.1.69 3.1.7 3.1.70 3.1.71 3.1.72 3.1.73 3.1.74 3.1.75 3.1.76 3.1.77 3.1.78 3.1.79 3.1.8 3.1.80 3.1.81 3.1.82 3.1.83 3.1.84 3.1.85 3.1.86 3.1.87 3.1.88 3.1.89 3.1.9 3.1.90 3.1.91 3.1.92 3.1.93 3.1.94 3.1.95 3.1.96 3.1.97 3.1.98 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 trunk 1.0 1.5 2.0.8 2.9.10 2.9.11 2.9.12
mailin / model / model-forms.php
mailin / model Last commit date
index.php 11 years ago model-contacts.php 5 years ago model-forms.php 2 years ago model-lang.php 5 years ago model-users.php 4 years ago
model-forms.php
466 lines
1 <?php
2 /**
3 * Model class <i>SIB_Forms</i> represents forms
4 *
5 * @package SIB_Forms
6 */
7
8 if ( ! class_exists( 'SIB_Forms' ) ) {
9 /**
10 * Class SIB_Forms
11 *
12 * @package SIB_Forms
13 */
14 class SIB_Forms {
15
16 /**
17 * Tab table name
18 */
19 const TABLE_NAME = 'sib_model_forms';
20 const DEFAULT_FORM_HTML_PATH = '../form/default-form.html';
21 const DEFAULT_FORM_CSS_PATH = '../form/css/default-form.css';
22 const DEFAULT_FORM_MESSAGE_CSS_PATH = '../form/css/default-form-message.css';
23
24 /** Create Table */
25 public static function createTable() {
26 global $wpdb;
27 $table_name = $wpdb->prefix . self::TABLE_NAME;
28
29 //Check if table exists
30 $table_check_query = 'SHOW TABLES LIKE ' . "'" . $table_name . "'" . ';';
31 $wpdb->query($table_check_query);
32
33
34 //table doesnot exist
35 if (empty($wpdb->last_result)) {
36 // create list table.
37 $query =
38 'CREATE TABLE IF NOT EXISTS ' . $table_name . ' (
39 `id` int(20) NOT NULL AUTO_INCREMENT,
40 `title` varchar(120) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
41 `html` longtext CHARACTER SET utf8 COLLATE utf8_unicode_ci,
42 `css` longtext,
43 `dependTheme` int(1) NOT NULL DEFAULT 1,
44 `listID` longtext,
45 `templateID` int(20) NOT NULL DEFAULT -1,
46 `confirmID` int(20) NOT NULL DEFAULT -1,
47 `isDopt` int(1) NOT NULL DEFAULT 0,
48 `isOpt` int(1) NOT NULL DEFAULT 0,
49 `redirectInEmail` varchar(255),
50 `redirectInForm` varchar(255),
51 `successMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
52 `errorMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
53 `existMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
54 `invalidMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
55 `requiredMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
56 `attributes` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci,
57 `date` DATE NOT NULL,
58 `isDefault` int(1) NOT NULL DEFAULT 0,
59 `gCaptcha` int(1) NOT NULL DEFAULT 0,
60 `gCaptcha_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
61 `gCaptcha_site` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
62 `selectCaptchaType` int(1) NOT NULL DEFAULT 0,
63 `cCaptchaType` int(1) NOT NULL DEFAULT 0,
64 `cCaptcha_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
65 `cCaptcha_site` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
66 `cCaptchaStyle` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
67 `termAccept` int(1) NOT NULL DEFAULT 0,
68 `termsURL` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
69 PRIMARY KEY (`id`)
70 );';
71 $wpdb->query($query);
72
73 // create default form.
74 $rows = $wpdb->get_results('SELECT * FROM '. $wpdb->prefix . self::TABLE_NAME );
75 if (count( $rows ) == 0 )
76 {
77 self::createDefaultForm();
78 }
79
80 } else {
81
82 // check if select captcha type fields exist
83 $selectCaptchaType = 'selectCaptchaType';
84 $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM `$table_name` LIKE %s ", $selectCaptchaType ) ); // db call ok; no-cache ok.
85 $queryExecuted = false;
86 if ( empty( $result ) ) {
87 $alter_query = "ALTER TABLE " . $table_name . "
88 ADD COLUMN selectCaptchaType int(1) NOT NULL DEFAULT 0 After gCaptcha_site,
89 ADD COLUMN cCaptchaType int(1) NOT NULL DEFAULT 0 After selectCaptchaType,
90 ADD COLUMN cCaptcha_secret varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci AFTER selectCaptchaType,
91 ADD COLUMN cCaptcha_site varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci AFTER cCaptcha_secret;
92 ADD COLUMN cCaptchaStyle varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci AFTER cCaptcha_site;
93 ";
94 $wpdb->query( $alter_query );
95 $queryExecuted = true;
96 }
97
98 if ($queryExecuted == false) {
99 // check if only the cCaptchaStyle type fields exist
100 $cCaptchaStyle = 'cCaptchaStyle';
101 $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM `$table_name` LIKE %s ", $cCaptchaStyle ) ); // db call ok; no-cache ok.
102
103 if ( empty( $result ) ) {
104 $alter_query = "ALTER TABLE " . $table_name . "
105 ADD COLUMN cCaptchaStyle varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci AFTER cCaptcha_site;
106 ";
107 $wpdb->query( $alter_query );
108 }
109 }
110
111 }
112 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
113 }
114
115 /**
116 * Remove table
117 */
118 public static function removeTable() {
119 global $wpdb;
120 $query = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . self::TABLE_NAME . ';';
121 $wpdb->query( $query ); // db call ok; no-cache ok.
122 }
123
124 /**
125 * Add columns for old versions
126 */
127 public static function alterTable() {
128 global $wpdb;
129 // add columns -gCaptcha, gCaptcha_secret.
130 $table_name = $wpdb->prefix . self::TABLE_NAME;
131
132 // check if gCaptcha fields exist
133 $gCaptcha = 'gCaptcha';
134 $result = $wpdb->query( $wpdb->prepare( "SHOW COLUMNS FROM `$table_name` LIKE %s ", $gCaptcha ) ); // db call ok; no-cache ok.
135
136 if ( empty( $result ) ) {
137 $alter_query = 'ALTER TABLE ' . $table_name . '
138 ADD COLUMN gCaptcha int(1) not NULL DEFAULT 0,
139 ADD COLUMN gCaptcha_secret varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
140 ADD COLUMN gCaptcha_site varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci';
141 $ret = $wpdb->query( $alter_query );
142 }
143
144 // add columns -termAccept, termsURL : version 2.9.0
145 $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'termAccept';";
146 $result = $wpdb->query( $check_query );
147 if ( empty( $result ) ) {
148 $alter_query = 'ALTER TABLE ' . $table_name . '
149 ADD COLUMN termAccept int(1) not NULL DEFAULT 1,
150 ADD COLUMN termsURL varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci';
151 $ret = $wpdb->query( $alter_query );
152 }
153 // add columns - confirmID : version 2.9.0
154 $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'confirmID';";
155 $result = $wpdb->query( $check_query );
156 if ( empty( $result ) ) {
157 $alter_query = 'ALTER TABLE ' . $table_name . '
158 ADD COLUMN confirmID int(20) not NULL DEFAULT -1';
159 $ret = $wpdb->query( $alter_query );
160 }
161 // add columns - requiredMsg : version 2.9.3
162 $check_query = 'SHOW COLUMNS FROM `' . $table_name . "` LIKE 'requiredMsg';";
163 $result = $wpdb->query( $check_query );
164 if ( empty( $result ) ) {
165 $alter_query = 'ALTER TABLE ' . $table_name . '
166 ADD COLUMN requiredMsg varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci';
167 $ret = $wpdb->query( $alter_query );
168 }
169 }
170
171 /**
172 * Get form data
173 *
174 * @param string $frmID - form ID.
175 * @return array|null|object|void
176 */
177 public static function getForm( $frmID = 'new' ) {
178 global $wpdb;
179 if ( 'new' == $frmID ) {
180 // default form.
181 $formData = self::getDefaultForm();
182 $list = maybe_serialize( array( SIB_API_Manager::get_default_list_id() ) );
183 $results = array(
184 'title' => '',
185 'html' => $formData['html'],// phpcs:ignore
186 'css' => $formData['css'],
187 'listID' => $list,
188 'dependTheme' => '1',
189 'templateID' => '-1',
190 'confirmID' => '-1',
191 'isOpt' => '0',
192 'isDopt' => '0',
193 'redirectInEmail' => '',
194 'redirectInForm' => '',
195 'date' => date( 'Y-m-d' ),
196 'successMsg' => $formData['successMsg'],
197 'errorMsg' => $formData['errorMsg'],
198 'existMsg' => $formData['existMsg'],
199 'invalidMsg' => $formData['invalidMsg'],
200 'requiredMsg' => $formData['requiredMsg'],
201 'attributes' => 'email,NAME',
202 );
203 } else {
204 $query = $wpdb->prepare('SELECT * from ' . $wpdb->prefix . self::TABLE_NAME . ' where id = %d',array(esc_sql($frmID)));
205 $results = $wpdb->get_row( $query, ARRAY_A ); // db call ok; no-cache ok.
206 }
207
208 if ( is_array( $results ) && count( $results ) > 0 ) {
209 $listIDs = maybe_unserialize( $results['listID'] );
210 $results['listID'] = $listIDs;
211 return $results;
212 }
213 return array();
214 }
215
216 /**
217 * Get all forms
218 */
219 public static function getForms() {
220 global $wpdb;
221
222 $query = 'select * from ' . $wpdb->prefix . self::TABLE_NAME . ';';
223 $results = $wpdb->get_results( $query, ARRAY_A ); // db call ok; no-cache ok.
224
225 if ( is_array( $results ) && count( $results ) > 0 ) {
226 // add list names field to display form table.
227 foreach ( $results as $key => $form ) {
228 if ( SIB_Forms_Lang::check_form_trans( $form['id'] ) == true ) {
229 unset( $results[ $key ] );
230 continue;
231 }
232 $listIDs = maybe_unserialize( $form['listID'] );
233 $listIDs = !empty($listIDs) ? $listIDs : array();
234 // get names form id array.
235 $lists = SIB_API_Manager::get_lists(); // pair of id and name.
236
237 $listNames = array();
238 foreach ( $lists as $list ) {
239 if ( in_array( $list['id'], $listIDs ) ) {
240 $listNames[] = $list['name'];
241 }
242 }
243 $results[ $key ]['listName'] = implode( ',', $listNames );
244 $results[ $key ]['listID'] = $listIDs;
245 }
246 return $results;
247 }
248 return array();
249
250 }
251
252 /**
253 * Add new form
254 *
255 * @param array $formData - form data.
256 * @return null|string
257 */
258 public static function addForm( $formData ) {
259 global $wpdb;
260
261 $current_date = date( 'Y-m-d' );
262
263 global $wpdb;
264
265 global $wpdb;
266 $query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME.' (title,html,css,dependTheme,listID,templateID,confirmID,isOpt,isDopt,redirectInEmail,redirectInForm,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,gCaptcha,gCaptcha_secret,gCaptcha_site,termAccept,termsURL, selectCaptchaType, cCaptchaType, cCaptcha_secret,cCaptcha_site, cCaptchaStyle) VALUES ';
267 $query .= ' (%s, %s, %s, %d, %s, %d, %d, %d, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %d, %s, %d, %d,%s, %s, %s)';
268
269 $query = $wpdb->prepare($query,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'],
270 $formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'],
271 $formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'], $formData['selectCaptchaType'], $formData['cCaptchaType'], $formData['ccaptcha_secret'], $formData['ccaptcha_site'], $formData['cCaptchaStyle']));
272
273 $wpdb->query( $query ); // db call ok; no-cache ok.
274 $index = $wpdb->get_var( 'SELECT LAST_INSERT_ID();' ); // db call ok; no-cache ok.
275 return $index;
276 }
277
278 /**
279 * Update form
280 *
281 * @param int $formID - form ID.
282 * @param array $formData - form data.
283 * @return bool
284 */
285 public static function updateForm( $formID, $formData ) {
286 global $wpdb;
287
288 $current_date = date( 'Y-m-d' );
289
290 global $wpdb;
291
292 $query = 'UPDATE ' . $wpdb->prefix . self::TABLE_NAME ;
293 $query .= " set title = %s, html = %s, css = %s, dependTheme = %d, listID = %s, templateID = %d, confirmID = %d, isOpt = %d, isDopt = %d, redirectInEmail = %s, redirectInForm = %s, successMsg = %s, errorMsg = %s, existMsg = %s, invalidMsg = %s, requiredMsg = %s, attributes = %s, date = %s, gCaptcha = %d, gCaptcha_secret = %s, gCaptcha_site = %s, termAccept = %d, termsURL = %s, selectCaptchaType = %d, cCaptcha_secret = %s, cCaptcha_site = %s, cCaptchaType = %d, cCaptchaStyle = %s";
294 $query .= ' where id= %d';
295
296 $query = $wpdb->prepare( $query ,array($formData['title'],$formData['html'],$formData['css'],$formData['dependTheme'],$formData['listID'],
297 $formData['templateID'],$formData['confirmID'],$formData['isOpt'],$formData['isDopt'],$formData['redirectInEmail'],$formData['redirectInForm'],
298 $formData['successMsg'],$formData['errorMsg'],$formData['existMsg'],$formData['invalidMsg'],$formData['requiredMsg'],$formData['attributes'],$current_date,$formData['gcaptcha'],$formData['gcaptcha_secret'] ,$formData['gcaptcha_site'],$formData['termAccept'],$formData['termsURL'],$formData['selectCaptchaType'],$formData['ccaptcha_secret'] ,$formData['ccaptcha_site'], $formData['cCaptchaType'],$formData['cCaptchaStyle'], esc_sql($formID)));
299
300 $wpdb->query( $query ); // db call ok; no-cache ok.
301
302 return true;
303 }
304
305 /**
306 * Remove form
307 *
308 * @param int $id - target form id.
309 */
310 public static function deleteForm( $id ) {
311 global $wpdb;
312
313 $wpdb->delete(
314 $wpdb->prefix . self::TABLE_NAME,
315 array(
316 'id' => $id,
317 )
318 ); // db call ok; no-cache ok.
319 }
320
321 /** Clear forms data */
322 public static function removeAllForms() {
323 global $wpdb;
324 $wpdb->query( 'TRUNCATE TABLE ' . $wpdb->prefix . self::TABLE_NAME ); // db call ok; no-cache ok.
325 return true;
326 }
327
328 /** Create default form */
329 public static function createDefaultForm() {
330 $formData = self::getDefaultForm();
331 // phpcs:ignore
332 $html = $formData['html'];
333 $css = $formData['css'];
334 $list = maybe_serialize( array( SIB_API_Manager::get_default_list_id() ) );
335 $current_date = date( 'Y-m-d' );
336 $attributes = 'email,NAME';
337 global $wpdb;
338 $query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' ';
339 $deafult_form_name = esc_attr( __( 'Default Form', 'mailin' ) );
340 $query .= '(title,html,css,listID,dependTheme,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,isDefault) ';
341 $query .= "VALUES ('{$deafult_form_name}','{$html}','{$css}','{$list}','1','{$formData['successMsg']}','{$formData['errorMsg']}','{$formData['existMsg']}','{$formData['invalidMsg']}','{$formData['requiredMsg']}','{$attributes}','{$current_date}','1')";
342 $wpdb->query( $query ); // db call ok; no-cache ok.
343 }
344
345 /** Get default form data */
346 public static function getDefaultForm() {
347
348 $html = wp_kses(self::get_default_form_html(), SIB_Manager::SIB_ATTRIBUTE);
349 $css = wp_kses(self::get_default_css_html(), SIB_Manager::SIB_ATTRIBUTE);
350
351 $result = array(
352 'html' => $html,
353 'css' => $css,
354 'successMsg' => esc_attr( __( 'Thank you, you have successfully registered !', 'mailin' ) ),
355 'errorMsg' => esc_attr( __( 'Something wrong occured', 'mailin' ) ),
356 'existMsg' => esc_attr( __( 'You have already registered', 'mailin' ) ),
357 'invalidMsg' => esc_attr( __( 'Your email address is invalid', 'mailin' ) ),
358 'requiredMsg' => esc_attr(__('Please fill out this field', 'mailin'))
359 );
360 return $result;
361 }
362
363 /** Get Default css */
364 public static function getDefaultMessageCss() {
365 $css = file_get_contents(__DIR__ . '/' . self::DEFAULT_FORM_MESSAGE_CSS_PATH) ?: '';
366 return wp_kses($css, SIB_Manager::SIB_ATTRIBUTE);
367 }
368
369 /**
370 * Get form data of old version
371 * We suppose that the clients have got own setting values for form.
372 * If the client have default setting only then it will be return error.
373 * This function will be removed after next version
374 */
375 public static function get_old_form() {
376 // create form from old version.
377 $form_settings = get_option( 'sib_subscription_option' );
378 $html = $form_settings['sib_form_html'];
379 $avail_atts = $form_settings['available_attributes'];
380
381 $signup_settings = get_option( 'sib_signup_option' );
382 $is_confirm_email = 'yes' == $signup_settings['is_confirm_email'] ? 1 : 0;
383 $is_double_optin = 'yes' == $signup_settings['is_double_optin'] ? 1 : 0;
384 $redirect_url = $signup_settings['redirect_url'];
385 $redirect_url_click = $signup_settings['redirect_url_click'];
386 $template_id = 1 == $is_confirm_email ? $signup_settings['template_id'] : $signup_settings['doubleoptin_template_id'];
387
388 $confirmMsg = get_option( 'sib_confirm_option' );
389
390 $homeSetting = get_option( 'sib_home_option' );
391 $sib_list = maybe_serialize( array( (string) $homeSetting['list_id'] ) );
392
393 $formData = array(
394 'title' => 'Old Form',
395 'html' => $html,
396 'css' => '',
397 'dependTheme' => '1',
398 'listID' => $sib_list,
399 'templateID' => $template_id,
400 'isOpt' => $is_confirm_email,
401 'isDopt' => $is_double_optin,
402 'redirectInEmail' => $redirect_url,
403 'redirectInForm' => $redirect_url_click,
404 'successMsg' => $confirmMsg['alert_success_message'],
405 'errorMsg' => $confirmMsg['alert_error_message'],
406 'existMsg' => $confirmMsg['alert_exist_subscriber'],
407 'invalidMsg' => $confirmMsg['alert_invalid_email'],
408 'attributes' => 'email,' . implode( ',', $avail_atts ),
409 );
410
411 return $formData;
412 }
413
414 /**
415 * Add prefix to the table
416 */
417 public static function add_prefix() {
418 global $wpdb;
419 if (self::forms_table_exists()) {
420 $query = 'ALTER TABLE ' . self::TABLE_NAME . ' RENAME TO ' . $wpdb->prefix . self::TABLE_NAME . ';';
421 $wpdb->query( $query ); // db call ok; no-cache ok.
422 }
423 }
424
425 /**
426 * Change datatype of attribute column
427 */
428 public static function modify_datatype() {
429 global $wpdb;
430 if (self::forms_table_exists()) {
431 $tableStructure = $wpdb->get_results( "DESC " . $wpdb->prefix . self::TABLE_NAME );
432 foreach ($tableStructure as $key => $value)
433 {
434 if($value->Field == "attributes" && $value->Type == "varchar(255)")
435 $wpdb->query("ALTER TABLE ". $wpdb->prefix . self::TABLE_NAME." MODIFY ".$value->Field." TEXT DEFAULT NULL");
436 }
437 }
438 }
439
440 /**
441 * @return bool
442 */
443 public static function forms_table_exists()
444 {
445 global $wpdb;
446 return $wpdb->get_var( "SHOW TABLES LIKE '" . self::TABLE_NAME . "'" ) == self::TABLE_NAME;
447 }
448
449 /**
450 * @return string
451 */
452 public static function get_default_form_html()
453 {
454 return file_get_contents(__DIR__ . '/' . self::DEFAULT_FORM_HTML_PATH) ?: '';
455 }
456
457 /**
458 * @return string
459 */
460 public static function get_default_css_html()
461 {
462 return file_get_contents(__DIR__ . '/' . self::DEFAULT_FORM_CSS_PATH) ?: '';
463 }
464 }
465 }
466