diff --git a/src/mibew/client.php b/src/mibew/client.php index 923eed45..4d86c77a 100644 --- a/src/mibew/client.php +++ b/src/mibew/client.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Settings; use Mibew\Thread; +use Mibew\Style\ChatStyle; // Initialize libraries require_once(dirname(__FILE__).'/libs/init.php'); @@ -28,9 +29,6 @@ require_once(MIBEW_FS_ROOT.'/libs/expand.php'); require_once(MIBEW_FS_ROOT.'/libs/captcha.php'); require_once(MIBEW_FS_ROOT.'/libs/invitation.php'); require_once(MIBEW_FS_ROOT.'/libs/track.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); if(Settings::get('enablessl') == "1" && Settings::get('forcessl') == "1") { if(!is_secure_request()) { diff --git a/src/mibew/install/dbinfo.php b/src/mibew/install/dbinfo.php index 566caaa7..48804863 100644 --- a/src/mibew/install/dbinfo.php +++ b/src/mibew/install/dbinfo.php @@ -297,7 +297,7 @@ function show_install_err($text) 'fixedwrap' => true, ); $errors = array($text); - $page_style = new PageStyle('default'); + $page_style = new \Mibew\Style\PageStyle('default'); $page_style->render('install_err'); exit; } diff --git a/src/mibew/install/index.php b/src/mibew/install/index.php index 9f3e03cd..659e1635 100644 --- a/src/mibew/install/index.php +++ b/src/mibew/install/index.php @@ -35,9 +35,9 @@ require_once(MIBEW_FS_ROOT.'/libs/common/locale.php'); require_once(MIBEW_FS_ROOT.'/libs/common/misc.php'); require_once(MIBEW_FS_ROOT.'/libs/common/response.php'); require_once(MIBEW_FS_ROOT.'/libs/common/string.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); +require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/Style/StyleInterface.php'); +require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/Style/BaseStyle.php'); +require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/Style/PageStyle.php'); // Include database structure require_once(MIBEW_FS_ROOT.'/install/dbinfo.php'); @@ -379,7 +379,7 @@ check_status(); $page['title'] = getlocal("install.title"); $page['fixedwrap'] = true; -$page_style = new PageStyle('default'); +$page_style = new \Mibew\Style\PageStyle('default'); $page_style->render('install_index'); ?> \ No newline at end of file diff --git a/src/mibew/libs/chat.php b/src/mibew/libs/chat.php index 7e265c50..bcb1f756 100644 --- a/src/mibew/libs/chat.php +++ b/src/mibew/libs/chat.php @@ -19,6 +19,8 @@ use Mibew\Database; use Mibew\Settings; use Mibew\Thread; +use Mibew\Style\ChatStyle; +use Mibew\Style\PageStyle; // Initialize libraries require_once(MIBEW_FS_ROOT.'/libs/track.php'); @@ -29,10 +31,6 @@ require_once(MIBEW_FS_ROOT.'/libs/classes/mibew_api_execution_context.php'); require_once(MIBEW_FS_ROOT.'/libs/classes/request_processor.php'); require_once(MIBEW_FS_ROOT.'/libs/classes/client_side_processor.php'); require_once(MIBEW_FS_ROOT.'/libs/classes/thread_processor.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); /** * Names for chat-related cookies diff --git a/src/mibew/libs/classes/style.php b/src/mibew/libs/classes/Mibew/Style/BaseStyle.php similarity index 90% rename from src/mibew/libs/classes/style.php rename to src/mibew/libs/classes/Mibew/Style/BaseStyle.php index 1e176c13..7c4593e2 100644 --- a/src/mibew/libs/classes/style.php +++ b/src/mibew/libs/classes/Mibew/Style/BaseStyle.php @@ -15,10 +15,12 @@ * limitations under the License. */ +namespace Mibew\Style; + /** * Base class for styles */ -abstract class Style { +abstract class BaseStyle { /** * Styles configuration array or NULL by default * @var array|NULL @@ -32,10 +34,10 @@ abstract class Style { protected $styleName; /** - * Contains cached results of the Style::getStyleList method. The lists are - * keyed by the $root_dir argument of the method. + * Contains cached results of the \Mibew\Style\StyleInterface::getStyleList + * method. The lists are keyed by the $root_dir argument of the method. * @var array - * @see Style::getStyleList + * @see \Mibew\Style\StyleInterface::getStyleList */ protected static $cachedStyleLists = array(); @@ -62,7 +64,7 @@ abstract class Style { * instance. * * @return array Style configurations - * @throws RuntimeException + * @throws \RuntimeException */ public function configurations() { $config_file = MIBEW_FS_ROOT . '/' . $this->filesPath() . '/config.ini'; @@ -74,7 +76,7 @@ abstract class Style { // Try to read configuration file if (!is_readable($config_file)) { - throw new RuntimeException('Cannot read configuration file'); + throw new \RuntimeException('Cannot read configuration file'); } // Load configurations from file, merge it with default configs and diff --git a/src/mibew/libs/classes/chat_style.php b/src/mibew/libs/classes/Mibew/Style/ChatStyle.php similarity index 92% rename from src/mibew/libs/classes/chat_style.php rename to src/mibew/libs/classes/Mibew/Style/ChatStyle.php index 1154a754..d3a19bb8 100644 --- a/src/mibew/libs/classes/chat_style.php +++ b/src/mibew/libs/classes/Mibew/Style/ChatStyle.php @@ -15,13 +15,15 @@ * limitations under the License. */ +namespace Mibew\Style; + // Import namespaces and classes of the core use Mibew\Settings; /** * Represents a chat style */ -class ChatStyle extends Style implements StyleInterface { +class ChatStyle extends BaseStyle implements StyleInterface { /** * Builds base path for style files. This path is relative Mibew root and * does not contain neither leading nor trailing slash. @@ -53,6 +55,7 @@ class ChatStyle extends Style implements StyleInterface { * other criteria. * * @return string Name of a style + * @throws \RuntimeException */ public static function currentStyle() { // Ceck if request contains chat style @@ -65,7 +68,7 @@ class ChatStyle extends Style implements StyleInterface { // Get all style list and make sure that in has at least one style. $available_styles = self::availableStyles(); 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'); } // Check if selected style exists. If it does not exist try to fall back @@ -76,7 +79,7 @@ class ChatStyle extends Style implements StyleInterface { } elseif (in_array('default', $available_styles)) { return 'default'; } else { - throw new RuntimeException('There is no appropriate dialog style in the system'); + throw new \RuntimeException('There is no appropriate dialog style in the system'); } } diff --git a/src/mibew/libs/classes/invitation_style.php b/src/mibew/libs/classes/Mibew/Style/InvitationStyle.php similarity index 96% rename from src/mibew/libs/classes/invitation_style.php rename to src/mibew/libs/classes/Mibew/Style/InvitationStyle.php index 4f03082a..741d1217 100644 --- a/src/mibew/libs/classes/invitation_style.php +++ b/src/mibew/libs/classes/Mibew/Style/InvitationStyle.php @@ -15,13 +15,15 @@ * limitations under the License. */ +namespace Mibew\Style; + // Import namespaces and classes of the core use Mibew\Settings; /** * Represents a style for invitations */ -class InvitationStyle extends Style implements StyleInterface { +class InvitationStyle extends BaseStyle implements StyleInterface { /** * Builds base path for style files. This path is relative Mibew root and * does not contain neither leading nor trailing slash. diff --git a/src/mibew/libs/classes/page_style.php b/src/mibew/libs/classes/Mibew/Style/PageStyle.php similarity index 97% rename from src/mibew/libs/classes/page_style.php rename to src/mibew/libs/classes/Mibew/Style/PageStyle.php index 80a0757e..f7e0ca0c 100644 --- a/src/mibew/libs/classes/page_style.php +++ b/src/mibew/libs/classes/Mibew/Style/PageStyle.php @@ -15,13 +15,15 @@ * limitations under the License. */ +namespace Mibew\Style; + // Import namespaces and classes of the core use Mibew\Settings; /** * Represents a style for operator pages */ -class PageStyle extends Style implements StyleInterface { +class PageStyle extends BaseStyle implements StyleInterface { /** * Builds base path for style files. This path is relative Mibew root and * does not contain neither leading nor trailing slash. diff --git a/src/mibew/libs/interfaces/style.php b/src/mibew/libs/classes/Mibew/Style/StyleInterface.php similarity index 98% rename from src/mibew/libs/interfaces/style.php rename to src/mibew/libs/classes/Mibew/Style/StyleInterface.php index 8ff78677..17892f91 100644 --- a/src/mibew/libs/interfaces/style.php +++ b/src/mibew/libs/classes/Mibew/Style/StyleInterface.php @@ -15,6 +15,8 @@ * limitations under the License. */ +namespace Mibew\Style; + /** * Determine interface for specific style class. */ diff --git a/src/mibew/libs/expand.php b/src/mibew/libs/expand.php index 2363717d..f89ca8ed 100644 --- a/src/mibew/libs/expand.php +++ b/src/mibew/libs/expand.php @@ -110,7 +110,7 @@ function expandtext($text) return preg_replace_callback("/\\\${(\w+:)?([\w\.,]+)}/", "expand_var", $text); } -function expand(StyleInterface $style, $templates_root, $filename) +function expand(\Mibew\Style\StyleInterface $style, $templates_root, $filename) { global $page, $expand_include_path, $current_style, $flatten_page; diff --git a/src/mibew/libs/getcode.php b/src/mibew/libs/getcode.php index 804f017d..aeef3c4b 100644 --- a/src/mibew/libs/getcode.php +++ b/src/mibew/libs/getcode.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\InvitationStyle; function generate_button($title, $locale, $style, $invitation_style_name, $group, $inner, $showhost, $forcesecure, $modsecurity, $operator_code) { diff --git a/src/mibew/license.php b/src/mibew/license.php index e0615417..f83e2b1a 100644 --- a/src/mibew/license.php +++ b/src/mibew/license.php @@ -15,10 +15,11 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(__FILE__).'/libs/init.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $page = array(); $page['title'] = getlocal("license.title"); diff --git a/src/mibew/mail.php b/src/mibew/mail.php index 26389a4a..ad37d6fb 100644 --- a/src/mibew/mail.php +++ b/src/mibew/mail.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Settings; use Mibew\Thread; +use Mibew\Style\ChatStyle; // Initialize libraries require_once(dirname(__FILE__).'/libs/init.php'); @@ -25,9 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/expand.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/notify.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); $errors = array(); $page = array(); diff --git a/src/mibew/operator/agent.php b/src/mibew/operator/agent.php index 2896c626..80f7493d 100644 --- a/src/mibew/operator/agent.php +++ b/src/mibew/operator/agent.php @@ -18,6 +18,8 @@ // Import namespaces and classes of the core use Mibew\Settings; use Mibew\Thread; +use Mibew\Style\ChatStyle; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -27,10 +29,6 @@ require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); require_once(MIBEW_FS_ROOT.'/libs/expand.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/avatar.php b/src/mibew/operator/avatar.php index 96f872a8..3e4fcfba 100644 --- a/src/mibew/operator/avatar.php +++ b/src/mibew/operator/avatar.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/operator_settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/ban.php b/src/mibew/operator/ban.php index 0cdbcef1..5519f576 100644 --- a/src/mibew/operator/ban.php +++ b/src/mibew/operator/ban.php @@ -18,15 +18,13 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Thread; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/blocked.php b/src/mibew/operator/blocked.php index 7818c12d..2f7479a3 100644 --- a/src/mibew/operator/blocked.php +++ b/src/mibew/operator/blocked.php @@ -17,15 +17,13 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/canned.php b/src/mibew/operator/canned.php index 883955fa..7fe7aa48 100644 --- a/src/mibew/operator/canned.php +++ b/src/mibew/operator/canned.php @@ -17,6 +17,7 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -25,9 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/cannededit.php b/src/mibew/operator/cannededit.php index 023cc2f1..9b745b8e 100644 --- a/src/mibew/operator/cannededit.php +++ b/src/mibew/operator/cannededit.php @@ -15,13 +15,14 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/canned.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/features.php b/src/mibew/operator/features.php index 5a497198..206eabbd 100644 --- a/src/mibew/operator/features.php +++ b/src/mibew/operator/features.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/getcode.php b/src/mibew/operator/getcode.php index 048724f3..5f1f3126 100644 --- a/src/mibew/operator/getcode.php +++ b/src/mibew/operator/getcode.php @@ -17,17 +17,15 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\ChatStyle; +use Mibew\Style\InvitationStyle; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/getcode.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/invitation_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/group.php b/src/mibew/operator/group.php index 8a69582d..b814782a 100644 --- a/src/mibew/operator/group.php +++ b/src/mibew/operator/group.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/groupmembers.php b/src/mibew/operator/groupmembers.php index 6d2c84d1..f5357dcb 100644 --- a/src/mibew/operator/groupmembers.php +++ b/src/mibew/operator/groupmembers.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/groups.php b/src/mibew/operator/groups.php index dd991d55..b8a4cad2 100644 --- a/src/mibew/operator/groups.php +++ b/src/mibew/operator/groups.php @@ -18,13 +18,11 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/history.php b/src/mibew/operator/history.php index 7bb8ec7d..44925737 100644 --- a/src/mibew/operator/history.php +++ b/src/mibew/operator/history.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Thread; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -26,9 +27,6 @@ require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/userinfo.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); require_once(MIBEW_FS_ROOT.'/libs/cron.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/index.php b/src/mibew/operator/index.php index 12992d7c..eaf77ef7 100644 --- a/src/mibew/operator/index.php +++ b/src/mibew/operator/index.php @@ -17,13 +17,11 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/invitationthemes.php b/src/mibew/operator/invitationthemes.php index 2b03edbf..988abd05 100644 --- a/src/mibew/operator/invitationthemes.php +++ b/src/mibew/operator/invitationthemes.php @@ -15,16 +15,17 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\InvitationStyle; +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/expand.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/invitation_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/login.php b/src/mibew/operator/login.php index 3fc10310..2dde4e4f 100644 --- a/src/mibew/operator/login.php +++ b/src/mibew/operator/login.php @@ -15,11 +15,12 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $errors = array(); $page = array('formisRemember' => true, 'version' => $version); diff --git a/src/mibew/operator/operator.php b/src/mibew/operator/operator.php index 310ac5dc..e6b653f5 100644 --- a/src/mibew/operator/operator.php +++ b/src/mibew/operator/operator.php @@ -15,12 +15,13 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/operator_settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/operators.php b/src/mibew/operator/operators.php index 640fa1cb..c4a322d8 100644 --- a/src/mibew/operator/operators.php +++ b/src/mibew/operator/operators.php @@ -17,13 +17,11 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/opgroups.php b/src/mibew/operator/opgroups.php index 115f12a5..ef65c617 100644 --- a/src/mibew/operator/opgroups.php +++ b/src/mibew/operator/opgroups.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/operator_settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/page_themes.php b/src/mibew/operator/page_themes.php index b3175de1..861f3309 100644 --- a/src/mibew/operator/page_themes.php +++ b/src/mibew/operator/page_themes.php @@ -15,12 +15,13 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/performance.php b/src/mibew/operator/performance.php index 255145c5..fa940ef6 100644 --- a/src/mibew/operator/performance.php +++ b/src/mibew/operator/performance.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/permissions.php b/src/mibew/operator/permissions.php index 9d0dcf71..2e185042 100644 --- a/src/mibew/operator/permissions.php +++ b/src/mibew/operator/permissions.php @@ -15,12 +15,13 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/operator_settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); csrfchecktoken(); diff --git a/src/mibew/operator/redirect.php b/src/mibew/operator/redirect.php index 8ed97fa5..20ac5b92 100644 --- a/src/mibew/operator/redirect.php +++ b/src/mibew/operator/redirect.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Thread; +use Mibew\Style\ChatStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -25,9 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/expand.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/resetpwd.php b/src/mibew/operator/resetpwd.php index d5add122..182d8938 100644 --- a/src/mibew/operator/resetpwd.php +++ b/src/mibew/operator/resetpwd.php @@ -17,14 +17,12 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $errors = array(); $page = array( diff --git a/src/mibew/operator/restore.php b/src/mibew/operator/restore.php index ed2ba094..fe3362da 100644 --- a/src/mibew/operator/restore.php +++ b/src/mibew/operator/restore.php @@ -17,15 +17,13 @@ // Import namespaces and classes of the core use Mibew\Database; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); require_once(MIBEW_FS_ROOT.'/libs/notify.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $errors = array(); $page = array( diff --git a/src/mibew/operator/settings.php b/src/mibew/operator/settings.php index e204035b..dfb94820 100644 --- a/src/mibew/operator/settings.php +++ b/src/mibew/operator/settings.php @@ -17,17 +17,15 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\ChatStyle; +use Mibew\Style\InvitationStyle; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); require_once(MIBEW_FS_ROOT.'/libs/cron.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/invitation_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/statistics.php b/src/mibew/operator/statistics.php index 67096b6c..d21f6ebf 100644 --- a/src/mibew/operator/statistics.php +++ b/src/mibew/operator/statistics.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -25,9 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/statistics.php'); require_once(MIBEW_FS_ROOT.'/libs/cron.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/themes.php b/src/mibew/operator/themes.php index 1eccfd57..d3dc0fab 100644 --- a/src/mibew/operator/themes.php +++ b/src/mibew/operator/themes.php @@ -15,6 +15,11 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\ChatStyle; +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); @@ -22,10 +27,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); require_once(MIBEW_FS_ROOT.'/libs/expand.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/threadprocessor.php b/src/mibew/operator/threadprocessor.php index 4cd26d8f..dcdb5827 100644 --- a/src/mibew/operator/threadprocessor.php +++ b/src/mibew/operator/threadprocessor.php @@ -18,15 +18,13 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Thread; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/userinfo.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/tracked.php b/src/mibew/operator/tracked.php index 54fc576c..c43d0ec2 100644 --- a/src/mibew/operator/tracked.php +++ b/src/mibew/operator/tracked.php @@ -17,15 +17,13 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/track.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/translate.php b/src/mibew/operator/translate.php index 48f10433..58fafa09 100644 --- a/src/mibew/operator/translate.php +++ b/src/mibew/operator/translate.php @@ -15,12 +15,13 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); function compare_localization_by_l1($a, $b) { diff --git a/src/mibew/operator/updates.php b/src/mibew/operator/updates.php index 0df774bd..4c72cbfe 100644 --- a/src/mibew/operator/updates.php +++ b/src/mibew/operator/updates.php @@ -15,12 +15,13 @@ * limitations under the License. */ +// Import namespaces and classes of the core +use Mibew\Style\PageStyle; + +// Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/settings.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator); diff --git a/src/mibew/operator/userhistory.php b/src/mibew/operator/userhistory.php index f2c5c6cb..26ae0f0f 100644 --- a/src/mibew/operator/userhistory.php +++ b/src/mibew/operator/userhistory.php @@ -18,6 +18,7 @@ // Import namespaces and classes of the core use Mibew\Database; use Mibew\Thread; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); @@ -25,9 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/chat.php'); require_once(MIBEW_FS_ROOT.'/libs/userinfo.php'); require_once(MIBEW_FS_ROOT.'/libs/pagination.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); diff --git a/src/mibew/operator/users.php b/src/mibew/operator/users.php index 574c11f2..42635338 100644 --- a/src/mibew/operator/users.php +++ b/src/mibew/operator/users.php @@ -17,15 +17,13 @@ // Import namespaces and classes of the core use Mibew\Settings; +use Mibew\Style\ChatStyle; +use Mibew\Style\PageStyle; // Initialize libraries require_once(dirname(dirname(__FILE__)).'/libs/init.php'); require_once(MIBEW_FS_ROOT.'/libs/operator.php'); require_once(MIBEW_FS_ROOT.'/libs/groups.php'); -require_once(MIBEW_FS_ROOT.'/libs/interfaces/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/chat_style.php'); -require_once(MIBEW_FS_ROOT.'/libs/classes/page_style.php'); $operator = check_login(); force_password($operator);