Rename StyleInterface::availableStyles to "getAvailableStyles"

This commit is contained in:
Dmitriy Simushev 2014-03-04 14:03:48 +00:00
parent 2c28a620b9
commit 3a01ec4d26
9 changed files with 13 additions and 13 deletions

View File

@ -110,7 +110,7 @@ class ChatStyle extends AbstractStyle implements StyleInterface
} }
// Get all style list and make sure that in has at least one style. // 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)) { if (empty($available_styles)) {
throw new \RuntimeException('There are no dialog styles in the system'); 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 * @param array List of styles names
*/ */
public static function availableStyles() public static function getAvailableStyles()
{ {
$styles_root = MIBEW_FS_ROOT . '/styles/dialogs'; $styles_root = MIBEW_FS_ROOT . '/styles/dialogs';

View File

@ -98,7 +98,7 @@ class InvitationStyle extends AbstractStyle implements StyleInterface
* *
* @param array List of styles names * @param array List of styles names
*/ */
public static function availableStyles() public static function getAvailableStyles()
{ {
$styles_root = MIBEW_FS_ROOT . '/styles/invitations'; $styles_root = MIBEW_FS_ROOT . '/styles/invitations';

View File

@ -133,7 +133,7 @@ class PageStyle extends AbstractStyle implements StyleInterface
* *
* @param array List of styles names * @param array List of styles names
*/ */
public static function availableStyles() public static function getAvailableStyles()
{ {
$styles_root = MIBEW_FS_ROOT . '/styles/pages'; $styles_root = MIBEW_FS_ROOT . '/styles/pages';

View File

@ -52,7 +52,7 @@ interface StyleInterface
* *
* @param array List of styles names * @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 * Builds base path for style files. This path is relative to Mibew root and

View File

@ -43,14 +43,14 @@ if (!isset($image_locales_map[$image])) {
} }
$image_locales = $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_list[""] = getlocal("page.preview.style_default");
$style = verify_param("style", "/^\w*$/", ""); $style = verify_param("style", "/^\w*$/", "");
if ($style && !in_array($style, $style_list)) { if ($style && !in_array($style, $style_list)) {
$style = ""; $style = "";
} }
$invitation_style_list = InvitationStyle::availableStyles(); $invitation_style_list = InvitationStyle::getAvailableStyles();
$invitation_style_list[""] = getlocal("page.preview.style_default"); $invitation_style_list[""] = getlocal("page.preview.style_default");
$invitation_style = verify_param("invitationstyle", "/^\w*$/", ""); $invitation_style = verify_param("invitationstyle", "/^\w*$/", "");
if ($invitation_style && !in_array($invitation_style, $invitation_style_list)) { if ($invitation_style && !in_array($invitation_style, $invitation_style_list)) {

View File

@ -28,7 +28,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
$operator = check_login(); $operator = check_login();
$style_list = InvitationStyle::availableStyles(); $style_list = InvitationStyle::getAvailableStyles();
$preview = verify_param("preview", "/^\w+$/", "default"); $preview = verify_param("preview", "/^\w+$/", "default");
if (!in_array($preview, $style_list)) { if (!in_array($preview, $style_list)) {

View File

@ -25,7 +25,7 @@ require_once(MIBEW_FS_ROOT . '/libs/settings.php');
$operator = check_login(); $operator = check_login();
$style_list = PageStyle::availableStyles(); $style_list = PageStyle::getAvailableStyles();
$preview = verify_param("preview", "/^\w+$/", "default"); $preview = verify_param("preview", "/^\w+$/", "default");
if (!in_array($preview, $style_list)) { if (!in_array($preview, $style_list)) {

View File

@ -61,12 +61,12 @@ $styles_params = array(
'page_style' => PageStyle::defaultStyle(), 'page_style' => PageStyle::defaultStyle(),
); );
$chat_style_list = ChatStyle::availableStyles(); $chat_style_list = ChatStyle::getAvailableStyles();
$page_style_list = PageStyle::availableStyles(); $page_style_list = PageStyle::getAvailableStyles();
if (Settings::get('enabletracking')) { if (Settings::get('enabletracking')) {
$styles_params['invitation_style'] = InvitationStyle::defaultStyle(); $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'])) { if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {

View File

@ -30,7 +30,7 @@ require_once(MIBEW_FS_ROOT . '/libs/track.php');
$operator = check_login(); $operator = check_login();
$style_list = ChatStyle::availableStyles(); $style_list = ChatStyle::getAvailableStyles();
$preview = verify_param("preview", "/^\w+$/", "default"); $preview = verify_param("preview", "/^\w+$/", "default");
if (!in_array($preview, $style_list)) { if (!in_array($preview, $style_list)) {