mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-08 00:34:42 +03:00
Rename StyleInterface::availableStyles to "getAvailableStyles"
This commit is contained in:
parent
2c28a620b9
commit
3a01ec4d26
@ -110,7 +110,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
}
|
||||
|
||||
// Get all style list and make sure that in has at least one style.
|
||||
$available_styles = self::availableStyles();
|
||||
$available_styles = self::getAvailableStyles();
|
||||
if (empty($available_styles)) {
|
||||
throw new \RuntimeException('There are no dialog styles in the system');
|
||||
}
|
||||
@ -154,7 +154,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/dialogs';
|
||||
|
||||
|
@ -98,7 +98,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/invitations';
|
||||
|
||||
|
@ -133,7 +133,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles()
|
||||
public static function getAvailableStyles()
|
||||
{
|
||||
$styles_root = MIBEW_FS_ROOT . '/styles/pages';
|
||||
|
||||
|
@ -52,7 +52,7 @@ interface StyleInterface
|
||||
*
|
||||
* @param array List of styles names
|
||||
*/
|
||||
public static function availableStyles();
|
||||
public static function getAvailableStyles();
|
||||
|
||||
/**
|
||||
* Builds base path for style files. This path is relative to Mibew root and
|
||||
|
@ -43,14 +43,14 @@ if (!isset($image_locales_map[$image])) {
|
||||
}
|
||||
$image_locales = $image_locales_map[$image];
|
||||
|
||||
$style_list = ChatStyle::availableStyles();
|
||||
$style_list = ChatStyle::getAvailableStyles();
|
||||
$style_list[""] = getlocal("page.preview.style_default");
|
||||
$style = verify_param("style", "/^\w*$/", "");
|
||||
if ($style && !in_array($style, $style_list)) {
|
||||
$style = "";
|
||||
}
|
||||
|
||||
$invitation_style_list = InvitationStyle::availableStyles();
|
||||
$invitation_style_list = InvitationStyle::getAvailableStyles();
|
||||
$invitation_style_list[""] = getlocal("page.preview.style_default");
|
||||
$invitation_style = verify_param("invitationstyle", "/^\w*$/", "");
|
||||
if ($invitation_style && !in_array($invitation_style, $invitation_style_list)) {
|
||||
|
@ -28,7 +28,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = InvitationStyle::availableStyles();
|
||||
$style_list = InvitationStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
|
@ -25,7 +25,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = PageStyle::availableStyles();
|
||||
$style_list = PageStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
|
@ -61,12 +61,12 @@ $styles_params = array(
|
||||
'page_style' => PageStyle::defaultStyle(),
|
||||
);
|
||||
|
||||
$chat_style_list = ChatStyle::availableStyles();
|
||||
$page_style_list = PageStyle::availableStyles();
|
||||
$chat_style_list = ChatStyle::getAvailableStyles();
|
||||
$page_style_list = PageStyle::getAvailableStyles();
|
||||
|
||||
if (Settings::get('enabletracking')) {
|
||||
$styles_params['invitation_style'] = InvitationStyle::defaultStyle();
|
||||
$invitation_style_list = InvitationStyle::availableStyles();
|
||||
$invitation_style_list = InvitationStyle::getAvailableStyles();
|
||||
}
|
||||
|
||||
if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
|
||||
|
@ -30,7 +30,7 @@ require_once(MIBEW_FS_ROOT . '/libs/track.php');
|
||||
|
||||
$operator = check_login();
|
||||
|
||||
$style_list = ChatStyle::availableStyles();
|
||||
$style_list = ChatStyle::getAvailableStyles();
|
||||
|
||||
$preview = verify_param("preview", "/^\w+$/", "default");
|
||||
if (!in_array($preview, $style_list)) {
|
||||
|
Loading…
Reference in New Issue
Block a user