@@ -144,7 +144,7 @@ public function pwa_manifest()
144
144
$ this ->template ->assign_vars ([
145
145
'U_MANIFEST_URL ' => $ this ->controller_helper ->route ('phpbb_webpushnotifications_manifest_controller ' ),
146
146
'U_TOUCH_ICON ' => $ this ->config ['pwa_icon_small ' ],
147
- 'SHORT_SITE_NAME ' => $ this ->config ['pwa_short_name ' ] ?: $ this ->get_shortname ($ this ->config ['sitename ' ]),
147
+ 'SHORT_SITE_NAME ' => $ this ->config ['pwa_short_name ' ] ?: $ this ->trim_shortname ($ this ->config ['sitename ' ]),
148
148
]);
149
149
}
150
150
@@ -210,7 +210,7 @@ public function pwa_icon_name($value, $key)
210
210
*/
211
211
public function pwa_short_sitename ($ value , $ key )
212
212
{
213
- $ placeholder = $ this ->get_shortname ($ this ->config ['sitename ' ]);
213
+ $ placeholder = $ this ->trim_shortname ($ this ->config ['sitename ' ]);
214
214
215
215
return '<input id=" ' . $ key . '" type="text" size="40" maxlength="12" name="config[ ' . $ key . ']" value=" ' . $ value . '" placeholder=" ' . $ placeholder . '"> ' ;
216
216
}
@@ -358,12 +358,12 @@ protected function can_use_notifications()
358
358
}
359
359
360
360
/**
361
- * Get short name from a string (decode any entities and trim to 12 characters)
361
+ * Trim short name from a string to 12 characters
362
362
*
363
363
* @param string $name
364
364
* @return string 12 max characters string
365
365
*/
366
- protected function get_shortname ($ name )
366
+ protected function trim_shortname ($ name )
367
367
{
368
368
return utf8_substr (html_entity_decode ($ name , ENT_QUOTES , 'UTF-8 ' ), 0 , 12 );
369
369
}
0 commit comments