Use autoload for \Mibew\Settings class

This commit is contained in:
Dmitriy Simushev 2013-12-26 12:57:32 +00:00
parent 4ea034e92e
commit 8256aea4cd
34 changed files with 122 additions and 6 deletions

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(__FILE__).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/chat.php');
require_once(MIBEW_FS_ROOT.'/libs/operator.php');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(__FILE__).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/chat.php');
require_once(MIBEW_FS_ROOT.'/libs/operator.php');

View File

@ -15,7 +15,10 @@
* limitations under the License.
*/
// Initialize librariess
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(__FILE__).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/thread.php');
require_once(MIBEW_FS_ROOT.'/libs/track.php');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(MIBEW_FS_ROOT.'/libs/track.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/thread.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/mibew_api.php');
@ -29,7 +33,6 @@ 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
*/

View File

@ -15,6 +15,11 @@
* limitations under the License.
*/
namespace Mibew;
// Import namespaces and classes of the core
use \Database;
/**
* Encapsulates work with system settings.
*/

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Represents a chat style
*/

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Represents a style for invitations
*/

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Represents a style for operator pages
*/

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Represents a chat thread
*

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Incapsulates thread api and thread processing functions.
*

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Incapsulates awaiting users list api related functions.
*

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
/* ajax server actions use utf-8 */

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
function generate_button($title, $locale, $style, $invitation_style_name, $group, $inner, $showhost, $forcesecure, $modsecurity, $operator_code)
{
$app_location = get_app_location($showhost, $forcesecure);

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
function group_by_id($id)
{
$db = Database::getInstance();

View File

@ -38,7 +38,6 @@ spl_autoload_register('class_autoload');
// Include system classes
require_once(MIBEW_FS_ROOT.'/libs/classes/database.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/settings.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/event_dispatcher.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/plugin_manager.php');
require_once(MIBEW_FS_ROOT.'/libs/classes/plugin.php');

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Check invitation state for specified visitior
*

View File

@ -15,10 +15,12 @@
* limitations under the License.
*/
/** Name of the cookie to remember an operator
*
*/
// Import namespaces and classes of the core
use Mibew\Settings;
/**
* Name of the cookie to remember an operator
*/
define('REMEMBER_OPERATOR_COOKIE_NAME', 'mibew_operator');
/** Permissions constants */

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
function setup_settings_tabs($active)
{
global $page, $mibewroot;

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
function get_statistics_query($type)
{
$query = $_SERVER['QUERY_STRING'];

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(MIBEW_FS_ROOT.'/libs/chat.php');
function track_visitor($visitorid, $entry, $referer)

View File

@ -15,6 +15,9 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
function get_useragent_version($userAgent)
{
global $knownAgents;

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(__FILE__).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/chat.php');
require_once(MIBEW_FS_ROOT.'/libs/expand.php');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(dirname(__FILE__)).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/canned.php');
require_once(MIBEW_FS_ROOT.'/libs/chat.php');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// 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');

View File

@ -15,6 +15,10 @@
* limitations under the License.
*/
// Import namespaces and classes of the core
use Mibew\Settings;
// Initialize libraries
require_once(dirname(__FILE__).'/libs/init.php');
require_once(MIBEW_FS_ROOT.'/libs/invitation.php');
require_once(MIBEW_FS_ROOT.'/libs/operator.php');